diff options
| author | 2017-08-31 21:40:32 +0000 | |
|---|---|---|
| committer | 2017-08-31 21:40:32 +0000 | |
| commit | fe12d97a52bb7ed51ccdd5fcb477c93b9297b9eb (patch) | |
| tree | 4ce4f26854f97fa6b8ed7bbbb59490678acbca42 | |
| parent | 977ec7b65bc258008e5132659f19a267c77749d4 (diff) | |
| parent | 9a78e68f74c4149801b404839221d0b1757340d4 (diff) | |
Merge "OMS: fix listener callbacks triggered by changes to target package" am: 637dbcbb6c am: c2351d1d40 am: b361ec15e4
am: 9a78e68f74
Change-Id: I95f16894439cd9aa91f6e73b0b626abd53b42a3a
| -rw-r--r-- | services/core/java/com/android/server/om/OverlayManagerServiceImpl.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java index db6e9749535b..c3957f432f4c 100644 --- a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java +++ b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java @@ -169,8 +169,9 @@ final class OverlayManagerServiceImpl { } final PackageInfo targetPackage = mPackageManager.getPackageInfo(packageName, userId); - updateAllOverlaysForTarget(packageName, userId, targetPackage); - mListener.onOverlaysChanged(packageName, userId); + if (updateAllOverlaysForTarget(packageName, userId, targetPackage)) { + mListener.onOverlaysChanged(packageName, userId); + } } void onTargetPackageChanged(@NonNull final String packageName, final int userId) { @@ -210,7 +211,9 @@ final class OverlayManagerServiceImpl { Slog.d(TAG, "onTargetPackageRemoved packageName=" + packageName + " userId=" + userId); } - updateAllOverlaysForTarget(packageName, userId, null); + if (updateAllOverlaysForTarget(packageName, userId, null)) { + mListener.onOverlaysChanged(packageName, userId); + } } /** |