AOD: Add temporary always-on setting

Adds a setting for controlling always-on ambient display
until the new ambient display settings screen is implemented.

Also updates DozePreferenceController to use the the
AmbientDisplayConfiguration helper instead of recreating that
logic.

Also adds tests for both doze preference controllers.

Bug: 33279975
Test: Toggle "Settings > Display > Always on", verify ambient display is on / off
Test: make RunSettingsRoboTests
Change-Id: If36356bc29329a4e0732e79db662ffb02c9fc189
This commit is contained in:
Adrian Roos
2017-05-10 13:26:25 -07:00
parent 2664ccae50
commit 95ff1f4131
9 changed files with 353 additions and 20 deletions

View File

@@ -16,7 +16,6 @@
package com.android.internal.hardware;
import android.provider.Settings;
import android.content.Context;
/**
@@ -42,4 +41,20 @@ public class AmbientDisplayConfiguration {
public boolean pulseOnDoubleTapEnabled(int user) {
return true;
}
public boolean pulseOnNotificationEnabled(int user) {
return true;
}
public boolean pulseOnNotificationAvailable() {
return true;
}
public boolean alwaysOnEnabled(int user) {
return true;
}
public boolean alwaysOnAvailable() {
return true;
}
}