summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-11-04 10:19:58 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-11-09 12:43:11 -0800
commit712ee53c67bbfb5ad4735217f3a9b063d9c60ad9 (patch)
treea789880aa362c34e0431069efcd210b0628da701 /src/com/android/launcher3/Utilities.java
parent724943dcbd8958ef220a7a45ebc0cdb10e74f7fd (diff)
downloadandroid_packages_apps_Trebuchet-712ee53c67bbfb5ad4735217f3a9b063d9c60ad9.tar.gz
android_packages_apps_Trebuchet-712ee53c67bbfb5ad4735217f3a9b063d9c60ad9.tar.bz2
android_packages_apps_Trebuchet-712ee53c67bbfb5ad4735217f3a9b063d9c60ad9.zip
Catching TransactionTooLargeException when binding widget.
A widget can potentially bypass binder size limit with remote views when using partual updates (as the merging happens on the system service). In such a case, show the widget in error state. Bug: 32365088 Change-Id: Id1c4425958a06463273731464e31f05908c35ec7
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 9ddc14fc9..7bb91ff8a 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -38,7 +38,9 @@ import android.graphics.Paint;
import android.graphics.Rect;
import android.os.Build;
import android.os.Bundle;
+import android.os.DeadObjectException;
import android.os.PowerManager;
+import android.os.TransactionTooLargeException;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
@@ -656,4 +658,9 @@ public final class Utilities {
accessibilityManager.sendAccessibilityEvent(event);
}
}
+
+ public static boolean isBinderSizeError(Exception e) {
+ return e.getCause() instanceof TransactionTooLargeException
+ || e.getCause() instanceof DeadObjectException;
+ }
}