opt
This commit is contained in:
@@ -22,10 +22,22 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
@Override
|
||||
public void onCreate( @NonNull LifecycleOwner owner ) {
|
||||
super.onCreate( owner );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume( @NonNull LifecycleOwner owner ) {
|
||||
super.onResume( owner );
|
||||
AIAssist.getInstance( getContext() ).registerUnWakeupCommand( AppsConst.CMD_OPEN_APPS_PANEL, AppsConst.CMD_OPEN_APPS_PANEL_UN_WAKEUP_WORDS, this );
|
||||
AIAssist.getInstance( getContext() ).registerUnWakeupCommand( AppsConst.CMD_CLOSE_APPS_PANEL, AppsConst.CMD_CLOSE_APPS_PANEL_UN_WAKEUP_WORDS, this );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause( @NonNull LifecycleOwner owner ) {
|
||||
super.onPause( owner );
|
||||
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( AppsConst.CMD_OPEN_APPS_PANEL );
|
||||
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( AppsConst.CMD_CLOSE_APPS_PANEL );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCmdSelected( String cmd ) {
|
||||
if ( mView == null ) {
|
||||
@@ -64,7 +76,5 @@ public class AppNavigatorPresenter extends Presenter< AppNavigatorView > impleme
|
||||
@Override
|
||||
public void onDestroy( @NonNull LifecycleOwner owner ) {
|
||||
super.onDestroy( owner );
|
||||
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( AppsConst.CMD_OPEN_APPS_PANEL );
|
||||
AIAssist.getInstance( getContext() ).unregisterUnWakeupCommand( AppsConst.CMD_CLOSE_APPS_PANEL );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ public class AppsConst {
|
||||
public static final int TOTAL_SIZE_EACH_PAGE = 12;
|
||||
|
||||
public static final String CMD_OPEN_APPS_PANEL = "CMD_OPEN_APPS_PANEL";
|
||||
public static final String[] CMD_OPEN_APPS_PANEL_UN_WAKEUP_WORDS = {"第一个"};
|
||||
public static final String[] CMD_OPEN_APPS_PANEL_UN_WAKEUP_WORDS = {"打开全部应用"};
|
||||
|
||||
public static final String CMD_CLOSE_APPS_PANEL = "CMD_CLOSE_APPS_PANEL";
|
||||
public static final String[] CMD_CLOSE_APPS_PANEL_UN_WAKEUP_WORDS = {"第二个"};
|
||||
public static final String[] CMD_CLOSE_APPS_PANEL_UN_WAKEUP_WORDS = {"关闭全部应用"};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user