cmsdk: Move LiveDisplay settings and resources.
Change-Id: I6d0c3f8b645e2c8cca059ff343a774eab1933a9b
This commit is contained in:
parent
b006e980e7
commit
a09defa3c9
29
cm/res/res/drawable/ic_livedisplay_notif.xml
Normal file
29
cm/res/res/drawable/ic_livedisplay_notif.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2015 The CyanogenMod Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M15.5,15.5c0.4-0.4,0.7-0.8,0.9-1.2c-1.9,1-4.3,0.7-5.8-0.9s-1.9-4-0.9-5.8C9.2,7.8,8.8,8.1,8.5,8.5
|
||||
c-2,2-2,5.1,0,7.1S13.6,17.5,15.5,15.5z M19,5v14H5V5H19
|
||||
M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5
|
||||
C21,3.9,20.1,3,19,3L19,3z" />
|
||||
</vector>
|
@ -24,7 +24,7 @@
|
||||
<item>@string/perf_profile_perf</item>
|
||||
</string-array>
|
||||
|
||||
<!-- These values are intentionally out of ordert to give an "ascending"
|
||||
<!-- These values are intentionally out of order to give an "ascending"
|
||||
view of the modes while allowing devices to easily omit the bias
|
||||
modes if they are not applicable or needed. These values correspond
|
||||
to the enumeration in PerformanceManager. -->
|
||||
@ -35,4 +35,29 @@
|
||||
<item>4</item>
|
||||
<item>2</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- LiveDisplay -->
|
||||
<string-array name="live_display_entries" translatable="false">
|
||||
<item>@string/live_display_auto</item>
|
||||
<item>@string/live_display_off</item>
|
||||
<item>@string/live_display_day</item>
|
||||
<item>@string/live_display_night</item>
|
||||
<item>@string/live_display_outdoor</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="live_display_summaries" translatable="false">
|
||||
<item>@string/live_display_auto_summary</item>
|
||||
<item>@string/live_display_off_summary</item>
|
||||
<item>@string/live_display_day_summary</item>
|
||||
<item>@string/live_display_night_summary</item>
|
||||
<item>@string/live_display_outdoor_summary</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="live_display_values" translatable="false">
|
||||
<item>2</item>
|
||||
<item>0</item>
|
||||
<item>4</item>
|
||||
<item>1</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
@ -51,4 +51,8 @@
|
||||
<integer name="config_proximityCheckTimeout">250</integer>
|
||||
<bool name="config_proximityCheckOnWakeEnabledByDefault">false</bool>
|
||||
|
||||
<!-- Default values for display color temperature -->
|
||||
<integer name="config_dayColorTemperature">6500</integer>
|
||||
<integer name="config_nightColorTemperature">4500</integer>
|
||||
<integer name="config_outdoorAmbientLux">9000</integer>
|
||||
</resources>
|
||||
|
@ -103,4 +103,18 @@
|
||||
<string name="perf_profile_bias_power">Efficiency</string>
|
||||
<string name="perf_profile_bias_perf">Quick</string>
|
||||
|
||||
<!-- LiveDisplay strings -->
|
||||
<string name="live_display_title" translatable="false">LiveDisplay</string>
|
||||
<string name="live_display_auto">Automatic</string>
|
||||
<string name="live_display_auto_summary">Automatically adjust color temperature of screen after sunset and sunrise</string>
|
||||
<string name="live_display_off">Off</string>
|
||||
<string name="live_display_off_summary">Disable all adjustments</string>
|
||||
<string name="live_display_day">Day</string>
|
||||
<string name="live_display_day_summary">Use day settings only</string>
|
||||
<string name="live_display_night">Night</string>
|
||||
<string name="live_display_night_summary">Use night settings only</string>
|
||||
<string name="live_display_outdoor">Outdoor (bright sun)</string>
|
||||
<string name="live_display_outdoor_summary">Use outdoor settings only</string>
|
||||
<string name="live_display_hint">LiveDisplay can help reduce eyestrain and help you sleep at night. Click here to try it out!</string>
|
||||
|
||||
</resources>
|
||||
|
@ -50,4 +50,23 @@
|
||||
<!-- Proximity check on screen on default -->
|
||||
<java-symbol type="bool" name="config_proximityCheckOnWakeEnabledByDefault" />
|
||||
|
||||
<!-- LiveDisplay -->
|
||||
<java-symbol type="string" name="live_display_title" />
|
||||
<java-symbol type="string" name="live_display_hint" />
|
||||
<java-symbol type="string" name="live_display_auto" />
|
||||
<java-symbol type="string" name="live_display_auto_summary" />
|
||||
<java-symbol type="string" name="live_display_day" />
|
||||
<java-symbol type="string" name="live_display_day_summary" />
|
||||
<java-symbol type="string" name="live_display_night" />
|
||||
<java-symbol type="string" name="live_display_night_summary" />
|
||||
<java-symbol type="string" name="live_display_outdoor" />
|
||||
<java-symbol type="string" name="live_display_outdoor_summary" />
|
||||
<java-symbol type="drawable" name="ic_livedisplay_notif" />
|
||||
|
||||
<java-symbol type="array" name="live_display_entries" />
|
||||
<java-symbol type="array" name="live_display_summaries" />
|
||||
<java-symbol type="array" name="live_display_values" />
|
||||
<java-symbol type="integer" name="config_dayColorTemperature" />
|
||||
<java-symbol type="integer" name="config_nightColorTemperature" />
|
||||
<java-symbol type="integer" name="config_outdoorAmbientLux" />
|
||||
</resources>
|
||||
|
@ -580,6 +580,59 @@ public class CMSettingsProvider extends ContentProvider {
|
||||
*/
|
||||
public static final String WIFI_AUTO_CONNECT_TYPE =
|
||||
CMSettings.System.WIFI_AUTO_CONNECT_TYPE;
|
||||
|
||||
/**
|
||||
* Color temperature of the display during the day
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_TEMPERATURE_DAY =
|
||||
CMSettings.System.DISPLAY_TEMPERATURE_DAY;
|
||||
|
||||
/**
|
||||
* Color temperature of the display at night
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_TEMPERATURE_NIGHT =
|
||||
CMSettings.System.DISPLAY_TEMPERATURE_NIGHT;
|
||||
|
||||
/**
|
||||
* Display color temperature adjustment mode, one of DAY (default), NIGHT, or AUTO.
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_TEMPERATURE_MODE =
|
||||
CMSettings.System.DISPLAY_TEMPERATURE_MODE;
|
||||
|
||||
/**
|
||||
* Automatic outdoor mode
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_AUTO_OUTDOOR_MODE =
|
||||
CMSettings.System.DISPLAY_AUTO_OUTDOOR_MODE;
|
||||
|
||||
/**
|
||||
* Use display power saving features such as CABC or CABL
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_LOW_POWER = CMSettings.System.DISPLAY_LOW_POWER;
|
||||
|
||||
/**
|
||||
* Use color enhancement feature of display
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_COLOR_ENHANCE = CMSettings.System.DISPLAY_COLOR_ENHANCE;
|
||||
|
||||
/**
|
||||
* Manual display color adjustments (RGB values as floats, separated by spaces)
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_COLOR_ADJUSTMENT =
|
||||
CMSettings.System.DISPLAY_COLOR_ADJUSTMENT;
|
||||
|
||||
/**
|
||||
* Did we tell about how they can stop breaking their eyes?
|
||||
* @hide
|
||||
*/
|
||||
public static final String LIVE_DISPLAY_HINTED = CMSettings.System.LIVE_DISPLAY_HINTED;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -664,6 +717,22 @@ public class CMSettingsProvider extends ContentProvider {
|
||||
CMSettings.System.DIALER_OPENCNAM_AUTH_TOKEN);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.WIFI_AUTO_CONNECT_TYPE,
|
||||
CMSettings.System.WIFI_AUTO_CONNECT_TYPE);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_TEMPERATURE_DAY,
|
||||
CMSettings.System.DISPLAY_TEMPERATURE_DAY);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_TEMPERATURE_NIGHT,
|
||||
CMSettings.System.DISPLAY_TEMPERATURE_NIGHT);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_TEMPERATURE_MODE,
|
||||
CMSettings.System.DISPLAY_TEMPERATURE_MODE);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_AUTO_OUTDOOR_MODE,
|
||||
CMSettings.System.DISPLAY_AUTO_OUTDOOR_MODE);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_LOW_POWER,
|
||||
CMSettings.System.DISPLAY_LOW_POWER);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_COLOR_ENHANCE,
|
||||
CMSettings.System.DISPLAY_COLOR_ENHANCE);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.DISPLAY_COLOR_ADJUSTMENT,
|
||||
CMSettings.System.DISPLAY_COLOR_ADJUSTMENT);
|
||||
systemToCmSettingsMap.put(LegacyCMSettings.LIVE_DISPLAY_HINTED,
|
||||
CMSettings.System.LIVE_DISPLAY_HINTED);
|
||||
|
||||
int rowsMigrated = migrateCMSettingsForTable(userId,
|
||||
CMDatabaseHelper.CMTableNames.TABLE_SYSTEM, systemToCmSettingsMap);
|
||||
|
@ -977,6 +977,55 @@ public final class CMSettings {
|
||||
* @hide
|
||||
*/
|
||||
public static final String WIFI_AUTO_CONNECT_TYPE = "wifi_auto_connect_type";
|
||||
|
||||
/**
|
||||
* Color temperature of the display during the day
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_TEMPERATURE_DAY = "display_temperature_day";
|
||||
|
||||
/**
|
||||
* Color temperature of the display at night
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_TEMPERATURE_NIGHT = "display_temperature_night";
|
||||
|
||||
/**
|
||||
* Display color temperature adjustment mode, one of DAY (default), NIGHT, or AUTO.
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_TEMPERATURE_MODE = "display_temperature_mode";
|
||||
|
||||
/**
|
||||
* Automatic outdoor mode
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_AUTO_OUTDOOR_MODE = "display_auto_outdoor_mode";
|
||||
|
||||
/**
|
||||
* Use display power saving features such as CABC or CABL
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_LOW_POWER = "display_low_power";
|
||||
|
||||
/**
|
||||
* Use color enhancement feature of display
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_COLOR_ENHANCE = "display_color_enhance";
|
||||
|
||||
/**
|
||||
* Manual display color adjustments (RGB values as floats, separated by spaces)
|
||||
* @hide
|
||||
*/
|
||||
public static final String DISPLAY_COLOR_ADJUSTMENT = "display_color_adjustment";
|
||||
|
||||
/**
|
||||
* Did we tell about how they can stop breaking their eyes?
|
||||
* @hide
|
||||
*/
|
||||
public static final String LIVE_DISPLAY_HINTED = "live_display_hinted";
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user