Merge "Null check when getting list of widget receivers" into ub-launcher3-burnaby
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index 34edf77..598b8ce 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -3312,6 +3312,9 @@
.setPackage(pkg), 0);
needToRefresh |= widgets != null && !widgets.isEmpty();
} catch (RuntimeException e) {
+ if (LauncherAppState.isDogfoodBuild()) {
+ throw e;
+ }
// Ignore the crash. We can live with a state widget list.
Log.e(TAG, "PM call failed for " + pkg, e);
}
@@ -3366,8 +3369,9 @@
return results;
}
} catch (Exception e) {
- if (e.getCause() instanceof TransactionTooLargeException ||
- e.getCause() instanceof DeadObjectException) {
+ if (!LauncherAppState.isDogfoodBuild() &&
+ (e.getCause() instanceof TransactionTooLargeException ||
+ e.getCause() instanceof DeadObjectException)) {
// the returned value may be incomplete and will not be refreshed until the next
// time Launcher starts.
// TODO: after figuring out a repro step, introduce a dirty bit to check when