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
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 f981eeb..2e298d1 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 @@
                         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()) {