summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/TelephonyRegistry.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 14:04:24 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 14:04:24 -0800
commit076357b8567458d4b6dfdcf839ef751634cd2bfb (patch)
treeefbb2fd6f1dc67d2d606382fc3b82983e7cb2e1f /services/java/com/android/server/TelephonyRegistry.java
parent3dec7d563a2f3e1eb967ce2054a00b6620e3558c (diff)
downloadframeworks_base-076357b8567458d4b6dfdcf839ef751634cd2bfb.zip
frameworks_base-076357b8567458d4b6dfdcf839ef751634cd2bfb.tar.gz
frameworks_base-076357b8567458d4b6dfdcf839ef751634cd2bfb.tar.bz2
auto import from //depot/cupcake/@132589
Diffstat (limited to 'services/java/com/android/server/TelephonyRegistry.java')
-rw-r--r--services/java/com/android/server/TelephonyRegistry.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 5e5fb93..b5cf1aa 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -33,14 +33,12 @@ import java.util.ArrayList;
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import com.android.internal.app.IBatteryStats;
import com.android.internal.telephony.ITelephonyRegistry;
import com.android.internal.telephony.IPhoneStateListener;
import com.android.internal.telephony.DefaultPhoneNotifier;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneStateIntentReceiver;
import com.android.internal.telephony.TelephonyIntents;
-import com.android.server.am.BatteryStatsService;
/**
@@ -57,9 +55,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
int events;
}
- private final Context mContext;
- private final ArrayList<Record> mRecords = new ArrayList();
- private final IBatteryStats mBatteryStats;
+ private Context mContext;
+ private ArrayList<Record> mRecords = new ArrayList();
private int mCallState = TelephonyManager.CALL_STATE_IDLE;
private String mCallIncomingNumber = "";
@@ -84,7 +81,6 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
TelephonyRegistry(Context context) {
CellLocation.getEmpty().fillInNotifierBundle(mCellLocation);
mContext = context;
- mBatteryStats = BatteryStatsService.getService();
}
public void listen(String pkgForDebug, IPhoneStateListener callback, int events,
@@ -418,18 +414,6 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
private void broadcastCallStateChanged(int state, String incomingNumber) {
- long ident = Binder.clearCallingIdentity();
- try {
- if (state == TelephonyManager.CALL_STATE_IDLE) {
- mBatteryStats.notePhoneOff();
- } else {
- mBatteryStats.notePhoneOn();
- }
- } catch (RemoteException e) {
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
-
Intent intent = new Intent(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
intent.putExtra(Phone.STATE_KEY,
DefaultPhoneNotifier.convertCallState(state).toString());