Skip to content

Commit db43f47

Browse files
committed
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
1 parent b52b6bf commit db43f47

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ protected Pair<String, BitmapDrawable> doInBackground(Void... params) {
207207
Profile.CONTENT_URI, new String[] {Phone._ID, Phone.DISPLAY_NAME},
208208
null, null, null);
209209

210+
if (cursor == null) {
211+
// Info not available. Should become available later.
212+
return new Pair<String, BitmapDrawable>(null, null);
213+
}
214+
210215
String name = null;
211216
try {
212217
if (cursor.moveToFirst()) {

0 commit comments

Comments
 (0)