diff --git a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 084b2de0ab6..8b8f8d7c1f7 100755
--- a/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -313,6 +313,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
static public final String SYSTEM_DIALOG_REASON_HOME_KEY = "homekey";
static public final String SYSTEM_DIALOG_REASON_ASSIST = "assist";
static public final String SYSTEM_DIALOG_REASON_SCREENSHOT = "screenshot";
+ private static final String CLIENT_LAUNCHER = "com.aceage.karie";
+ private static final String SYSTEM_LAUNCHER = "com.android.mlauncher";
private static final int POWER_BUTTON_SUPPRESSION_DELAY_DEFAULT_MILLIS = 800;
private static final AudioAttributes VIBRATION_ATTRIBUTES = new AudioAttributes.Builder()
@@ -1922,8 +1924,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// register for dream-related broadcasts
filter = new IntentFilter();
+ filter.addAction(CLIENT_LAUNCHER);
+ filter.addAction(SYSTEM_LAUNCHER);
filter.addAction(Intent.ACTION_DREAMING_STARTED);
filter.addAction(Intent.ACTION_DREAMING_STOPPED);
+
context.registerReceiver(mDreamReceiver, filter);
// register for multiuser-relevant broadcasts
+ BroadcastReceiver mDreamReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if(intent.getAction().equals(CLIENT_LAUNCHER)){
+ Log.d("swl","intent==========>"+intent.getAction());
+ Intent mainActivityIntent =new Intent();
+ +mainActivityIntent.setClassName("com.aceage.karie","com.aceage.karie.activity.launch.LaunchActivity");
+ mainActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(mainActivityIntent);
+ }else if(intent.getAction().equals(SYSTEM_LAUNCHER)){
+ Log.d("swl","intent=======>"+intent.getAction());
+ Intent mainActivityIntent =new Intent();
+ +mainActivityIntent.setClassName("com.android.launcher3","com.android.launcher3.uioverrides.QuickstepLauncher");
+ mainActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(mainActivityIntent);
+ }
+
}
};