diff options
author | Narayan Kamath <narayan@google.com> | 2014-04-09 14:57:59 +0100 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-04-09 14:57:59 +0100 |
commit | a981e3b01ae6af2b67e582f0d1cbb95560d05626 (patch) | |
tree | d1a142bec93f77a95bda3322c16abe2ac4f53fef /services/core/java/com/android/server/power | |
parent | 33ea32fd4e5edd7920adecd17ca69defd0c4ba93 (diff) | |
parent | 7289f3ab8f05db6206d696d75f460fadc05dc731 (diff) | |
download | frameworks_base-a981e3b01ae6af2b67e582f0d1cbb95560d05626.zip frameworks_base-a981e3b01ae6af2b67e582f0d1cbb95560d05626.tar.gz frameworks_base-a981e3b01ae6af2b67e582f0d1cbb95560d05626.tar.bz2 |
resolved conflicts for merge of 7289f3ab to klp-modular-dev-plus-aosp
Change-Id: I788ca17503e2fd225e205a76d3e7062f71d58316
Diffstat (limited to 'services/core/java/com/android/server/power')
-rw-r--r-- | services/core/java/com/android/server/power/Notifier.java | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java index ac4a128..f72efff 100644 --- a/services/core/java/com/android/server/power/Notifier.java +++ b/services/core/java/com/android/server/power/Notifier.java @@ -16,10 +16,13 @@ package com.android.server.power; +import android.app.ActivityManagerInternal; import android.app.AppOpsManager; + import com.android.internal.app.IAppOpsService; import com.android.internal.app.IBatteryStats; import com.android.server.EventLogTags; +import com.android.server.LocalServices; import android.app.ActivityManagerNative; import android.content.BroadcastReceiver; @@ -82,6 +85,7 @@ final class Notifier { private final SuspendBlocker mSuspendBlocker; private final ScreenOnBlocker mScreenOnBlocker; private final WindowManagerPolicy mPolicy; + private final ActivityManagerInternal mActivityManagerInternal; private final NotifierHandler mHandler; private final Intent mScreenOnIntent; @@ -116,6 +120,7 @@ final class Notifier { mSuspendBlocker = suspendBlocker; mScreenOnBlocker = screenOnBlocker; mPolicy = policy; + mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class); mHandler = new NotifierHandler(looper); mScreenOnIntent = new Intent(Intent.ACTION_SCREEN_ON); @@ -417,12 +422,7 @@ final class Notifier { EventLog.writeEvent(EventLogTags.POWER_SCREEN_STATE, 1, 0, 0, 0); mPolicy.screenTurningOn(mScreenOnListener); - - try { - ActivityManagerNative.getDefault().wakingUp(); - } catch (RemoteException e) { - // ignore it - } + mActivityManagerInternal.wakingUp(); if (ActivityManagerNative.isSystemReady()) { mContext.sendOrderedBroadcastAsUser(mScreenOnIntent, UserHandle.ALL, null, @@ -473,11 +473,7 @@ final class Notifier { EventLog.writeEvent(EventLogTags.POWER_SCREEN_STATE, 0, why, 0, 0); mPolicy.screenTurnedOff(why); - try { - ActivityManagerNative.getDefault().goingToSleep(); - } catch (RemoteException e) { - // ignore it. - } + mActivityManagerInternal.goingToSleep(); if (ActivityManagerNative.isSystemReady()) { mContext.sendOrderedBroadcastAsUser(mScreenOffIntent, UserHandle.ALL, null, |