Loading core/java/android/content/Intent.java +10 −0 Original line number Diff line number Diff line Loading @@ -3954,6 +3954,16 @@ public class Intent implements Parcelable, Cloneable { */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_SETUP_WIZARD = "android.intent.category.SETUP_WIZARD"; /** * This is the home activity, that is the activity that serves as the launcher app * from there the user can start other apps. Often components with lower/higher * priority intent filters handle the home intent, for example SetupWizard, to * setup the device and we need to be able to distinguish the home app from these * setup helpers. * @hide */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_LAUNCHER_APP = "android.intent.category.LAUNCHER_APP"; /** * This activity is a preference panel. */ Loading services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java +14 −3 Original line number Diff line number Diff line Loading @@ -624,14 +624,25 @@ final class DefaultPermissionGrantPolicy { grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId); } // Home Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME); homeIntent.addCategory(Intent.CATEGORY_LAUNCHER_APP); PackageParser.Package homePackage = getDefaultSystemHandlerActivityPackageLPr( homeIntent, userId); if (homePackage != null && doesPackageSupportRuntimePermissions(homePackage)) { grantRuntimePermissionsLPw(homePackage, LOCATION_PERMISSIONS, false, userId); } // Watches if (mService.hasSystemFeature(PackageManager.FEATURE_WATCH, 0)) { // Home application on watches Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME_MAIN); Intent wearHomeIntent = new Intent(Intent.ACTION_MAIN); wearHomeIntent.addCategory(Intent.CATEGORY_HOME_MAIN); PackageParser.Package wearHomePackage = getDefaultSystemHandlerActivityPackageLPr( homeIntent, userId); wearHomeIntent, userId); if (wearHomePackage != null && doesPackageSupportRuntimePermissions(wearHomePackage)) { Loading Loading
core/java/android/content/Intent.java +10 −0 Original line number Diff line number Diff line Loading @@ -3954,6 +3954,16 @@ public class Intent implements Parcelable, Cloneable { */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_SETUP_WIZARD = "android.intent.category.SETUP_WIZARD"; /** * This is the home activity, that is the activity that serves as the launcher app * from there the user can start other apps. Often components with lower/higher * priority intent filters handle the home intent, for example SetupWizard, to * setup the device and we need to be able to distinguish the home app from these * setup helpers. * @hide */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_LAUNCHER_APP = "android.intent.category.LAUNCHER_APP"; /** * This activity is a preference panel. */ Loading
services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java +14 −3 Original line number Diff line number Diff line Loading @@ -624,14 +624,25 @@ final class DefaultPermissionGrantPolicy { grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId); } // Home Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME); homeIntent.addCategory(Intent.CATEGORY_LAUNCHER_APP); PackageParser.Package homePackage = getDefaultSystemHandlerActivityPackageLPr( homeIntent, userId); if (homePackage != null && doesPackageSupportRuntimePermissions(homePackage)) { grantRuntimePermissionsLPw(homePackage, LOCATION_PERMISSIONS, false, userId); } // Watches if (mService.hasSystemFeature(PackageManager.FEATURE_WATCH, 0)) { // Home application on watches Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME_MAIN); Intent wearHomeIntent = new Intent(Intent.ACTION_MAIN); wearHomeIntent.addCategory(Intent.CATEGORY_HOME_MAIN); PackageParser.Package wearHomePackage = getDefaultSystemHandlerActivityPackageLPr( homeIntent, userId); wearHomeIntent, userId); if (wearHomePackage != null && doesPackageSupportRuntimePermissions(wearHomePackage)) { Loading