diff options
| author | 2019-03-12 13:48:53 +0000 | |
|---|---|---|
| committer | 2019-03-12 13:48:53 +0000 | |
| commit | 5e91c8f1e3ed012374206faa94f93f88a80bc55f (patch) | |
| tree | 329d03b5f7ed6d6cfc0b8f8c829e6f72f20674eb | |
| parent | 8bf530ae17f48dc3590acaeaa36cfdfdf3020ef6 (diff) | |
| parent | 1666882e929a0a53b2c696e6f3d907c05b509a80 (diff) | |
Merge "Fix issue #123661517: API Review: packageType"
| -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) { |