Skip to content

Commit 96a8bb6

Browse files
Jim MillerAndroid (Google) Code Review
authored andcommitted
Merge "Fix crash caused by null owner info Fixes bug 7249550" into jb-mr1-dev
2 parents 9aacd50 + 36c37a0 commit 96a8bb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardStatusViewManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private void updateOwnerInfo() {
184184
Settings.Secure.LOCK_SCREEN_OWNER_INFO_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
185185
String text = Settings.Secure.getStringForUser(res, Settings.Secure.LOCK_SCREEN_OWNER_INFO,
186186
UserHandle.USER_CURRENT);
187-
text = text.trim(); // Remove trailing newlines
187+
text = text != null ? text.trim() : null; // Remove trailing newlines
188188
if (ownerInfoEnabled && !TextUtils.isEmpty(text)) {
189189
maybeSetUpperCaseText(mOwnerInfoView, text);
190190
mOwnerInfoView.setVisibility(View.VISIBLE);

0 commit comments

Comments
 (0)