Merge "Add utility methods to AmbientDisplayConfig" into pi-dev
am: 758cfd63db
Change-Id: Ie4b339c20f7392211142152b34584683072c191d
This commit is contained in:
@@ -59,8 +59,11 @@ public class AmbientDisplayConfiguration {
|
||||
}
|
||||
|
||||
public boolean pulseOnPickupAvailable() {
|
||||
return mContext.getResources().getBoolean(R.bool.config_dozePulsePickup)
|
||||
&& ambientDisplayAvailable();
|
||||
return dozePulsePickupSensorAvailable() && ambientDisplayAvailable();
|
||||
}
|
||||
|
||||
public boolean dozePulsePickupSensorAvailable() {
|
||||
return mContext.getResources().getBoolean(R.bool.config_dozePulsePickup);
|
||||
}
|
||||
|
||||
public boolean pulseOnPickupCanBeModified(int user) {
|
||||
@@ -73,7 +76,11 @@ public class AmbientDisplayConfiguration {
|
||||
}
|
||||
|
||||
public boolean pulseOnDoubleTapAvailable() {
|
||||
return !TextUtils.isEmpty(doubleTapSensorType()) && ambientDisplayAvailable();
|
||||
return doubleTapSensorAvailable() && ambientDisplayAvailable();
|
||||
}
|
||||
|
||||
public boolean doubleTapSensorAvailable() {
|
||||
return !TextUtils.isEmpty(doubleTapSensorType());
|
||||
}
|
||||
|
||||
public String doubleTapSensorType() {
|
||||
@@ -115,7 +122,7 @@ public class AmbientDisplayConfiguration {
|
||||
return boolSettingDefaultOff(Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, user);
|
||||
}
|
||||
|
||||
private boolean ambientDisplayAvailable() {
|
||||
public boolean ambientDisplayAvailable() {
|
||||
return !TextUtils.isEmpty(ambientDisplayComponent());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user