Skip to content

Commit 7a8cce3

Browse files
author
Jeff Brown
committed
Handle case where user info might not be available.
The CursorLoader can return a null cursor if the query failed for some reason. This may happen in certain states where the provider is not available. Bug: 7133411 Change-Id: Id7b383bca45a61bc8726ba9f6115cbbc07e5d0b4
1 parent 47b2efc commit 7a8cce3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ private void queryForUserInformation() {
404404
@Override
405405
public void onLoadComplete(Loader<Cursor> loader,
406406
Cursor cursor) {
407-
if (cursor.moveToFirst()) {
407+
if (cursor != null && cursor.moveToFirst()) {
408408
String name = cursor.getString(0); // DISPLAY_NAME
409409
mModel.setUserTileInfo(name);
410410
/*

0 commit comments

Comments
 (0)