summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tsuwei Chen <tsuwei@google.com> 2014-09-05 15:15:34 -0700
committer Tsuwei Chen <tsuwei@google.com> 2014-09-05 23:05:49 +0000
commit48d37f957a9db65bbccf0e4b4bc79e00f88f199e (patch)
tree6dca389f1e9392b26822506772c66941e55f576c
parentaa924b52e94ac5757ce0ae43f844684808387579 (diff)
Properly register all Intent filters.
Bug: 17408889 Change-Id: Iff740def80eb50e0dc8391d7212a3ae7eeaed152
-rw-r--r--services/core/java/com/android/server/location/GpsLocationProvider.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/location/GpsLocationProvider.java b/services/core/java/com/android/server/location/GpsLocationProvider.java
index 2ef9828d5af3..0cb8eb81036a 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -453,11 +453,10 @@ public class GpsLocationProvider implements LocationProviderInterface {
@Override public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
+ if (DEBUG) Log.d(TAG, "receive broadcast intent, action: " + action);
if (action.equals(ALARM_WAKEUP)) {
- if (DEBUG) Log.d(TAG, "ALARM_WAKEUP");
startNavigating(false);
} else if (action.equals(ALARM_TIMEOUT)) {
- if (DEBUG) Log.d(TAG, "ALARM_TIMEOUT");
hibernate();
} else if (action.equals(Intents.DATA_SMS_RECEIVED_ACTION)) {
checkSmsSuplInit(intent);
@@ -691,7 +690,6 @@ public class GpsLocationProvider implements LocationProviderInterface {
intentFilter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
intentFilter.addAction(Intent.ACTION_SCREEN_ON);
- intentFilter = new IntentFilter();
intentFilter.addAction(SIM_STATE_CHANGED);
mContext.registerReceiver(mBroadcastReceiver, intentFilter, null, mHandler);
}