Loading core/java/android/content/Intent.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -3156,6 +3156,13 @@ public class Intent implements Parcelable, Cloneable { */ */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_HOME = "android.intent.category.HOME"; public static final String CATEGORY_HOME = "android.intent.category.HOME"; /** * This is the home activity that is displayed when the device is finished setting up and ready * for use. * @hide */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_HOME_MAIN = "android.intent.category.HOME_MAIN"; /** /** * This is the setup wizard activity, that is the first activity that is displayed * This is the setup wizard activity, that is the first activity that is displayed * when the user sets up the device for the first time. * when the user sets up the device for the first time. Loading services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java +18 −0 Original line number Original line Diff line number Diff line Loading @@ -571,6 +571,24 @@ final class DefaultPermissionGrantPolicy { grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId); grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId); } } // Android Wear Home if (mService.hasSystemFeature(PackageManager.FEATURE_WATCH)) { Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME_MAIN); PackageParser.Package wearHomePackage = getDefaultSystemHandlerActivityPackageLPr( homeIntent, userId); if (wearHomePackage != null && doesPackageSupportRuntimePermissions(wearHomePackage)) { grantRuntimePermissionsLPw(wearHomePackage, CONTACTS_PERMISSIONS, false, userId); grantRuntimePermissionsLPw(wearHomePackage, PHONE_PERMISSIONS, true, userId); grantRuntimePermissionsLPw(wearHomePackage, MICROPHONE_PERMISSIONS, false, userId); } } mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId); mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId); } } } } Loading Loading
core/java/android/content/Intent.java +7 −0 Original line number Original line Diff line number Diff line Loading @@ -3156,6 +3156,13 @@ public class Intent implements Parcelable, Cloneable { */ */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_HOME = "android.intent.category.HOME"; public static final String CATEGORY_HOME = "android.intent.category.HOME"; /** * This is the home activity that is displayed when the device is finished setting up and ready * for use. * @hide */ @SdkConstant(SdkConstantType.INTENT_CATEGORY) public static final String CATEGORY_HOME_MAIN = "android.intent.category.HOME_MAIN"; /** /** * This is the setup wizard activity, that is the first activity that is displayed * This is the setup wizard activity, that is the first activity that is displayed * when the user sets up the device for the first time. * when the user sets up the device for the first time. Loading
services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java +18 −0 Original line number Original line Diff line number Diff line Loading @@ -571,6 +571,24 @@ final class DefaultPermissionGrantPolicy { grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId); grantRuntimePermissionsLPw(musicPackage, STORAGE_PERMISSIONS, userId); } } // Android Wear Home if (mService.hasSystemFeature(PackageManager.FEATURE_WATCH)) { Intent homeIntent = new Intent(Intent.ACTION_MAIN); homeIntent.addCategory(Intent.CATEGORY_HOME_MAIN); PackageParser.Package wearHomePackage = getDefaultSystemHandlerActivityPackageLPr( homeIntent, userId); if (wearHomePackage != null && doesPackageSupportRuntimePermissions(wearHomePackage)) { grantRuntimePermissionsLPw(wearHomePackage, CONTACTS_PERMISSIONS, false, userId); grantRuntimePermissionsLPw(wearHomePackage, PHONE_PERMISSIONS, true, userId); grantRuntimePermissionsLPw(wearHomePackage, MICROPHONE_PERMISSIONS, false, userId); } } mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId); mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId); } } } } Loading