Merge branch 'feature/qa_f' into dev

This commit is contained in:
wangcongtao
2020-07-31 12:35:10 +08:00
5 changed files with 15 additions and 2 deletions

View File

@@ -129,6 +129,11 @@ public class AppsListActivity extends MvpActivity< AppsListView, AppsListPresent
overridePendingTransition( R.anim.module_apps_anim_enter, R.anim.module_apps_anim_exit );
}
@Override
public void executeFinish() {
finish();
}
@Override
protected void onDestroy() {
super.onDestroy();

View File

@@ -13,6 +13,7 @@ import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.intent.IMogoIntentManager;
import com.mogo.utils.logger.Logger;
import org.json.JSONException;
import org.json.JSONObject;
@@ -38,6 +39,7 @@ public class AppsListPresenter extends Presenter< AppsListView > implements IMog
super.onCreate( owner );
mIntentManager = ( IMogoIntentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_INTENT_MANAGER ).navigation( getContext() );
mIntentManager.registerIntentListener( AppsConst.COMMAND_OPERATION, this );
mIntentManager.registerIntentListener( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this );
AIAssist.getInstance( getContext() ).registerUnWakeupCommand( AppsConst.CMD_UN_WAKE_CLOSE_APP_LIST, AppsConst.CMD_UN_WAKE_WORDS_CLOSE_APP_LIST, this );
}
@@ -56,6 +58,9 @@ public class AppsListPresenter extends Presenter< AppsListView > implements IMog
} catch ( JSONException e ) {
e.printStackTrace();
}
} else if ( Intent.ACTION_CLOSE_SYSTEM_DIALOGS.equals( intentStr ) ) {
Logger.d( TAG, "home 键导致 app 列表关闭" );
mView.executeFinish();
}
}
@@ -90,6 +95,7 @@ public class AppsListPresenter extends Presenter< AppsListView > implements IMog
public void onDestroy( @NonNull LifecycleOwner owner ) {
super.onDestroy( owner );
mIntentManager.unregisterIntentListener( AppsConst.COMMAND_OPERATION, this );
mIntentManager.unregisterIntentListener( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this );
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( AppsConst.CMD_UN_WAKE_CLOSE_APP_LIST );
}
}

View File

@@ -11,4 +11,6 @@ import com.mogo.commons.mvp.IView;
public interface AppsListView extends IView {
void closeAppsPanel();
void executeFinish();
}