field public static final int colorControlHighlight = 16843820; // 0x101042c
field public static final int colorControlNormal = 16843817; // 0x1010429
field public static final int colorEdgeEffect = 16843982; // 0x10104ce
+ field public static final int colorError = 16844100; // 0x1010544
field public static final int colorFocusedHighlight = 16843663; // 0x101038f
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
field public static final int textCheckMarkInverse = 16842823; // 0x1010047
field public static final int textColor = 16842904; // 0x1010098
field public static final int textColorAlertDialogListItem = 16843526; // 0x1010306
- field public static final int textColorError = 16844100; // 0x1010544
field public static final int textColorHighlight = 16842905; // 0x1010099
field public static final int textColorHighlightInverse = 16843599; // 0x101034f
field public static final int textColorHint = 16842906; // 0x101009a
field public static final int colorControlHighlight = 16843820; // 0x101042c
field public static final int colorControlNormal = 16843817; // 0x1010429
field public static final int colorEdgeEffect = 16843982; // 0x10104ce
+ field public static final int colorError = 16844100; // 0x1010544
field public static final int colorFocusedHighlight = 16843663; // 0x101038f
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
field public static final int textCheckMarkInverse = 16842823; // 0x1010047
field public static final int textColor = 16842904; // 0x1010098
field public static final int textColorAlertDialogListItem = 16843526; // 0x1010306
- field public static final int textColorError = 16844100; // 0x1010544
field public static final int textColorHighlight = 16842905; // 0x1010099
field public static final int textColorHighlightInverse = 16843599; // 0x101034f
field public static final int textColorHint = 16842906; // 0x101009a
field public static final int colorControlHighlight = 16843820; // 0x101042c
field public static final int colorControlNormal = 16843817; // 0x1010429
field public static final int colorEdgeEffect = 16843982; // 0x10104ce
+ field public static final int colorError = 16844100; // 0x1010544
field public static final int colorFocusedHighlight = 16843663; // 0x101038f
field public static final int colorForeground = 16842800; // 0x1010030
field public static final int colorForegroundInverse = 16843270; // 0x1010206
field public static final int textCheckMarkInverse = 16842823; // 0x1010047
field public static final int textColor = 16842904; // 0x1010098
field public static final int textColorAlertDialogListItem = 16843526; // 0x1010306
- field public static final int textColorError = 16844100; // 0x1010544
field public static final int textColorHighlight = 16842905; // 0x1010099
field public static final int textColorHighlightInverse = 16843599; // 0x101034f
field public static final int textColorHint = 16842906; // 0x101009a
public LockPatternView(Context context, AttributeSet attrs) {
super(context, attrs);
- TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LockPatternView);
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LockPatternView,
+ R.attr.lockPatternStyle, R.style.Widget_LockPatternView);
final String aspect = a.getString(R.styleable.LockPatternView_aspect);
mPathPaint.setAntiAlias(true);
mPathPaint.setDither(true);
- mRegularColor = context.getColor(R.color.lock_pattern_view_regular_color);
- mErrorColor = context.getColor(R.color.lock_pattern_view_error_color);
- mSuccessColor = context.getColor(R.color.lock_pattern_view_success_color);
- mRegularColor = a.getColor(R.styleable.LockPatternView_regularColor, mRegularColor);
- mErrorColor = a.getColor(R.styleable.LockPatternView_errorColor, mErrorColor);
- mSuccessColor = a.getColor(R.styleable.LockPatternView_successColor, mSuccessColor);
+ mRegularColor = a.getColor(R.styleable.LockPatternView_regularColor, 0);
+ mErrorColor = a.getColor(R.styleable.LockPatternView_errorColor, 0);
+ mSuccessColor = a.getColor(R.styleable.LockPatternView_successColor, 0);
int pathColor = a.getColor(R.styleable.LockPatternView_pathColor, mRegularColor);
mPathPaint.setColor(pathColor);
android:layout_alignParentStart="true"
android:layout_alignBottom="@+id/perm_money_label"
android:scaleType="fitCenter"
- android:tint="@color/perms_costs_money"
+ android:tint="?android:attr/colorError"
android:tintMode="src_in"
android:src="@android:drawable/ic_coins_s" />
<TextView
android:id="@+id/perm_money_label"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textSize="16sp"
- android:textColor="@color/perms_costs_money"
+ android:textColor="?android:attr/colorError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@id/perm_money_icon"
android:layout_height="wrap_content"
android:layout_below="@id/input_hour"
android:layout_alignStart="@id/input_hour"
- android:textColor="?attr/textColorError"
+ android:textColor="?attr/colorError"
android:text="@string/time_picker_input_error" />
</RelativeLayout>
<Spinner
android:layout_alignBaseline="@id/input_block"
android:layout_alignParentEnd="true"/>
-</merge>
\ No newline at end of file
+</merge>
<attr name="primaryContentAlpha" format="float" />
<!-- The alpha applied to the foreground color to create the secondary text color. -->
<attr name="secondaryContentAlpha" format="float" />
+ <!-- Color used for error states and things that need to be drawn to
+ the users attention.. -->
+ <attr name="colorError" format="reference|color" />
<!-- Default background dim amount when a menu, dialog, or something similar pops up. -->
<attr name="backgroundDimAmount" format="float" />
<!-- Control whether dimming behind the window is enabled. The default
<!-- Color of list item text in alert dialogs. -->
<attr name="textColorAlertDialogListItem" format="reference|color" />
- <!-- Text color for errors. -->
- <attr name="textColorError" format="reference|color" />
-
<!-- Search widget more corpus result item background. -->
<attr name="searchWidgetCorpusItemBackground" format="reference|color" />
<attr name="reverseLayout" format="boolean" />
<attr name="stackFromEnd" format="boolean" />
</declare-styleable>
+
+ <attr name="lockPatternStyle" format="reference" />
</resources>
<drawable name="input_method_fullscreen_background">#fff9f9f9</drawable>
<color name="input_method_navigation_guard">#ff000000</color>
- <color name="system_error">#fff4511e</color> <!-- deep orange 600 -->
-
<!-- For date picker widget -->
<drawable name="selected_day_background">#ff0092f4</drawable>
<color name="perms_dangerous_grp_color">#33b5e5</color>
<color name="perms_dangerous_perm_color">#33b5e5</color>
<color name="shadow">#cc222222</color>
- <color name="perms_costs_money">#fff4511e</color>
<!-- For search-related UIs -->
<color name="search_url_text_normal">#7fa87f</color>
<!-- LockPatternView -->
<color name="lock_pattern_view_regular_color">#ffffffff</color>
<color name="lock_pattern_view_success_color">#ffffffff</color>
- <color name="lock_pattern_view_error_color">@color/system_error</color>
<!-- FaceLock -->
<color name="facelock_spotlight_mask">#CC000000</color>
<color name="accessibility_focus_highlight">#bf39b500</color>
<color name="system_notification_accent_color">#ff607D8B</color>
- <color name="battery_saver_mode_color">#fff4511e</color><!-- deep orange 600 -->
<!-- Default user icon colors -->
<color name="user_icon_1">#ff00bcd4</color><!-- cyan 500 -->
<color name="button_material_dark">#ff5a595b</color>
<color name="button_material_light">#ffd6d7d7</color>
+ <color name="error_color_material">#F4511E</color>
<color name="switch_thumb_normal_material_dark">#ffbdbdbd</color>
<color name="switch_thumb_normal_material_light">#fff1f1f1</color>
<!-- 70% white -->
<color name="secondary_text_default_material_dark">#b3ffffff</color>
- <color name="error_text_material_light">@color/material_red_A700</color>
- <color name="error_text_material_dark">@color/material_red_A100</color>
-
<item name="hint_alpha_material_dark" format="float" type="dimen">0.50</item>
<item name="hint_alpha_material_light" format="float" type="dimen">0.38</item>
<public name="targetProcess" />
<public name="nextClusterForward" />
<public name="__removed1" />
- <public name="textColorError" />
+ <public name="colorError" />
<public name="focusedByDefault" />
<public name="appCategory" />
<public name="autoSizeMaxTextSize" />
<item name="padding">16dp</item>
</style>
+ <style name="Widget.LockPatternView">
+ <item name="regularColor">@color/lock_pattern_view_regular_color</item>
+ <item name="errorColor">?attr/colorError</item>
+ <item name="successColor">@color/lock_pattern_view_success_color</item>
+ </style>
+
</resources>
<java-symbol type="drawable" name="btn_check_off" />
<java-symbol type="color" name="lock_pattern_view_regular_color" />
<java-symbol type="color" name="lock_pattern_view_success_color" />
- <java-symbol type="color" name="lock_pattern_view_error_color" />
<java-symbol type="dimen" name="lock_pattern_dot_line_width" />
<java-symbol type="dimen" name="lock_pattern_dot_size" />
<java-symbol type="dimen" name="lock_pattern_dot_size_activated" />
<java-symbol type="layout" name="select_dialog_singlechoice_material" />
<java-symbol type="layout" name="select_dialog_multichoice_material" />
<java-symbol type="array" name="no_ems_support_sim_operators" />
- <java-symbol type="color" name="battery_saver_mode_color" />
<java-symbol type="color" name="system_notification_accent_color" />
<java-symbol type="dimen" name="text_handle_min_size" />
<java-symbol type="id" name="transitionTransform" />
<java-symbol type="string" name="alert_windows_notification_message" />
<java-symbol type="string" name="alert_windows_notification_turn_off_action" />
<java-symbol type="drawable" name="alert_window_layer" />
+ <java-symbol type="style" name="Widget.LockPatternView" />
+ <java-symbol type="attr" name="lockPatternStyle" />
<!-- Colon separated list of package names that should be granted Notification Listener access -->
<java-symbol type="string" name="config_defaultListenerAccessPackages" />
<item name="colorControlHighlight">@color/legacy_button_pressed</item>
<item name="colorButtonNormal">@color/legacy_button_normal</item>
<item name="colorEdgeEffect">?attr/colorPrimary</item>
+ <item name="colorError">@color/red</item>
<item name="disabledAlpha">0.5</item>
<item name="backgroundDimAmount">0.6</item>
<item name="textColorLink">@color/link_text_dark</item>
<item name="textColorLinkInverse">@color/link_text_light</item>
<item name="textColorAlertDialogListItem">@color/primary_text_light_disable_only</item>
- <item name="textColorError">@color/red</item>
<item name="textAppearanceLarge">@style/TextAppearance.Large</item>
<item name="textAppearanceMedium">@style/TextAppearance.Medium</item>
<item name="primaryContentAlpha">@dimen/primary_content_alpha_material_dark</item>
<item name="secondaryContentAlpha">@dimen/secondary_content_alpha_material_dark</item>
<item name="backgroundDimAmount">0.6</item>
+ <item name="colorError">@color/error_color_material</item>
<!-- Text styles -->
<item name="textAppearance">@style/TextAppearance.Material</item>
<item name="textColorLinkInverse">?attr/colorAccent</item>
<item name="textColorSearchUrl">@color/search_url_text_material_dark</item>
<item name="textColorAlertDialogListItem">@color/primary_text_material_dark</item>
- <item name="textColorError">@color/error_text_material_dark</item>
<item name="textAppearanceLarge">@style/TextAppearance.Material.Large</item>
<item name="textAppearanceLargeInverse">@style/TextAppearance.Material.Large.Inverse</item>
<item name="textColorLinkInverse">?attr/colorAccent</item>
<item name="textColorSearchUrl">@color/search_url_text_material_light</item>
<item name="textColorAlertDialogListItem">@color/primary_text_material_light</item>
- <item name="textColorError">@color/error_text_material_light</item>
<item name="textAppearanceLarge">@style/TextAppearance.Material.Large</item>
<item name="textAppearanceLargeInverse">@style/TextAppearance.Material.Large.Inverse</item>
<item name="textColorHighlightInverse">@color/highlighted_text_material</item>
<item name="textColorSearchUrl">@color/search_url_text_material_light</item>
<item name="textColorAlertDialogListItem">@color/primary_text_material_light</item>
- <item name="textColorError">@color/error_text_material_light</item>
<item name="textCheckMark">@drawable/indicator_check_mark_light</item>
<item name="textCheckMarkInverse">@drawable/indicator_check_mark_dark</item>
<item name="textColorHighlightInverse">@color/highlighted_text_material</item>
<item name="textColorSearchUrl">@color/search_url_text_material_dark</item>
<item name="textColorAlertDialogListItem">@color/primary_text_material_dark</item>
- <item name="textColorError">@color/error_text_material_dark</item>
<item name="textCheckMark">@drawable/indicator_check_mark_dark</item>
<item name="textCheckMarkInverse">@drawable/indicator_check_mark_light</item>
<item>100</item>
</array>
<array name="batterymeter_color_values">
- <item>@*android:color/battery_saver_mode_color</item>
+ <item>?android:attr/colorError</item>
<item>@android:color/white</item>
</array>
<array name="batterymeter_bolt_points">
@ColorInt
public static int getColorError(Context context) {
- TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.textColorError});
- @ColorInt int colorError = ta.getColor(0, 0);
- ta.recycle();
- return colorError;
+ return getColorAttr(context, android.R.attr.colorError);
}
@ColorInt
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
-import android.provider.Settings;
+import android.util.TypedValue;
+
import com.android.settingslib.R;
import com.android.settingslib.Utils;
final int N = levels.length();
mColors = new int[2 * N];
- for (int i = 0; i < N; i++) {
+ for (int i=0; i < N; i++) {
mColors[2 * i] = levels.getInt(i, 0);
- mColors[2 * i + 1] = colors.getColor(i, 0);
+ if (colors.getType(i) == TypedValue.TYPE_ATTRIBUTE) {
+ mColors[2 * i + 1] = Utils.getColorAttr(context, colors.getResourceId(i, 0));
+ } else {
+ mColors[2 * i + 1] = colors.getColor(i, 0);
+ }
}
levels.recycle();
colors.recycle();
android:viewportWidth="32.0"
android:viewportHeight="32.0">
<path
- android:fillColor="@color/system_warning_color"
+ android:fillColor="?android:attr/colorError"
android:pathData="M15.99,2.5C8.53,2.5 2.5,8.54 2.5,16.0s6.03,13.5 13.49,13.5S29.5,23.46 29.5,16.0S23.45,2.5 15.99,2.5zM16.0,26.8c-5.97,0.0 -10.8,-4.83 -10.8,-10.8S10.03,5.2 16.0,5.2S26.8,10.03 26.8,16.0S21.97,26.8 16.0,26.8z"/>
<path
- android:fillColor="@color/system_warning_color"
+ android:fillColor="?android:attr/colorError"
android:pathData="M14.65,20.05l2.7,0.0l0.0,2.7l-2.7,0.0z"/>
<path
- android:fillColor="@color/system_warning_color"
+ android:fillColor="?android:attr/colorError"
android:pathData="M14.65,9.25l2.7,0.0l0.0,8.1l-2.7,0.0z"/>
</vector>
<path
android:name="path_2"
android:pathData="M 1.35900878906,6.76104736328 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-2.69995117188 0.0,-2.69995117188 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,2.69995117188 0.0,2.69995117188 Z"
- android:fillColor="@*android:color/system_error" />
+ android:fillColor="?android:attr/colorError" />
<path
android:name="path_1"
android:pathData="M 1.35363769531,1.36633300781 c 0.0,0.0 -2.69998168945,0.0 -2.69998168945,0.0 c 0.0,0.0 0.0,-8.09997558594 0.0,-8.09997558594 c 0.0,0.0 2.69998168945,0.0 2.69998168945,0.0 c 0.0,0.0 0.0,8.09997558594 0.0,8.09997558594 Z"
- android:fillColor="@*android:color/system_error" />
+ android:fillColor="?android:attr/colorError" />
</group>
</group>
<group
<path
android:name="path_3"
android:pathData="M 0.0101470947266,10.8087768555 c -5.96701049805,0.0 -10.8000183105,-4.8330078125 -10.8000183105,-10.8000488281 c 0.0,-5.96691894531 4.8330078125,-10.7999267578 10.8000183105,-10.7999267578 c 5.96697998047,0.0 10.799987793,4.8330078125 10.799987793,10.7999267578 c 0.0,5.96704101562 -4.8330078125,10.8000488281 -10.799987793,10.8000488281 Z"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="2"
android:trimPathStart="0"
android:trimPathEnd="1" />
<path
android:name="ridge_5_path_0"
android:pathData="M -25.3591003418,-24.4138946533 c -0.569000244141,0.106399536133 -1.12660217285,0.140594482422 -1.45460510254,0.140594482422 c -1.29689025879,0.0 -2.53239440918,-0.343307495117 -3.62019348145,-1.12400817871 c -1.67700195312,-1.20349121094 -2.76950073242,-3.17008972168 -2.76950073242,-5.39189147949"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="1.45"
android:strokeLineCap="round"
android:trimPathEnd="0" />
<path
android:name="ridge_7_path_0"
android:pathData="M -36.1409912109,-21.7843475342 c -1.00540161133,-1.19300842285 -1.57499694824,-1.9181060791 -2.36520385742,-3.50170898438 c -0.827560424805,-1.65869140625 -1.31352233887,-3.49159240723 -1.31352233887,-5.48489379883 c 0.0,-3.66279602051 2.96932983398,-6.63220214844 6.63221740723,-6.63220214844 c 3.6628112793,0.0 6.63220214844,2.96940612793 6.63220214844,6.63220214844"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="1.45"
android:strokeLineCap="round"
android:trimPathEnd="0" />
<path
android:name="ridge_6_path_0"
android:pathData="M -42.1907958984,-25.6756896973 c -0.758117675781,-2.14370727539 -0.896545410156,-3.86891174316 -0.896545410156,-5.12921142578 c 0.0,-1.46069335938 0.249176025391,-2.84799194336 0.814682006836,-4.09748840332 c 1.56153869629,-3.45030212402 5.03434753418,-5.85076904297 9.0679473877,-5.85076904297 c 5.49430847168,0.0 9.94830322266,4.4539642334 9.94830322266,9.94825744629 c 0.0,1.83151245117 -1.48460388184,3.31610107422 -3.31610107422,3.31610107422 c -1.83149719238,0.0 -3.31610107422,-1.48469543457 -3.31610107422,-3.31610107422 c 0.0,-1.83139038086 -1.48458862305,-3.31610107422 -3.31610107422,-3.31610107422 c -1.83149719238,0.0 -3.31610107422,1.48471069336 -3.31610107422,3.31610107422 c 0.0,2.57020568848 0.989517211914,4.88710021973 2.60510253906,6.5865020752 c 1.22210693359,1.28550720215 2.43139648438,2.09950256348 4.47590637207,2.69030761719"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="1.45"
android:strokeLineCap="round"
android:trimPathEnd="0" />
<path
android:name="ridge_2_path_0"
android:pathData="M -44.0646514893,-38.1672973633 c 1.19026184082,-1.77430725098 2.67503356934,-3.24531555176 4.55902099609,-4.27278137207 c 1.88395690918,-1.0274810791 4.04466247559,-1.61137390137 6.34175109863,-1.61137390137 c 2.28761291504,0.0 4.43991088867,0.579071044922 6.31831359863,1.59861755371 c 1.8784942627,1.01954650879 3.36059570312,2.4796295166 4.55279541016,4.24153137207"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="1.45"
android:strokeLineCap="round"
android:trimPathStart="1" />
<path
android:name="ridge_1_path_0"
android:pathData="M 71.7812347412,97.0507202148 c -2.27149963379,-1.31344604492 -4.71360778809,-2.07006835938 -7.56221008301,-2.07006835938 c -2.84869384766,0.0 -5.23320007324,0.779556274414 -7.34411621094,2.07006835938"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="1.45"
android:strokeLineCap="round"
android:trimPathEnd="0" />
<path
android:name="path_2"
android:pathData="M -1.3705291748,4.06730651855 c 0.0,0.0 0.036376953125,-0.0102386474609 0.036376953125,-0.0102386474609 c 0.0,0.0 -0.00682067871094,0.0040283203125 -0.00682067871093,0.0040283203125 c 0.0,0.0 -0.0161437988281,0.00479125976562 -0.0161437988281,0.00479125976563 c 0.0,0.0 -0.0134124755859,0.00141906738281 -0.0134124755859,0.00141906738281 Z"
- android:fillColor="@*android:color/system_error" />
+ android:fillColor="?android:attr/colorError" />
<path
android:name="path_1"
android:pathData="M -1.3737487793,-6.77532958984 c 0.0,0.0 0.00604248046875,0.0166625976562 0.00604248046876,0.0166625976562 c 0.0,0.0 0.0213623046875,0.0250244140625 0.0213623046875,0.0250244140625 c 0.0,0.0 -0.00604248046875,-0.0166625976562 -0.00604248046876,-0.0166625976562 c 0.0,0.0 -0.0213623046875,-0.0250244140625 -0.0213623046875,-0.0250244140625 Z"
- android:fillColor="@*android:color/system_error" />
+ android:fillColor="?android:attr/colorError" />
</group>
</group>
<group
<path
android:name="path_3"
android:pathData="M 0.0101470947266,10.8087768555 c -5.96701049805,0.0 -10.8000183105,-4.8330078125 -10.8000183105,-10.8000488281 c 0.0,-5.96691894531 4.8330078125,-10.7999267578 10.8000183105,-10.7999267578 c 5.96697998047,0.0 10.799987793,4.8330078125 10.799987793,10.7999267578 c 0.0,5.96704101562 -4.8330078125,10.8000488281 -10.799987793,10.8000488281 Z"
- android:strokeColor="@*android:color/system_error"
+ android:strokeColor="?android:attr/colorError"
android:strokeWidth="2"
android:trimPathStart="1" />
</group>
<color name="notification_list_shadow_top">#80000000</color>
<drawable name="heads_up_notification_bg_pressed">#ff33B5E5</drawable>
<color name="qs_batterymeter_frame_color">#FF404040</color>
- <color name="system_warning_color">@*android:color/system_error</color>
<color name="qs_tile_divider">#29ffffff</color><!-- 16% white -->
<color name="qs_subhead">#99FFFFFF</color><!-- 60% white -->
<color name="qs_detail_button">@*android:color/quaternary_device_default_settings</color>
<!-- Recents theme -->
<style name="RecentsTheme.Wallpaper">
- <item name="android:windowBackground">@color/transparent</item>
+ <item name="android:windowBackground">@*android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:windowDisablePreview">true</item>
<!-- Theme used for the activity that shows when the system forced an app to be resizable -->
<style name="ForcedResizableTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
<item name="android:windowBackground">@drawable/forced_resizable_background</item>
- <item name="android:statusBarColor">@color/transparent</item>
+ <item name="android:statusBarColor">@*android:color/transparent</item>
<item name="android:windowAnimationStyle">@style/Animation.ForcedResizable</item>
</style>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowBackground">@null</item>
<item name="android:colorBackgroundCacheHint">@null</item>
- <item name="android:statusBarColor">@color/transparent</item>
+ <item name="android:statusBarColor">@*android:color/transparent</item>
<item name="android:windowAnimationStyle">@style/Animation.PipPhoneOverlayControl</item>
</style>
<style name="TextAppearance.QS.Warning">
<item name="android:textSize">14sp</item>
- <item name="android:textColor">@color/system_warning_color</item>
+ <item name="android:textColor">?android:attr/colorError</item>
</style>
<style name="TextAppearance.QS.DetailButton">
</style>
<style name="TextAppearance.NotificationGuts.SecondaryWarning">
- <item name="android:textColor">@color/system_warning_color</item>
+ <item name="android:textColor">?android:attr/colorError</item>
<item name="android:textSize">12sp</item>
</style>
import android.util.Slog;
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.settingslib.Utils;
import com.android.systemui.R;
import com.android.systemui.SystemUI;
import com.android.systemui.statusbar.phone.StatusBar;
.setOnlyAlertOnce(true)
.setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING))
.setVisibility(Notification.VISIBILITY_PUBLIC)
- .setColor(mContext.getColor(
- com.android.internal.R.color.battery_saver_mode_color));
+ .setColor(Utils.getColorAttr(mContext, android.R.attr.colorError));
if (hasBatterySettings()) {
nb.setContentIntent(pendingBroadcast(ACTION_SHOW_BATTERY_SETTINGS));
}
.setVisibility(Notification.VISIBILITY_PUBLIC)
.setContentIntent(pendingBroadcast(ACTION_CLICKED_TEMP_WARNING))
.setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_TEMP_WARNING))
- .setColor(mContext.getColor(
- com.android.internal.R.color.battery_saver_mode_color));
+ .setColor(Utils.getColorAttr(mContext, android.R.attr.colorError));
SystemUI.overrideNotificationAppName(mContext, nb);
final Notification n = nb.build();
mNoMan.notifyAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP, n, UserHandle.ALL);
formatBytes(info.usageLevel));
bottom = res.getString(R.string.quick_settings_cellular_detail_data_limit,
formatBytes(info.limitLevel));
- usageColor = mContext.getColor(R.color.system_warning_color);
+ usageColor = Utils.getDefaultColor(mContext, android.R.attr.colorError);
}
if (usageColor == 0) {
import com.android.internal.app.IBatteryStats;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
+import com.android.settingslib.Utils;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.statusbar.phone.KeyguardIndicationTextView;
if (!updateMonitor.isUnlockingWithFingerprintAllowed()) {
return;
}
- int errorColor = mContext.getResources().getColor(R.color.system_warning_color, null);
+ int errorColor = Utils.getColorError(mContext);
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
mStatusBarKeyguardViewManager.showBouncerMessage(helpString, errorColor);
} else if (updateMonitor.isDeviceInteractive()
|| msgId == FingerprintManager.FINGERPRINT_ERROR_CANCELED) {
return;
}
- int errorColor = mContext.getResources().getColor(R.color.system_warning_color, null);
+ int errorColor = Utils.getColorError(mContext);
if (mStatusBarKeyguardViewManager.isBouncerShowing()) {
// When swiping up right after receiving a fingerprint error, the bouncer calls
// authenticate leading to the same message being shown again on the bouncer.
@Override
public void onScreenTurnedOn() {
if (mMessageToShowOnScreenOn != null) {
- int errorColor = mContext.getResources().getColor(R.color.system_warning_color,
- null);
+ int errorColor = Utils.getColorError(mContext);
showTransientIndication(mMessageToShowOnScreenOn, errorColor);
// We want to keep this message around in case the screen was off
mHandler.removeMessages(MSG_HIDE_TRANSIENT);
import android.util.Log;
import android.view.View;
+import com.android.settingslib.Utils;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
mSemiTransparent = context.getColor(
com.android.internal.R.color.system_bar_background_semi_transparent);
mTransparent = context.getColor(R.color.system_bar_background_transparent);
- mWarning = context.getColor(com.android.internal.R.color.battery_saver_mode_color);
+ mWarning = Utils.getColorAttr(context, android.R.attr.colorError);
}
mGradient = context.getDrawable(gradientResourceId);
}