diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/TelephonyRegistry.java | 2 | ||||
-rw-r--r-- | services/java/com/android/server/am/BatteryStatsService.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java index 101b075..47cb6ad 100644 --- a/services/java/com/android/server/TelephonyRegistry.java +++ b/services/java/com/android/server/TelephonyRegistry.java @@ -477,7 +477,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { private void broadcastServiceStateChanged(ServiceState state) { long ident = Binder.clearCallingIdentity(); try { - mBatteryStats.noteAirplaneMode(state.getState() == ServiceState.STATE_POWER_OFF); + mBatteryStats.notePhoneState(state.getState()); } catch (RemoteException re) { // Can't do much } finally { diff --git a/services/java/com/android/server/am/BatteryStatsService.java b/services/java/com/android/server/am/BatteryStatsService.java index 61537f5..5a1619a 100644 --- a/services/java/com/android/server/am/BatteryStatsService.java +++ b/services/java/com/android/server/am/BatteryStatsService.java @@ -51,6 +51,9 @@ public final class BatteryStatsService extends IBatteryStats.Stub { mContext = context; ServiceManager.addService("batteryinfo", asBinder()); mStats.setNumSpeedSteps(new PowerProfile(mContext).getNumSpeedSteps()); + mStats.setRadioScanningTimeout(mContext.getResources().getInteger( + com.android.internal.R.integer.config_radioScanningTimeout) + * 1000L); } public void shutdown() { @@ -195,10 +198,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub { } } - public void noteAirplaneMode(boolean airplaneMode) { + public void notePhoneState(int state) { enforceCallingPermission(); synchronized (mStats) { - mStats.noteAirplaneModeLocked(airplaneMode); + mStats.notePhoneStateLocked(state); } } |