Merge "Fix flickers on the Location page" into tm-dev am: a8eabc6ada
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17447104 Change-Id: Ia63428939b5f9329d3f59965391ce33d5888ec6b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -131,12 +131,16 @@ public class RecentLocationAccessPreferenceController extends LocationBasePrefer
|
|||||||
banner.setSelectable(false);
|
banner.setSelectable(false);
|
||||||
mCategoryRecentLocationRequests.addPreference(banner);
|
mCategoryRecentLocationRequests.addPreference(banner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mUiBlockListener != null) {
|
||||||
|
mUiBlockListener.onBlockerWorkFinished(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLocationModeChanged(int mode, boolean restricted) {
|
public void onLocationModeChanged(int mode, boolean restricted) {
|
||||||
boolean enabled = mLocationEnabler.isEnabled(mode);
|
boolean enabled = mLocationEnabler.isEnabled(mode);
|
||||||
mCategoryRecentLocationRequests.setVisible(enabled);
|
updatePreferenceVisibilityDelegate(mCategoryRecentLocationRequests, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,11 +20,13 @@ import android.content.Context;
|
|||||||
import androidx.preference.Preference;
|
import androidx.preference.Preference;
|
||||||
import androidx.preference.PreferenceScreen;
|
import androidx.preference.PreferenceScreen;
|
||||||
|
|
||||||
|
import com.android.settings.core.BasePreferenceController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preference controller that handles the "See All" button for recent location access.
|
* Preference controller that handles the "See All" button for recent location access.
|
||||||
*/
|
*/
|
||||||
public class RecentLocationAccessSeeAllButtonPreferenceController extends
|
public class RecentLocationAccessSeeAllButtonPreferenceController extends
|
||||||
LocationBasePreferenceController {
|
LocationBasePreferenceController implements BasePreferenceController.UiBlocker {
|
||||||
|
|
||||||
private Preference mPreference;
|
private Preference mPreference;
|
||||||
|
|
||||||
@@ -44,6 +46,6 @@ public class RecentLocationAccessSeeAllButtonPreferenceController extends
|
|||||||
@Override
|
@Override
|
||||||
public void onLocationModeChanged(int mode, boolean restricted) {
|
public void onLocationModeChanged(int mode, boolean restricted) {
|
||||||
boolean enabled = mLocationEnabler.isEnabled(mode);
|
boolean enabled = mLocationEnabler.isEnabled(mode);
|
||||||
mPreference.setVisible(enabled);
|
updatePreferenceVisibilityDelegate(mPreference, enabled);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user