diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2015-06-14 00:07:09 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2015-06-14 00:50:37 +0200 |
commit | 635f8f165775fb913ed3e7203f3801ac5cb60420 (patch) | |
tree | 2a53c6b69cb1790b83769c7443be00c9fe4439b6 /cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java | |
parent | 08a3470a78cd6362bb48df414482115de4c8b319 (diff) | |
download | vendor_cmsdk-635f8f165775fb913ed3e7203f3801ac5cb60420.zip vendor_cmsdk-635f8f165775fb913ed3e7203f3801ac5cb60420.tar.gz vendor_cmsdk-635f8f165775fb913ed3e7203f3801ac5cb60420.tar.bz2 |
cmsdk: notify new listeners all registered custom tiles
If a new listener is created, then notified all custom tiles that was previously registered
Change-Id: I9e8d9a1fa84d54b00ea7fd8ed400e172f17f06cc
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java')
-rw-r--r-- | cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java index fd72960..f824678 100644 --- a/cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java +++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/CMStatusBarManagerService.java @@ -113,6 +113,17 @@ public class CMStatusBarManagerService extends SystemService { final ComponentName component, final int userid) { enforceBindCustomTileListener(); mCustomTileListeners.registerService(listener, component, userid); + + // Notify registered tiles + try { + for (ExternalQuickSettingsRecord qsTile : mQSTileList) { + if (userid == UserHandle.USER_ALL || qsTile.getUserId() == userid) { + listener.onCustomTilePosted(new StatusBarCustomTileHolder(qsTile.sbTile)); + } + } + } catch (RemoteException re) { + // Ignore + } } /** |