Loading services/java/com/android/server/am/ActivityManagerService.java +0 −12 Original line number Diff line number Diff line Loading @@ -2705,18 +2705,6 @@ public final class ActivityManagerService extends ActivityManagerNative return intent; } String getHomePackageName() { Intent intent = getHomeIntent(); ActivityInfo aInfo = resolveActivityInfo(intent, STOCK_PM_FLAGS, mCurrentUserId); if (aInfo != null) { final String homePackageName = aInfo.applicationInfo.packageName; if (!ResolverActivity.class.getName().equals(homePackageName)) { return homePackageName; } } return null; } boolean startHomeActivityLocked(int userId) { if (mHeadless) { // Added because none of the other calls to ensureBootCompleted seem to fire Loading services/java/com/android/server/am/ActivityRecord.java +5 −11 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ import java.util.HashSet; final class ActivityRecord { static final String TAG = ActivityManagerService.TAG; static final boolean DEBUG_SAVED_STATE = ActivityStackSupervisor.DEBUG_SAVED_STATE; final public static String RECENTS_PACKAGE_NAME = "com.android.systemui.recent"; final ActivityManagerService service; // owner final IApplicationToken.Stub appToken; // window manager token Loading Loading @@ -443,25 +444,18 @@ final class ActivityRecord { noDisplay = ent != null && ent.array.getBoolean( com.android.internal.R.styleable.Window_windowNoDisplay, false); // If we know the system has determined the component, then // we can consider this to be a home activity... String homePackageName = supervisor.getHomePackageName(); if (homePackageName != null && homePackageName.equals(packageName)) { mActivityType = HOME_ACTIVITY_TYPE; } else if ((!_componentSpecified || _launchedFromUid == Process.myUid() if ((!_componentSpecified || _launchedFromUid == Process.myUid() || _launchedFromUid == 0) && Intent.ACTION_MAIN.equals(_intent.getAction()) && _intent.hasCategory(Intent.CATEGORY_HOME) && _intent.getCategories().size() == 1 && _intent.getData() == null && _intent.getType() == null && (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) { (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && isNotResolverActivity()) { // This sure looks like a home activity! mActivityType = HOME_ACTIVITY_TYPE; if (isNotResolverActivity()) { supervisor.setHomePackageName(userId, packageName); } } else if (realActivity.getClassName().contains("com.android.systemui.recent")) { } else if (realActivity.getClassName().contains(RECENTS_PACKAGE_NAME)) { mActivityType = RECENTS_ACTIVITY_TYPE; } else { mActivityType = APPLICATION_ACTIVITY_TYPE; Loading services/java/com/android/server/am/ActivityStackSupervisor.java +0 −27 Original line number Diff line number Diff line Loading @@ -203,12 +203,6 @@ public final class ActivityStackSupervisor { */ final PowerManager.WakeLock mGoingToSleep; /** * The name of the current home activity for each user. * TODO: Remove entries when user is deleted. */ final SparseArray<String> mHomePackageNames = new SparseArray<String>(); public ActivityStackSupervisor(ActivityManagerService service, Context context, Looper looper) { mService = service; Loading Loading @@ -2285,11 +2279,6 @@ public final class ActivityStackSupervisor { boolean switchUserLocked(int userId, UserStartedState uss) { mCurrentUser = userId; final String homePackageName = mService.getHomePackageName(); if (homePackageName != null) { setHomePackageName(mCurrentUser, homePackageName); } mStartingUsers.add(uss); boolean haveActivities = false; for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { Loading Loading @@ -2391,12 +2380,6 @@ public final class ActivityStackSupervisor { pw.print(prefix); pw.print("mStackState="); pw.println(stackStateToString(mStackState)); pw.print(prefix); pw.println("mSleepTimeout: " + mSleepTimeout); pw.print(prefix); pw.println("mCurTaskId: " + mCurTaskId); pw.print(prefix); pw.print("mHomePackageNames:"); for (int i = 0; i < mHomePackageNames.size(); ++i) { pw.print(" ("); pw.print(mHomePackageNames.keyAt(i)); pw.print(","); pw.print(mHomePackageNames.valueAt(i)); pw.print(")"); } pw.println(); } ArrayList<ActivityRecord> getDumpActivitiesLocked(String name) { Loading Loading @@ -2653,14 +2636,4 @@ public final class ActivityStackSupervisor { } } } String getHomePackageName() { return mHomePackageNames.get(mCurrentUser); } void setHomePackageName(int userId, String homePackageName) { if (DEBUG_SWITCH) Slog.d(TAG, "setHomePackageName: user=" + userId + " package=" + homePackageName); mHomePackageNames.put(userId, homePackageName); } } services/java/com/android/server/am/TaskRecord.java +1 −0 Original line number Diff line number Diff line Loading @@ -428,6 +428,7 @@ final class TaskRecord extends ThumbnailHolder { pw.print(prefix); pw.print("numActivities="); pw.print(numActivities); pw.print(" rootWasReset="); pw.print(rootWasReset); pw.print(" userId="); pw.print(userId); pw.print(" mTaskType="); pw.print(mTaskType); pw.print(" numFullscreen="); pw.print(numFullscreen); pw.print(" mOnTopOfHome="); pw.println(mOnTopOfHome); } Loading Loading
services/java/com/android/server/am/ActivityManagerService.java +0 −12 Original line number Diff line number Diff line Loading @@ -2705,18 +2705,6 @@ public final class ActivityManagerService extends ActivityManagerNative return intent; } String getHomePackageName() { Intent intent = getHomeIntent(); ActivityInfo aInfo = resolveActivityInfo(intent, STOCK_PM_FLAGS, mCurrentUserId); if (aInfo != null) { final String homePackageName = aInfo.applicationInfo.packageName; if (!ResolverActivity.class.getName().equals(homePackageName)) { return homePackageName; } } return null; } boolean startHomeActivityLocked(int userId) { if (mHeadless) { // Added because none of the other calls to ensureBootCompleted seem to fire Loading
services/java/com/android/server/am/ActivityRecord.java +5 −11 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ import java.util.HashSet; final class ActivityRecord { static final String TAG = ActivityManagerService.TAG; static final boolean DEBUG_SAVED_STATE = ActivityStackSupervisor.DEBUG_SAVED_STATE; final public static String RECENTS_PACKAGE_NAME = "com.android.systemui.recent"; final ActivityManagerService service; // owner final IApplicationToken.Stub appToken; // window manager token Loading Loading @@ -443,25 +444,18 @@ final class ActivityRecord { noDisplay = ent != null && ent.array.getBoolean( com.android.internal.R.styleable.Window_windowNoDisplay, false); // If we know the system has determined the component, then // we can consider this to be a home activity... String homePackageName = supervisor.getHomePackageName(); if (homePackageName != null && homePackageName.equals(packageName)) { mActivityType = HOME_ACTIVITY_TYPE; } else if ((!_componentSpecified || _launchedFromUid == Process.myUid() if ((!_componentSpecified || _launchedFromUid == Process.myUid() || _launchedFromUid == 0) && Intent.ACTION_MAIN.equals(_intent.getAction()) && _intent.hasCategory(Intent.CATEGORY_HOME) && _intent.getCategories().size() == 1 && _intent.getData() == null && _intent.getType() == null && (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0) { (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && isNotResolverActivity()) { // This sure looks like a home activity! mActivityType = HOME_ACTIVITY_TYPE; if (isNotResolverActivity()) { supervisor.setHomePackageName(userId, packageName); } } else if (realActivity.getClassName().contains("com.android.systemui.recent")) { } else if (realActivity.getClassName().contains(RECENTS_PACKAGE_NAME)) { mActivityType = RECENTS_ACTIVITY_TYPE; } else { mActivityType = APPLICATION_ACTIVITY_TYPE; Loading
services/java/com/android/server/am/ActivityStackSupervisor.java +0 −27 Original line number Diff line number Diff line Loading @@ -203,12 +203,6 @@ public final class ActivityStackSupervisor { */ final PowerManager.WakeLock mGoingToSleep; /** * The name of the current home activity for each user. * TODO: Remove entries when user is deleted. */ final SparseArray<String> mHomePackageNames = new SparseArray<String>(); public ActivityStackSupervisor(ActivityManagerService service, Context context, Looper looper) { mService = service; Loading Loading @@ -2285,11 +2279,6 @@ public final class ActivityStackSupervisor { boolean switchUserLocked(int userId, UserStartedState uss) { mCurrentUser = userId; final String homePackageName = mService.getHomePackageName(); if (homePackageName != null) { setHomePackageName(mCurrentUser, homePackageName); } mStartingUsers.add(uss); boolean haveActivities = false; for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) { Loading Loading @@ -2391,12 +2380,6 @@ public final class ActivityStackSupervisor { pw.print(prefix); pw.print("mStackState="); pw.println(stackStateToString(mStackState)); pw.print(prefix); pw.println("mSleepTimeout: " + mSleepTimeout); pw.print(prefix); pw.println("mCurTaskId: " + mCurTaskId); pw.print(prefix); pw.print("mHomePackageNames:"); for (int i = 0; i < mHomePackageNames.size(); ++i) { pw.print(" ("); pw.print(mHomePackageNames.keyAt(i)); pw.print(","); pw.print(mHomePackageNames.valueAt(i)); pw.print(")"); } pw.println(); } ArrayList<ActivityRecord> getDumpActivitiesLocked(String name) { Loading Loading @@ -2653,14 +2636,4 @@ public final class ActivityStackSupervisor { } } } String getHomePackageName() { return mHomePackageNames.get(mCurrentUser); } void setHomePackageName(int userId, String homePackageName) { if (DEBUG_SWITCH) Slog.d(TAG, "setHomePackageName: user=" + userId + " package=" + homePackageName); mHomePackageNames.put(userId, homePackageName); } }
services/java/com/android/server/am/TaskRecord.java +1 −0 Original line number Diff line number Diff line Loading @@ -428,6 +428,7 @@ final class TaskRecord extends ThumbnailHolder { pw.print(prefix); pw.print("numActivities="); pw.print(numActivities); pw.print(" rootWasReset="); pw.print(rootWasReset); pw.print(" userId="); pw.print(userId); pw.print(" mTaskType="); pw.print(mTaskType); pw.print(" numFullscreen="); pw.print(numFullscreen); pw.print(" mOnTopOfHome="); pw.println(mOnTopOfHome); } Loading