diff options
| author | 2012-10-07 15:40:00 -0700 | |
|---|---|---|
| committer | 2012-10-07 16:04:37 -0700 | |
| commit | db43f4722de6e5635c55a063a709b489e7ff27a6 (patch) | |
| tree | 46241ada5ee900faa79982c467c44021ef16f5a0 | |
| parent | b52b6bf138c9aa5e986c8be95fcd23448792a078 (diff) | |
QuickSettings - fail gracefully if we can't query the profile data
Fix a bug where QuickSettings couldn't get the user info tile data
when starting up encrypted. Since the system will be restarted once
the password is entered, it will be loaded properly once unlocked.
Bug 7301192
Change-Id: I6455df1d2bc33d375a1af8f2efb42dbdeb38f056
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java index f981eeb89120..2e298d1b5ab4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java @@ -207,6 +207,11 @@ class QuickSettings { Profile.CONTENT_URI, new String[] {Phone._ID, Phone.DISPLAY_NAME}, null, null, null); + if (cursor == null) { + // Info not available. Should become available later. + return new Pair<String, BitmapDrawable>(null, null); + } + String name = null; try { if (cursor.moveToFirst()) { |