From 79afe010d55af6b1753430a334bf6e24448e9375 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 17 Sep 2015 12:50:11 -0700 Subject: [PATCH] Throwing system api call exceptions in case of dogfood builds Change-Id: I28bad663712a22360ceed095ceb54ce71b1449d5 --- src/com/android/launcher3/LauncherModel.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java index 9817f3f61..95a4c4603 100644 --- a/src/com/android/launcher3/LauncherModel.java +++ b/src/com/android/launcher3/LauncherModel.java @@ -3311,6 +3311,9 @@ public class LauncherModel extends BroadcastReceiver new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE) .setPackage(pkg), 0).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); } @@ -3365,8 +3368,9 @@ public class LauncherModel extends BroadcastReceiver 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 -- 2.11.0