From db43f4722de6e5635c55a063a709b489e7ff27a6 Mon Sep 17 00:00:00 2001 From: Adam Powell Date: Sun, 7 Oct 2012 15:40:00 -0700 Subject: [PATCH] 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 --- .../com/android/systemui/statusbar/phone/QuickSettings.java | 5 +++++ 1 file changed, 5 insertions(+) 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 f981eeb891204..2e298d1b5ab43 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(null, null); + } + String name = null; try { if (cursor.moveToFirst()) {