commit | 69eb7b7435a760f5f9800f5d0e45df64c7e27b3e | [log] [tgz] |
---|---|---|
author | Nadav Bar <nadavbar@google.com> | Thu Aug 06 12:25:19 2020 +0300 |
committer | Gustav Sennton <gsennton@google.com> | Tue Sep 01 16:55:59 2020 +0000 |
tree | 44afb7c1117fe31b93c02875cd6215a19ea8d9a5 | |
parent | 0ac2f4e4f7bd289274276f1222d9e81aa386e82f [diff] |
Fix SystemCaptionsManagerService to re-bind after a force stop This change also fixes a bug in AbstractMasterSystemService where following a "force stop", the per-user service was not updated if PACKAGE_RESTART_POLICY_REFRESH_EAGER was specified. These behavior resulted with getServiceComponentName returning null and the service not being restarted. Bug: 160735520 Bug: 160693548 Bug: 160644088 Change-Id: I2f66273bd90e9bb220f799d8ab3b024637b33c24 Merged-In: I2f66273bd90e9bb220f799d8ab3b024637b33c24 Test: Manually (cherry picked from commit 762e0f9a2e9945a8b8cf1c3c93e3b70af8201908)
diff --git a/services/core/java/com/android/server/infra/AbstractMasterSystemService.java b/services/core/java/com/android/server/infra/AbstractMasterSystemService.java index 2672f84..cf03c60 100644 --- a/services/core/java/com/android/server/infra/AbstractMasterSystemService.java +++ b/services/core/java/com/android/server/infra/AbstractMasterSystemService.java
@@ -948,7 +948,7 @@ if (debug) { Slog.d(mTag, "Eagerly recreating service for user " + userId); } - getServiceForUserLocked(userId); + updateCachedServiceLocked(userId); } } onServicePackageRestartedLocked(userId);
diff --git a/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java b/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java index 27a116c..1586a33 100644 --- a/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java +++ b/services/systemcaptions/java/com/android/server/systemcaptions/SystemCaptionsManagerService.java
@@ -34,7 +34,8 @@ context, com.android.internal.R.string.config_defaultSystemCaptionsManagerService), /*disallowProperty=*/ null, - /*packageUpdatePolicy=*/ PACKAGE_UPDATE_POLICY_REFRESH_EAGER); + /*packageUpdatePolicy=*/ PACKAGE_UPDATE_POLICY_REFRESH_EAGER + | PACKAGE_RESTART_POLICY_REFRESH_EAGER); } @Override