diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-04-28 12:21:57 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-28 12:21:57 +0000 |
commit | 46da668b1341da12664a65b5a54eed40ed890a66 (patch) | |
tree | 8b56ba926fcbe09e0ed705079180ef7f39f9eb07 /packages/Keyguard | |
parent | 370ff853fa14c0e407ba107dc456223e3daf52b0 (diff) | |
parent | b039603867176c01c84ec1cbae681cb9868a4525 (diff) | |
download | frameworks_base-46da668b1341da12664a65b5a54eed40ed890a66.zip frameworks_base-46da668b1341da12664a65b5a54eed40ed890a66.tar.gz frameworks_base-46da668b1341da12664a65b5a54eed40ed890a66.tar.bz2 |
am 3daa96f4: Merge "Add carrier text on lockscreen in top left corner."
* commit '3daa96f406d2cb46b55d71c696ce81656a7a2682':
Add carrier text on lockscreen in top left corner.
Diffstat (limited to 'packages/Keyguard')
-rw-r--r-- | packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml | 4 | ||||
-rw-r--r-- | packages/Keyguard/res/values/attrs.xml | 4 | ||||
-rw-r--r-- | packages/Keyguard/src/com/android/keyguard/CarrierText.java | 10 |
3 files changed, 16 insertions, 2 deletions
diff --git a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml index b4847f0..b2d0219 100644 --- a/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml +++ b/packages/Keyguard/res/layout/keyguard_emergency_carrier_area.xml @@ -20,6 +20,7 @@ <!-- This contains emergency call button and carrier as shared by pin/pattern/password screens --> <com.android.keyguard.EmergencyCarrierArea xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:androidprv="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" @@ -35,7 +36,8 @@ android:ellipsize="marquee" android:textAppearance="?android:attr/textAppearanceMedium" android:textSize="@dimen/kg_status_line_font_size" - android:textColor="?android:attr/textColorSecondary" /> + android:textColor="?android:attr/textColorSecondary" + androidprv:allCaps="@bool/kg_use_all_caps" /> <LinearLayout android:layout_width="match_parent" diff --git a/packages/Keyguard/res/values/attrs.xml b/packages/Keyguard/res/values/attrs.xml index e045dd2..2410b6a 100644 --- a/packages/Keyguard/res/values/attrs.xml +++ b/packages/Keyguard/res/values/attrs.xml @@ -133,4 +133,8 @@ <attr name="digit" format="integer" /> <attr name="textView" format="reference" /> </declare-styleable> + + <declare-styleable name="CarrierText"> + <attr name="allCaps" format="boolean" /> + </declare-styleable> </resources> diff --git a/packages/Keyguard/src/com/android/keyguard/CarrierText.java b/packages/Keyguard/src/com/android/keyguard/CarrierText.java index 88558cd..05f2962 100644 --- a/packages/Keyguard/src/com/android/keyguard/CarrierText.java +++ b/packages/Keyguard/src/com/android/keyguard/CarrierText.java @@ -17,6 +17,7 @@ package com.android.keyguard; import android.content.Context; +import android.content.res.TypedArray; import android.text.method.SingleLineTransformationMethod; import android.text.TextUtils; import android.util.AttributeSet; @@ -81,7 +82,14 @@ public class CarrierText extends TextView { public CarrierText(Context context, AttributeSet attrs) { super(context, attrs); mLockPatternUtils = new LockPatternUtils(mContext); - boolean useAllCaps = mContext.getResources().getBoolean(R.bool.kg_use_all_caps); + boolean useAllCaps; + TypedArray a = context.getTheme().obtainStyledAttributes( + attrs, R.styleable.CarrierText, 0, 0); + try { + useAllCaps = a.getBoolean(R.styleable.CarrierText_allCaps, false); + } finally { + a.recycle(); + } setTransformationMethod(new CarrierTextTransformationMethod(mContext, useAllCaps)); } |