Revert "Merge branch 'dev_robotaxi-d-app-module_2110_220915_2.11.0' into…"

This reverts merge request !315
This commit is contained in:
wangmingjun
2022-10-27 11:20:05 +00:00
parent fa6442b8bc
commit 704035eee3
3 changed files with 37 additions and 23 deletions

View File

@@ -36,6 +36,15 @@ if (!isAndroidTestBuild()) {
apply plugin: 'apm-plugin'
}
if (!isAndroidTestBuild()) {
apply plugin: 'bytex.threadOpt'
thread_opt {
enable !isReleaseBuild
enableInDebug !isReleaseBuild
logLevel "DEBUG"
}
}
if (!isAndroidTestBuild()) {
apply plugin: 'LancetX'
LancetX {
@@ -281,6 +290,10 @@ dependencies {
androidTestImplementation rootProject.ext.dependencies.androidx_espresso_core
androidTestImplementation rootProject.ext.dependencies.localbroadcastmanager
androidTestImplementation rootProject.ext.dependencies.mogo_v2x
if (isAndroidTestBuild()) {
implementation "com.mogo.thread.opt:lib:${THREAD_OPT_VERSION}"
}
}
if (!isAndroidTestBuild()) {

View File

@@ -34,6 +34,7 @@ buildscript {
classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}"
classpath "com.mogo.cloud:bizconfig:${BIZCONFIG_VERSION}"
classpath 'com.volcengine:apm_insight_plugin:1.4.1'
classpath "com.mogo.thread.opt:plg:${THREAD_OPT_VERSION}"
classpath 'com.mogo.cloud:systrace:1.0.1'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
classpath 'com.mogo.sticky:service:1.0.8'

View File

@@ -212,29 +212,29 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
// if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) { //向上长按 开启自动驾驶
// long currentTime = System.currentTimeMillis() / (1000);
// long oldTime = SharedPrefsMgr.getInstance(getContext()).getLong("old_time_up", 0);
//// Log.d("liyz", "time = " + (currentTime - oldTime));
// if (currentTime - oldTime > 6) {
// SharedPrefsMgr.getInstance(getContext()).putLong("old_time_up", System.currentTimeMillis() / 1000);
//// ToastUtils.showShort("长按 ↑↑↑ 开启自动驾驶");
//// CallerAutoPilotManager.INSTANCE.setControlAutopilotCarAuto(true);
// CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
//
// }
//
// return true;
// } else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { //下和中间键盘长按,减速为-2
// long currentTime = System.currentTimeMillis() / (1000);
// long oldTime = SharedPrefsMgr.getInstance(getContext()).getLong("old_time_down", 0);
// if (currentTime - oldTime > 6) {
// SharedPrefsMgr.getInstance(getContext()).putLong("old_time_down", System.currentTimeMillis() / 1000);
//// ToastUtils.showShort("长按 ↓↓↓ 减速 -2 ");
// sendAcc(true, -2);
// }
// return true;
// }
if (keyCode == KeyEvent.KEYCODE_VOLUME_UP) { //向上长按 开启自动驾驶
long currentTime = System.currentTimeMillis() / (1000);
long oldTime = SharedPrefsMgr.getInstance(getContext()).getLong("old_time_up", 0);
// Log.d("liyz", "time = " + (currentTime - oldTime));
if (currentTime - oldTime > 6) {
SharedPrefsMgr.getInstance(getContext()).putLong("old_time_up", System.currentTimeMillis() / 1000);
// ToastUtils.showShort("长按 ↑↑↑ 开启自动驾驶");
// CallerAutoPilotManager.INSTANCE.setControlAutopilotCarAuto(true);
CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters());
}
return true;
} else if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) { //下和中间键盘长按,减速为-2
long currentTime = System.currentTimeMillis() / (1000);
long oldTime = SharedPrefsMgr.getInstance(getContext()).getLong("old_time_down", 0);
if (currentTime - oldTime > 6) {
SharedPrefsMgr.getInstance(getContext()).putLong("old_time_down", System.currentTimeMillis() / 1000);
// ToastUtils.showShort("长按 ↓↓↓ 减速 -2 ");
sendAcc(true, -2);
}
return true;
}
// Log.e("liyz", "onKeyDown keyCode = " + keyCode + "--action = " + event.getAction() + "---" + event);
return super.onKeyDown(keyCode, event);