Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a8cce3d authored by Jeff Brown's avatar Jeff Brown
Browse files

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
parent 47b2efc7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -404,7 +404,7 @@ class QuickSettings {
                    @Override
                    @Override
                    public void onLoadComplete(Loader<Cursor> loader,
                    public void onLoadComplete(Loader<Cursor> loader,
                            Cursor cursor) {
                            Cursor cursor) {
                        if (cursor.moveToFirst()) {
                        if (cursor != null && cursor.moveToFirst()) {
                            String name = cursor.getString(0); // DISPLAY_NAME
                            String name = cursor.getString(0); // DISPLAY_NAME
                            mModel.setUserTileInfo(name);
                            mModel.setUserTileInfo(name);
                            /*
                            /*