diff options
| -rw-r--r-- | core/res/res/values/attrs_manifest.xml | 4 | ||||
| -rw-r--r-- | services/core/java/com/android/server/am/ServiceRecord.java | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index 44f44d4480d6..dbea13ec7539 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -1996,7 +1996,9 @@ {@link #AndroidManifestApplication application} tag. --> <declare-styleable name="AndroidManifestUsesPackage" parent="AndroidManifestApplication"> <!-- Required type of association with the package, for example "android.package.ad_service" - if it provides an advertising service. --> + if it provides an advertising service. This should use the standard scoped naming + convention as used for other things such as package names, based on the Java naming + convention. --> <attr name="packageType" format="string" /> <!-- Required name of the package you use. --> <attr name="name" /> diff --git a/services/core/java/com/android/server/am/ServiceRecord.java b/services/core/java/com/android/server/am/ServiceRecord.java index abc1066af046..0387774bb257 100644 --- a/services/core/java/com/android/server/am/ServiceRecord.java +++ b/services/core/java/com/android/server/am/ServiceRecord.java @@ -519,10 +519,10 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN public void setProcess(ProcessRecord _proc) { app = _proc; - if (pendingConnectionGroup > 0) { - app.connectionService = this; - app.connectionGroup = pendingConnectionGroup; - app.connectionImportance = pendingConnectionImportance; + if (pendingConnectionGroup > 0 && _proc != null) { + _proc.connectionService = this; + _proc.connectionGroup = pendingConnectionGroup; + _proc.connectionImportance = pendingConnectionImportance; pendingConnectionGroup = pendingConnectionImportance = 0; } if (ActivityManagerService.TRACK_PROCSTATS_ASSOCIATIONS) { |