diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 488698a8f4612..6530036f940c1 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -4953,16 +4953,6 @@ - - - - - - - - - Tap to see your location settings. - - Country Detector - - Location Service - - Sensor Notification Service - - Twilight Service diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java index 207a6aa5b9d0b..6852fbfd24879 100644 --- a/services/core/java/com/android/server/LocationManagerService.java +++ b/services/core/java/com/android/server/LocationManagerService.java @@ -194,8 +194,6 @@ public class LocationManagerService extends ILocationManager.Stub { // time private static final int MAX_PROVIDER_SCHEDULING_JITTER_MS = 100; - private static final String FEATURE_ID = "LocationService"; - private static final LocationRequest DEFAULT_LOCATION_REQUEST = new LocationRequest(); private final Object mLock = new Object(); @@ -245,7 +243,7 @@ public class LocationManagerService extends ILocationManager.Stub { private int mBatterySaverMode; private LocationManagerService(Context context) { - mContext = context.createFeatureContext(FEATURE_ID); + mContext = context; mHandler = FgThread.getHandler(); mLocalService = new LocalService(); diff --git a/services/core/java/com/android/server/SensorNotificationService.java b/services/core/java/com/android/server/SensorNotificationService.java index 9082dca1022cf..7f5befabc576c 100644 --- a/services/core/java/com/android/server/SensorNotificationService.java +++ b/services/core/java/com/android/server/SensorNotificationService.java @@ -16,8 +16,10 @@ package com.android.server; +import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; +import android.content.IntentFilter; import android.hardware.GeomagneticField; import android.hardware.Sensor; import android.hardware.SensorAdditionalInfo; @@ -29,7 +31,9 @@ import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.UserHandle; +import android.provider.Settings; import android.util.Slog; public class SensorNotificationService extends SystemService @@ -48,8 +52,6 @@ public class SensorNotificationService extends SystemService private static final long MILLIS_2010_1_1 = 1262358000000l; - private static final String FEATURE_ID = "SensorNotificationService"; - private Context mContext; private SensorManager mSensorManager; private LocationManager mLocationManager; @@ -59,8 +61,8 @@ public class SensorNotificationService extends SystemService private long mLocalGeomagneticFieldUpdateTime = -LOCATION_MIN_TIME; public SensorNotificationService(Context context) { - super(context.createFeatureContext(FEATURE_ID)); - mContext = getContext(); + super(context); + mContext = context; } public void onStart() { diff --git a/services/core/java/com/android/server/location/CountryDetectorBase.java b/services/core/java/com/android/server/location/CountryDetectorBase.java index b158388281d86..8326ef9498585 100644 --- a/services/core/java/com/android/server/location/CountryDetectorBase.java +++ b/services/core/java/com/android/server/location/CountryDetectorBase.java @@ -31,15 +31,13 @@ import android.os.Handler; * @hide */ public abstract class CountryDetectorBase { - private static final String FEATURE_ID = "CountryDetector"; - protected final Handler mHandler; protected final Context mContext; protected CountryListener mListener; protected Country mDetectedCountry; - public CountryDetectorBase(Context context) { - mContext = context.createFeatureContext(FEATURE_ID); + public CountryDetectorBase(Context ctx) { + mContext = ctx; mHandler = new Handler(); } @@ -47,7 +45,7 @@ public abstract class CountryDetectorBase { * Start detecting the country that the user is in. * * @return the country if it is available immediately, otherwise null should - * be returned. + * be returned. */ public abstract Country detectCountry(); diff --git a/services/core/java/com/android/server/twilight/TwilightService.java b/services/core/java/com/android/server/twilight/TwilightService.java index 761fbf8a06229..e72ba8d9f01b6 100644 --- a/services/core/java/com/android/server/twilight/TwilightService.java +++ b/services/core/java/com/android/server/twilight/TwilightService.java @@ -50,7 +50,6 @@ public final class TwilightService extends SystemService implements AlarmManager.OnAlarmListener, Handler.Callback, LocationListener { private static final String TAG = "TwilightService"; - private static final String FEATURE_ID = "TwilightService"; private static final boolean DEBUG = false; private static final int MSG_START_LISTENING = 1; @@ -74,7 +73,7 @@ public final class TwilightService extends SystemService protected TwilightState mLastTwilightState; public TwilightService(Context context) { - super(context.createFeatureContext(FEATURE_ID)); + super(context); mHandler = new Handler(Looper.getMainLooper(), this); }