Make the show/hide system setting for recent location acccesses sticky.
This is in order to align the location indicator with the list of recent accesses shown in Settings. Bug: 191503437 Test: manual Change-Id: I7aaa65390567ca644e7137de15c558cdcdb29935
This commit is contained in:
@@ -20,6 +20,7 @@ import static com.android.settings.location.RecentLocationAccessPreferenceContro
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
@@ -43,6 +44,8 @@ public class RecentLocationAccessSeeAllPreferenceController
|
||||
|
||||
public RecentLocationAccessSeeAllPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mShowSystem = Settings.Secure.getInt(mContext.getContentResolver(),
|
||||
Settings.Secure.LOCATION_SHOW_SYSTEM_OPS, 0) == 1;
|
||||
mRecentLocationAccesses = RecentAppOpsAccess.createForLocation(context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user