summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/backup/java/com/android/server/backup/BackupManagerService.java8
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java8
-rw-r--r--services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java8
3 files changed, 18 insertions, 6 deletions
diff --git a/services/backup/java/com/android/server/backup/BackupManagerService.java b/services/backup/java/com/android/server/backup/BackupManagerService.java
index 83b953e..8d9c965 100644
--- a/services/backup/java/com/android/server/backup/BackupManagerService.java
+++ b/services/backup/java/com/android/server/backup/BackupManagerService.java
@@ -7848,8 +7848,12 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF
// If we get this far, the callback or timeout will schedule the
// next restore state, so we're done
} catch (Exception e) {
- Slog.e(TAG, "Unable to finalize restore of " + mCurrentPackage.packageName);
- executeNextState(UnifiedRestoreState.FINAL);
+ final String packageName = mCurrentPackage.packageName;
+ Slog.e(TAG, "Unable to finalize restore of " + packageName);
+ EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE,
+ packageName, e.toString());
+ keyValueAgentErrorCleanup();
+ executeNextState(UnifiedRestoreState.RUNNING_QUEUE);
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 7c79661..6d91309 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1687,16 +1687,16 @@ public final class ActivityStackSupervisor implements DisplayListener {
private int getComponentRestrictionForCallingPackage(ActivityInfo activityInfo,
String callingPackage, int callingPid, int callingUid, boolean ignoreTargetSecurity) {
- if (activityInfo.permission == null) {
- return ACTIVITY_RESTRICTION_NONE;
- }
-
if (!ignoreTargetSecurity && mService.checkComponentPermission(activityInfo.permission,
callingPid, callingUid, activityInfo.applicationInfo.uid, activityInfo.exported)
== PackageManager.PERMISSION_DENIED) {
return ACTIVITY_RESTRICTION_PERMISSION;
}
+ if (activityInfo.permission == null) {
+ return ACTIVITY_RESTRICTION_NONE;
+ }
+
final int opCode = AppOpsManager.permissionToOpCode(activityInfo.permission);
if (opCode == AppOpsManager.OP_NONE) {
return ACTIVITY_RESTRICTION_NONE;
diff --git a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
index d2a70df..96a5e00 100644
--- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
@@ -363,6 +363,14 @@ final class DefaultPermissionGrantPolicy {
grantRuntimePermissionsLPw(cbrPackage, SMS_PERMISSIONS, userId);
}
+ // Carrier Provisioning Service
+ Intent carrierProvIntent = new Intent(Intents.SMS_CARRIER_PROVISION_ACTION);
+ PackageParser.Package carrierProvPackage =
+ getDefaultSystemHandlerServicePackageLPr(carrierProvIntent, userId);
+ if (carrierProvPackage != null && doesPackageSupportRuntimePermissions(carrierProvPackage)) {
+ grantRuntimePermissionsLPw(carrierProvPackage, SMS_PERMISSIONS, false, userId);
+ }
+
// Calendar
Intent calendarIntent = new Intent(Intent.ACTION_MAIN);
calendarIntent.addCategory(Intent.CATEGORY_APP_CALENDAR);