diff options
author | Jim Miller <jaggies@google.com> | 2011-08-04 23:26:48 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-04 23:26:48 -0700 |
commit | adff7fa2f6b4f5e0c594f62b8bb42db9147cb8dd (patch) | |
tree | 4755013bd184a56e31edb91446f57fbad24b431e /policy | |
parent | f35ed373214d2bc450ea490e87a41af1acb3ed95 (diff) | |
parent | e0c2d8e5d4551f4d31c7129fb2062011b41e8ddd (diff) | |
download | frameworks_base-adff7fa2f6b4f5e0c594f62b8bb42db9147cb8dd.zip frameworks_base-adff7fa2f6b4f5e0c594f62b8bb42db9147cb8dd.tar.gz frameworks_base-adff7fa2f6b4f5e0c594f62b8bb42db9147cb8dd.tar.bz2 |
Merge "Fix 5117544: Fix crash in KeyguardStatusViewManager when resId==0"
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java index 7a14480..21a8c14 100644 --- a/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java +++ b/policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java @@ -232,10 +232,14 @@ class KeyguardStatusViewManager implements OnClickListener { * @param resId resource id of the message */ public void setCarrierHelpText(int resId) { - mCarrierHelpText = getContext().getText(resId); + mCarrierHelpText = getText(resId); update(CARRIER_HELP_TEXT, mCarrierHelpText); } + private CharSequence getText(int resId) { + return resId == 0 ? null : getContext().getText(resId); + } + /** * Unlock help message. This is typically for help with unlock widgets, e.g. "wrong password" * or "try again." @@ -244,7 +248,7 @@ class KeyguardStatusViewManager implements OnClickListener { * @param lockIcon */ public void setHelpMessage(int textResId, int lockIcon) { - mHelpMessageText = getContext().getString(textResId); + mHelpMessageText = getText(textResId).toString(); update(HELP_MESSAGE_TEXT, mHelpMessageText); } |