summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dianne Hackborn <hackbod@google.com> 2019-03-11 14:43:14 -0700
committer Dianne Hackborn <hackbod@google.com> 2019-03-11 14:43:14 -0700
commit1666882e929a0a53b2c696e6f3d907c05b509a80 (patch)
tree2ddf1ac06be2ff8f1611209ace0bb6da0d871e17
parent835282ec291e86b907b9758e1dca07923e78059e (diff)
Fix issue #123661517: API Review: packageType
Fixes: 123661517 Test: manual Change-Id: I1d445b1166eca00b2d4f347c9b24716850073708
-rw-r--r--core/res/res/values/attrs_manifest.xml4
-rw-r--r--services/core/java/com/android/server/am/ServiceRecord.java8
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 fc7b4cf05b56..c5b1175a11ee 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -1993,7 +1993,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) {