Merge "Fix the Night Light page UI shrinking" into rvc-dev am: 6f4aa6e5e0
am: 35d0304067
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11983923 Change-Id: I21d2303110af212bceed2855e671aec1e394f166
This commit is contained in:
@@ -21,7 +21,6 @@ import android.content.Intent;
|
||||
import android.location.LocationManager;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -57,13 +56,9 @@ public class TwilightLocationPreferenceController extends BasePreferenceControll
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
preference.setVisible(!mLocationManager.isLocationEnabled());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE_UNSEARCHABLE;
|
||||
return mLocationManager.isLocationEnabled() ? CONDITIONALLY_UNAVAILABLE
|
||||
: AVAILABLE_UNSEARCHABLE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user