1. merge
2. bugfix
This commit is contained in:
@@ -57,7 +57,7 @@ public class MainIndependentActivity extends MainActivity {
|
||||
@TargetApi( Build.VERSION_CODES.N )
|
||||
private void fixInMultiWindowMode(){
|
||||
if ( isInMultiWindowMode() ) {
|
||||
TipToast.shortTip( R.string.module_main_unsupport_multi_window_mode );
|
||||
TipToast.shortTip( R.string.module_main_un_support_multi_window_mode );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="module_main_unsupport_multi_window_mode">应用不支持分屏</string>
|
||||
<string name="module_main_un_support_multi_window_mode">应用不支持分屏</string>
|
||||
</resources>
|
||||
@@ -247,9 +247,9 @@ class LauncherCardRefresher {
|
||||
|
||||
private void notifyLauncherCard( String info, int amount, String tts ) {
|
||||
Intent intent = new Intent( "com.mogo.launcher.v2x" );
|
||||
intent.putExtra( "v2x_warning_type", 20000 );
|
||||
intent.putExtra( "v2x_warining_timeout", 20 * 1000L );
|
||||
intent.putExtra( "v2x_warning_tts", "" );
|
||||
intent.putExtra( "v2x_warning_type", "20000" );
|
||||
intent.putExtra( "v2x_warining_timeout", 20 * 1000 );
|
||||
intent.putExtra( "v2x_warning_tts", tts );
|
||||
intent.putExtra( "v2x_warning_eventCount", amount );
|
||||
intent.putExtra( "v2x_warning_info", info );
|
||||
mContext.sendBroadcast( intent );
|
||||
|
||||
@@ -79,22 +79,20 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
|
||||
void onClickRight();
|
||||
}
|
||||
|
||||
private boolean isShown;
|
||||
private WindowManagerView windowManager;
|
||||
|
||||
public void show() {
|
||||
try {
|
||||
Logger.d(TAG, "使用windowManager实现");
|
||||
if (!isShown) {
|
||||
if ( windowManager == null ) {
|
||||
windowManager = new WindowManagerView.Builder(
|
||||
V2XServiceManager.getMogoEntranceButtonController().getButton(ButtonIndex.BUTTON2).getContext()
|
||||
).contentView(this).build();
|
||||
windowManager.show();
|
||||
isShown = true;
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
|
||||
unRegisterVoiceCmd();
|
||||
registerVoiceCmd();
|
||||
}
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice("确定要解除求助状态吗");
|
||||
unRegisterVoiceCmd();
|
||||
registerVoiceCmd();
|
||||
windowManager.show();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -111,10 +109,10 @@ public class V2XSeekHelpDialog extends ConstraintLayout implements View.OnClickL
|
||||
};
|
||||
|
||||
public void dismiss() {
|
||||
if (isShown && windowManager != null) {
|
||||
if (windowManager != null) {
|
||||
windowManager.dismiss();
|
||||
isShown = false;
|
||||
}
|
||||
windowManager = null;
|
||||
}
|
||||
|
||||
//放弃求助
|
||||
|
||||
Reference in New Issue
Block a user