Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 139ad8f1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Add feature ids to system server services that requset location.""

parents dc77c5e1 8fe72a21
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -4953,16 +4953,6 @@
    <permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"
                android:protectionLevel="signature|appPredictor" />

    <!-- Feature Id for Country Detector. -->
    <feature android:featureId="CountryDetector" android:label="@string/country_detector"/>
    <!-- Feature Id for Location service. -->
    <feature android:featureId="LocationService" android:label="@string/location_service"/>
    <!-- Feature Id for Sensor Notification service. -->
    <feature android:featureId="SensorNotificationService"
             android:label="@string/sensor_notification_service"/>
    <!-- Feature Id for Twilight service. -->
    <feature android:featureId="TwilightService" android:label="@string/twilight_service"/>

    <application android:process="system"
                 android:persistent="true"
                 android:hasCode="false"
+0 −8
Original line number Diff line number Diff line
@@ -421,14 +421,6 @@
         [CHAR LIMIT=NONE] -->
    <string name="location_changed_notification_text">Tap to see your location settings.</string>

    <!-- Feature Id for Country Detector. [CHAR LIMIT=NONE]-->
    <string name="country_detector">Country Detector</string>
    <!-- Feature Id for Location service. [CHAR LIMIT=NONE]-->
    <string name="location_service">Location Service</string>
    <!-- Feature Id for Sensor Notification service. [CHAR LIMIT=NONE]-->
    <string name="sensor_notification_service">Sensor Notification Service</string>
    <!-- Feature Id for Twilight service. [CHAR LIMIT=NONE]-->
    <string name="twilight_service">Twilight Service</string>

    <!-- Factory reset warning dialog strings--> <skip />
    <!-- Shows up in the dialog's title to warn about an impeding factory reset. [CHAR LIMIT=NONE] -->
+1 −3
Original line number Diff line number Diff line
@@ -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();

+6 −4
Original line number Diff line number Diff line
@@ -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() {
+3 −5
Original line number Diff line number Diff line
@@ -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();
    }

Loading