summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/model
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-11-15 19:07:31 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-11-15 19:07:32 +0000
commitf8d5370a9f74127c20e1ecd371a68918fe1f14ce (patch)
tree096544e51b0cf365efe1f351d87201ee35f1e8bd /src/com/android/launcher3/model
parent5202aa75045d2289b0ac6875a1caaeed52d4a406 (diff)
parent712ee53c67bbfb5ad4735217f3a9b063d9c60ad9 (diff)
downloadandroid_packages_apps_Trebuchet-f8d5370a9f74127c20e1ecd371a68918fe1f14ce.tar.gz
android_packages_apps_Trebuchet-f8d5370a9f74127c20e1ecd371a68918fe1f14ce.tar.bz2
android_packages_apps_Trebuchet-f8d5370a9f74127c20e1ecd371a68918fe1f14ce.zip
Merge "Catching TransactionTooLargeException when binding widget." into ub-launcher3-master
Diffstat (limited to 'src/com/android/launcher3/model')
-rw-r--r--src/com/android/launcher3/model/WidgetsModel.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/com/android/launcher3/model/WidgetsModel.java b/src/com/android/launcher3/model/WidgetsModel.java
index 3953f3964..64043f484 100644
--- a/src/com/android/launcher3/model/WidgetsModel.java
+++ b/src/com/android/launcher3/model/WidgetsModel.java
@@ -6,17 +6,14 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.os.DeadObjectException;
-import android.os.TransactionTooLargeException;
import android.util.Log;
import com.android.launcher3.AppFilter;
import com.android.launcher3.IconCache;
import com.android.launcher3.InvariantDeviceProfile;
-import com.android.launcher3.ItemInfo;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherAppWidgetProviderInfo;
-import com.android.launcher3.compat.AlphabeticIndexCompat;
+import com.android.launcher3.Utilities;
import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.config.ProviderConfig;
@@ -24,10 +21,7 @@ import com.android.launcher3.util.MultiHashMap;
import com.android.launcher3.util.Preconditions;
import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
import java.util.HashMap;
-import java.util.List;
/**
* Widgets data model that is used by the adapters of the widget views and controllers.
@@ -80,9 +74,7 @@ public class WidgetsModel {
}
setWidgetsAndShortcuts(widgetsAndShortcuts);
} catch (Exception e) {
- if (!ProviderConfig.IS_DOGFOOD_BUILD &&
- (e.getCause() instanceof TransactionTooLargeException ||
- e.getCause() instanceof DeadObjectException)) {
+ if (!ProviderConfig.IS_DOGFOOD_BUILD && Utilities.isBinderSizeError(e)) {
// 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