summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ryan Mitchell <rtmitchell@google.com> 2019-08-14 10:25:26 -0700
committer Ryan Mitchell <rtmitchell@google.com> 2019-08-14 17:34:53 +0000
commitb8fbab621840616339a0831ddca07ce97a130cfc (patch)
treee9906a8c55982d023e723c12c7a6e70a77365fcf
parent5cd874d7922e0a793bb4d1305ef7b21edee13a7b (diff)
Do not stop idmap2d after OMS initialization
The OMS was calling stopIdmapService after OMS initialization finished. This method was not setting the cached service binder to null and the service binder was being reused when an overlay is enabled or disabled within the 10 seconds the connection to the service is still opened. This change no longer calls stopIdmapService and makes startIdmapService and stopIdmapService private to IdmapDaemon. Bug: 139307780 Test: enabled overlay within 10 seconds of OMS startup ending and observed state STATE_ENABLED. Change-Id: I46b6a3631278c4dbdf5e5d373e085bac5186ed9a
-rw-r--r--services/core/java/com/android/server/om/IdmapDaemon.java4
-rw-r--r--services/core/java/com/android/server/om/OverlayManagerService.java1
2 files changed, 2 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/om/IdmapDaemon.java b/services/core/java/com/android/server/om/IdmapDaemon.java
index 91824c3e9f43..20a4c75a1ce6 100644
--- a/services/core/java/com/android/server/om/IdmapDaemon.java
+++ b/services/core/java/com/android/server/om/IdmapDaemon.java
@@ -129,11 +129,11 @@ class IdmapDaemon {
}
}
- static void startIdmapService() {
+ private static void startIdmapService() {
SystemProperties.set("ctl.start", IDMAP_DAEMON);
}
- static void stopIdmapService() {
+ private static void stopIdmapService() {
SystemProperties.set("ctl.stop", IDMAP_DAEMON);
}
diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
index ce951816d3a6..da69986cd59f 100644
--- a/services/core/java/com/android/server/om/OverlayManagerService.java
+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
@@ -262,7 +262,6 @@ public final class OverlayManagerService extends SystemService {
initIfNeeded();
onSwitchUser(UserHandle.USER_SYSTEM);
- IdmapDaemon.stopIdmapService();
publishBinderService(Context.OVERLAY_SERVICE, mService);
publishLocalService(OverlayManagerService.class, this);