增加拉起语音程序的逻辑
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.mogo.commons.mvp;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.MotionEvent;
|
||||
@@ -46,6 +48,24 @@ public abstract class MvpActivity< V extends IView, P extends Presenter< V > >
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
hideBottomUIMenu();
|
||||
startVoicePad();
|
||||
}
|
||||
|
||||
/**
|
||||
* 在Pad上拉起语音
|
||||
*/
|
||||
private void startVoicePad() {
|
||||
try {
|
||||
if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_LENOVO) {
|
||||
Intent intent = new Intent();
|
||||
intent.setComponent(new ComponentName("com.zhidao.speech.voice.pad",
|
||||
"com.zhidao.speech.MainActivity"));
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//隐藏导航栏
|
||||
|
||||
Reference in New Issue
Block a user