diff options
author | Roman Birg <roman@cyngn.com> | 2015-12-22 08:49:46 -0800 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2015-12-22 08:50:29 -0800 |
commit | 2ba238bf7a14df087529f532d491be479281ea14 (patch) | |
tree | a636b71f38de3ff03d972fd2a899b0c7f01913bd /cm/lib/main | |
parent | 0ab4ff9d21c0fa681905381a7238e4e0bfbcb627 (diff) | |
download | vendor_cmsdk-2ba238bf7a14df087529f532d491be479281ea14.zip vendor_cmsdk-2ba238bf7a14df087529f532d491be479281ea14.tar.gz vendor_cmsdk-2ba238bf7a14df087529f532d491be479281ea14.tar.bz2 |
ProfileManagerService: fix broadcasting crash
Ref: CYNGNOS-1478
Change-Id: If4952c4513063ea4b2cf2105514183731175ad72
Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'cm/lib/main')
-rw-r--r-- | cm/lib/main/java/org/cyanogenmod/platform/internal/ProfileManagerService.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/ProfileManagerService.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/ProfileManagerService.java index 1a93c86..538fded 100644 --- a/cm/lib/main/java/org/cyanogenmod/platform/internal/ProfileManagerService.java +++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/ProfileManagerService.java @@ -187,10 +187,6 @@ public class ProfileManagerService extends SystemService { filter.addAction(Intent.ACTION_LOCALE_CHANGED); filter.addAction(Intent.ACTION_SHUTDOWN); mContext.registerReceiver(mIntentReceiver, filter); - - mContext.getContentResolver().registerContentObserver( - CMSettings.System.getUriFor(CMSettings.System.SYSTEM_PROFILES_ENABLED), - false, new ProfilesObserver(mHandler), UserHandle.USER_ALL); } private void bindKeyguard() { @@ -208,6 +204,10 @@ public class ProfileManagerService extends SystemService { public void onBootPhase(int phase) { if (phase == PHASE_ACTIVITY_MANAGER_READY) { bindKeyguard(); + } else if (phase == PHASE_BOOT_COMPLETED) { + mContext.getContentResolver().registerContentObserver( + CMSettings.System.getUriFor(CMSettings.System.SYSTEM_PROFILES_ENABLED), + false, new ProfilesObserver(mHandler), UserHandle.USER_ALL); } } |