Home
last modified time | relevance | path

Searched refs:mPowerManager (Results 1 – 18 of 18) sorted by relevance

/packages/services/Car/service/src/com/android/car/
DSystemInterface.java48 private final PowerManager mPowerManager; field in SystemInterface.SystemInterfaceImpl
57 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in SystemInterfaceImpl()
59 mFullWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, in SystemInterfaceImpl()
61 mPartialWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, in SystemInterfaceImpl()
88 mPowerManager.wakeUp(SystemClock.uptimeMillis()); in setDisplayState()
92 mPowerManager.goToSleep(SystemClock.uptimeMillis()); in setDisplayState()
103 mPowerManager.shutdown(false /* no confirm*/, null, true /* true */); in shutdown()
109 mPowerManager.goToSleep(SystemClock.uptimeMillis(), in enterDeepSleep()
/packages/apps/Settings/src/com/android/settings/display/
DPowerManagerWrapper.java28 private final PowerManager mPowerManager; field in PowerManagerWrapper
31 mPowerManager = powerManager; in PowerManagerWrapper()
35 return mPowerManager.getMinimumScreenBrightnessSetting(); in getMinimumScreenBrightnessSetting()
39 return mPowerManager.getMaximumScreenBrightnessSetting(); in getMaximumScreenBrightnessSetting()
43 return mPowerManager.getMinimumScreenBrightnessForVrSetting(); in getMinimumScreenBrightnessForVrSetting()
47 return mPowerManager.getMaximumScreenBrightnessForVrSetting(); in getMaximumScreenBrightnessForVrSetting()
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DBrightnessLevelPreferenceControllerTest.java54 private PowerManagerWrapper mPowerManager; field in BrightnessLevelPreferenceControllerTest
66 when(mPowerManager.getMinimumScreenBrightnessSetting()).thenReturn(0); in setUp()
67 when(mPowerManager.getMaximumScreenBrightnessSetting()).thenReturn(100); in setUp()
68 when(mPowerManager.getMinimumScreenBrightnessForVrSetting()).thenReturn(0); in setUp()
69 when(mPowerManager.getMaximumScreenBrightnessForVrSetting()).thenReturn(100); in setUp()
71 mController = spy(new BrightnessLevelPreferenceController(mContext, null, mPowerManager)); in setUp()
85 new BrightnessLevelPreferenceController(context, null, mPowerManager); in onStart_shouldRegisterObserver()
105 new BrightnessLevelPreferenceController(context, null, mPowerManager); in onStop_shouldUnregisterObserver()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatterySaverController.java45 private final PowerManager mPowerManager; field in BatterySaverController
52 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in BatterySaverController()
75 mBatterySaverPref.setChecked(mPowerManager.isPowerSaveMode()); in updateState()
82 if (saverOn != mPowerManager.isPowerSaveMode() in onPreferenceChange()
83 && !mPowerManager.setPowerSaveMode(saverOn)) { in onPreferenceChange()
114 final boolean mode = mPowerManager.isPowerSaveMode(); in updateSummary()
137 mBatterySaverPref.setChecked(mPowerManager.isPowerSaveMode()); in onPowerSaveModeChanged()
DBatterySaverSettings.java60 private PowerManager mPowerManager; field in BatterySaverSettings
99 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in onActivityCreated()
145 if (!mPowerManager.setPowerSaveMode(mode)) { in trySetPowerSaveMode()
154 final boolean mode = mPowerManager.isPowerSaveMode(); in updateSwitch()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatterySaverControllerTest.java45 private PowerManager mPowerManager; field in BatterySaverControllerTest
57 ReflectionHelpers.setField(mBatterySaverController, "mPowerManager", mPowerManager); in setUp()
97 when(mPowerManager.setPowerSaveMode(saverOn)).thenReturn(true); in testOnPreferenceChangeInner()
98 when(mPowerManager.isPowerSaveMode()).thenReturn(!saverOn); in testOnPreferenceChangeInner()
101 verify(mPowerManager).setPowerSaveMode(saverOn); in testOnPreferenceChangeInner()
105 when(mPowerManager.isPowerSaveMode()).thenReturn(saverOn); in testUpdateStateInner()
DPowerUsageSummaryTest.java143 private PowerManager mPowerManager; field in PowerUsageSummaryTest
176 when(mContext.getSystemService(Context.POWER_SERVICE)).thenReturn(mPowerManager); in setUp()
/packages/apps/Dialer/java/com/android/incallui/
DProximitySensor.java46 private final PowerManager mPowerManager; field in ProximitySensor
62 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in ProximitySensor()
63 if (mPowerManager.isWakeLockLevelSupported(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK)) { in ProximitySensor()
65 mPowerManager.newWakeLock(PowerManager.PROXIMITY_SCREEN_OFF_WAKE_LOCK, TAG); in ProximitySensor()
146 } else if (mPowerManager.isScreenOn()) { in onInCallShowing()
164 return !mPowerManager.isScreenOn(); in isScreenReallyOff()
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DCardEmulationManager.java80 final PowerManager mPowerManager; field in CardEmulationManager
97 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in CardEmulationManager()
110 if (mPowerManager != null) { in onHostCardEmulationActivated()
111mPowerManager.userActivity(SystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); in onHostCardEmulationActivated()
124 if (mPowerManager != null) { in onHostCardEmulationData()
125mPowerManager.userActivity(SystemClock.uptimeMillis(), PowerManager.USER_ACTIVITY_EVENT_TOUCH, 0); in onHostCardEmulationData()
/packages/apps/Nfc/src/com/android/nfc/
DScreenStateHelper.java23 private final PowerManager mPowerManager; field in ScreenStateHelper
29 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in ScreenStateHelper()
34 if (!mPowerManager.isScreenOn()) { in checkScreenState()
DNfcService.java265 private PowerManager mPowerManager; field in NfcService
431 mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); in NfcService()
433 mRoutingWakeLock = mPowerManager.newWakeLock( in NfcService()
/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertDialogTest.java56 private PowerManager mPowerManager; field in CellBroadcastAlertDialogTest
83 mPowerManager = new PowerManager(mContext, mMockedPowerManagerService, null); in setUp()
84 injectSystemService(PowerManager.class, mPowerManager); in setUp()
/packages/services/Telephony/src/com/android/phone/
DPhoneGlobals.java166 private PowerManager mPowerManager; field in PhoneGlobals
311 mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); in onCreate()
312 mWakeLock = mPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, LOG_TAG); in onCreate()
314 mPartialWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK in onCreate()
558 mPowerManager.wakeUp(SystemClock.uptimeMillis(), "android.phone:WAKE"); in wakeUpScreen()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppService.java134 private PowerManager mPowerManager; field in BluetoothOppService
681 mTransfer = new BluetoothOppTransfer(this, mPowerManager, newBatch); in insertShare()
685 mServerTransfer = new BluetoothOppTransfer(this, mPowerManager, newBatch, in insertShare()
719 mServerTransfer = new BluetoothOppTransfer(this, mPowerManager, in insertShare()
899 mTransfer = new BluetoothOppTransfer(this, mPowerManager, nextBatch); in removeBatch()
907 mServerTransfer = new BluetoothOppTransfer(this, mPowerManager, nextBatch, in removeBatch()
/packages/apps/DocumentsUI/src/com/android/documentsui/services/
DFileOperationService.java132 private PowerManager mPowerManager; field in FileOperationService
165 mPowerManager = getSystemService(PowerManager.class); in onCreate()
225 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG); in handleOperation()
/packages/apps/Stk/src/com/android/stk/
DStkAppService.java159 private PowerManager mPowerManager = null; field in StkAppService
278 mPowerManager = (PowerManager)getSystemService(Context.POWER_SERVICE); in onCreate()
378 mPowerManager = null; in onDestroy()
682 return (!mPowerManager.isInteractive()); in isScreenIdle()
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DAdapterService.java204 private PowerManager mPowerManager; field in AdapterService
404 mPowerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); in onCreate()
2081 mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, lockName); in acquireWakeLock()
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DHeadsetStateMachine.java147 private PowerManager mPowerManager; field in HeadsetStateMachine
226 mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); in HeadsetStateMachine()
227 mStartVoiceRecognitionWakeLock = mPowerManager.newWakeLock( in HeadsetStateMachine()