summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java2
-rw-r--r--src/com/android/launcher3/compat/LauncherAppsCompatVL.java12
-rw-r--r--src/com/android/launcher3/compat/PackageInstallerCompatVL.java13
-rw-r--r--src/com/android/launcher3/compat/UserManagerCompatVL.java6
4 files changed, 25 insertions, 8 deletions
diff --git a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java
index 30af38ef9..7ca35b72d 100644
--- a/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java
+++ b/src/com/android/launcher3/compat/AppWidgetManagerCompatVL.java
@@ -127,7 +127,7 @@ class AppWidgetManagerCompatVL extends AppWidgetManagerCompat {
try {
drawable = mPm.getUserBadgedDrawableForDensity(new BitmapDrawable(res, bitmap),
info.getProfile(), badgeLocation, 0);
- } catch (Exception e) {
+ } catch (Throwable e) {
return bitmap;
}
diff --git a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
index 6422551ba..c4a97836c 100644
--- a/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
+++ b/src/com/android/launcher3/compat/LauncherAppsCompatVL.java
@@ -82,7 +82,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
synchronized (mCallbacks) {
mCallbacks.put(callback, wrappedCallback);
}
- mLauncherApps.addCallback(wrappedCallback);
+ try {
+ mLauncherApps.registerCallback(wrappedCallback);
+ } catch (Throwable e) {
+ // STOPSHIP(kennyguy): Remove when LRW71 hits googlefood
+ }
}
public void removeOnAppsChangedCallback(
@@ -92,7 +96,11 @@ public class LauncherAppsCompatVL extends LauncherAppsCompat {
wrappedCallback = mCallbacks.remove(callback);
}
if (wrappedCallback != null) {
- mLauncherApps.removeCallback(wrappedCallback);
+ try {
+ mLauncherApps.unregisterCallback(wrappedCallback);
+ } catch (Throwable e) {
+ // STOPSHIP(kennyguy): Remove when LRW71 hits googlefood
+ }
}
}
diff --git a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
index 0a842808d..9a0831f0e 100644
--- a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
+++ b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
@@ -47,7 +47,12 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
mResumed = false;
mBound = false;
- mInstaller.registerSessionCallback(mCallback);
+ // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
+ // This hack is just to prevent crash in older builds.
+ try {
+ mInstaller.registerSessionCallback(mCallback);
+ } catch (Throwable e) { }
+
// On start, send updates for all active sessions
for (SessionInfo info : mInstaller.getAllSessions()) {
mPendingReplays.append(info.getSessionId(), info);
@@ -72,7 +77,11 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
@Override
public void onStop() {
- mInstaller.unregisterSessionCallback(mCallback);
+ // STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
+ // This hack is just to prevent crash in older builds.
+ try {
+ mInstaller.unregisterSessionCallback(mCallback);
+ } catch (Throwable e) { }
}
@Override
diff --git a/src/com/android/launcher3/compat/UserManagerCompatVL.java b/src/com/android/launcher3/compat/UserManagerCompatVL.java
index e54db617e..ddef43148 100644
--- a/src/com/android/launcher3/compat/UserManagerCompatVL.java
+++ b/src/com/android/launcher3/compat/UserManagerCompatVL.java
@@ -55,7 +55,7 @@ public class UserManagerCompatVL extends UserManagerCompatV17 {
// This hack is just to prevent crash in older builds.
try {
return mPm.getUserBadgedIcon(unbadged, user.getUser());
- } catch (Exception e) {
+ } catch (Throwable e) {
return unbadged;
}
}
@@ -68,8 +68,8 @@ public class UserManagerCompatVL extends UserManagerCompatV17 {
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
// This hack is just to prevent crash in older builds.
try {
- return mPm.getUserBadgedLabel(label, user.getUser());
- } catch (Exception e) {
+ return mPm.getUserBadgedLabel(label, user.getUser());
+ } catch (Throwable e) {
return label;
}
}