Add utility methods to AmbientDisplayConfig
The added utility methods are to enable increased granularity in determinining the availability of gesture settings dependant on Always on Display. Bug: 79779562 Test: robotests Change-Id: Ib54a867ca554d44ee4190706805fa8545aec9fa0
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