Flag off stickiness of show/hide system setting.

Bug: 191503437
Test: atest SettingsRoboTests
Change-Id: I96e287cb870265e6ce379e64d01f134f8b3dde59
This commit is contained in:
Kate Montgomery
2022-05-13 23:21:11 +00:00
parent cd2d6f3e25
commit dc67fb3283
5 changed files with 43 additions and 9 deletions

View File

@@ -20,11 +20,13 @@ import static com.android.settings.location.RecentLocationAccessPreferenceContro
import android.content.Context;
import android.os.UserManager;
import android.provider.DeviceConfig;
import android.provider.Settings;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
import com.android.settings.R;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
import com.android.settings.overlay.FeatureFactory;
@@ -48,8 +50,12 @@ 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;
mShowSystem = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
SystemUiDeviceConfigFlags.PROPERTY_LOCATION_INDICATORS_SMALL_ENABLED, false)
? Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.LOCATION_SHOW_SYSTEM_OPS, 0) == 1
: false;
mRecentLocationAccesses = RecentAppOpsAccess.createForLocation(context);
mMetricsFeatureProvider = FeatureFactory.getFactory(context).getMetricsFeatureProvider();
}