Fix flickers on the Location page
Use the UiBlocker and its delegate method to prevent the flicker. Fixes: 220837804 Test: Go to Settings > Location and see all items appearing at the same time. Change-Id: I2095289b9436ca66970b6a868d5c9780f2b19664
This commit is contained in:
@@ -20,11 +20,13 @@ import android.content.Context;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
/**
|
||||
* Preference controller that handles the "See All" button for recent location access.
|
||||
*/
|
||||
public class RecentLocationAccessSeeAllButtonPreferenceController extends
|
||||
LocationBasePreferenceController {
|
||||
LocationBasePreferenceController implements BasePreferenceController.UiBlocker {
|
||||
|
||||
private Preference mPreference;
|
||||
|
||||
@@ -44,6 +46,6 @@ public class RecentLocationAccessSeeAllButtonPreferenceController extends
|
||||
@Override
|
||||
public void onLocationModeChanged(int mode, boolean restricted) {
|
||||
boolean enabled = mLocationEnabler.isEnabled(mode);
|
||||
mPreference.setVisible(enabled);
|
||||
updatePreferenceVisibilityDelegate(mPreference, enabled);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user