Loading services/core/java/com/android/server/attention/AttentionManagerService.java +8 −4 Original line number Diff line number Diff line Loading @@ -115,6 +115,14 @@ public class AttentionManagerService extends SystemService { mAttentionHandler = handler; } @Override public void onBootPhase(int phase) { if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) { mContext.registerReceiver(new ScreenStateReceiver(), new IntentFilter(Intent.ACTION_SCREEN_OFF)); } } @Override public void onStart() { publishBinderService(Context.ATTENTION_SERVICE, new BinderService()); Loading @@ -135,10 +143,6 @@ public class AttentionManagerService extends SystemService { private boolean isServiceAvailable() { if (mComponentName == null) { mComponentName = resolveAttentionService(mContext); if (mComponentName != null) { mContext.registerReceiver(new ScreenStateReceiver(), new IntentFilter(Intent.ACTION_SCREEN_OFF)); } } return mComponentName != null; } Loading Loading
services/core/java/com/android/server/attention/AttentionManagerService.java +8 −4 Original line number Diff line number Diff line Loading @@ -115,6 +115,14 @@ public class AttentionManagerService extends SystemService { mAttentionHandler = handler; } @Override public void onBootPhase(int phase) { if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) { mContext.registerReceiver(new ScreenStateReceiver(), new IntentFilter(Intent.ACTION_SCREEN_OFF)); } } @Override public void onStart() { publishBinderService(Context.ATTENTION_SERVICE, new BinderService()); Loading @@ -135,10 +143,6 @@ public class AttentionManagerService extends SystemService { private boolean isServiceAvailable() { if (mComponentName == null) { mComponentName = resolveAttentionService(mContext); if (mComponentName != null) { mContext.registerReceiver(new ScreenStateReceiver(), new IntentFilter(Intent.ACTION_SCREEN_OFF)); } } return mComponentName != null; } Loading