Merge "Fix the Night Light page UI shrinking" into rvc-dev am: 6f4aa6e5e0 am: 35d0304067 am: adb65f0f4e am: bd06683934

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11983923

Change-Id: I907eeff27eb2bc685e08fa4d41e6cca73276c3ef
This commit is contained in:
TreeHugger Robot
2020-06-24 13:33:23 +00:00
committed by Automerger Merge Worker
2 changed files with 70 additions and 7 deletions

View File

@@ -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;
}
}