Fix 2614384 - NPE in LauncherModel
Callbacks can be null. Change-Id: I56462a54673b1804a6235d6d882008b453290542
This commit is contained in:
parent
d65d08e709
commit
87d2ca8a66
|
@ -1103,15 +1103,19 @@ public class LauncherModel extends BroadcastReceiver {
|
|||
public void run() {
|
||||
final long t = SystemClock.uptimeMillis();
|
||||
final Callbacks callbacks = tryGetCallbacks(oldCallbacks);
|
||||
if (first) {
|
||||
mBeforeFirstLoad = false;
|
||||
callbacks.bindAllApplications(added);
|
||||
if (callbacks != null) {
|
||||
if (first) {
|
||||
mBeforeFirstLoad = false;
|
||||
callbacks.bindAllApplications(added);
|
||||
} else {
|
||||
callbacks.bindAppsAdded(added);
|
||||
}
|
||||
if (DEBUG_LOADERS) {
|
||||
Log.d(TAG, "bound " + added.size() + " apps in "
|
||||
+ (SystemClock.uptimeMillis() - t) + "ms");
|
||||
}
|
||||
} else {
|
||||
callbacks.bindAppsAdded(added);
|
||||
}
|
||||
if (DEBUG_LOADERS) {
|
||||
Log.d(TAG, "bound " + added.size() + " apps in "
|
||||
+ (SystemClock.uptimeMillis() - t) + "ms");
|
||||
Log.i(TAG, "not binding apps: no Launcher activity");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue