diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 8ca1bf16bf..b1b1f355bd 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -319,16 +319,7 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, mDepthController = new DepthController(this); mOverviewBlurEnabled = isOverviewBackgroundBlurEnabled(); getTheme().applyStyle(getOverviewBlurStyleResId(), true); - // In QuickstepLauncher.java (or Launcher.java) - try { - super.setupViews(); - } catch (InflateException e) { - if (e.getCause() instanceof InvocationTargetException) { - Throwable target = ((InvocationTargetException) e.getCause()).getTargetException(); - Log.e("LawnchairCrash", "RecentsView constructor failed", target); - } - throw e; - } + super.setupViews(); mActionsView = findViewById(R.id.overview_actions_view); RecentsView overviewPanel = getOverviewPanel(); diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 312800d432..4f1ffec6f9 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -462,16 +462,7 @@ public class Launcher extends StatefulActivity mAppWidgetHolder.setAppWidgetRemovedCallback( appWidgetId -> getWorkspace().removeWidget(appWidgetId)); - // In QuickstepLauncher.java (or Launcher.java) - try { - setupViews(); - } catch (InflateException e) { - if (e.getCause() instanceof InvocationTargetException) { - Throwable target = ((InvocationTargetException) e.getCause()).getTargetException(); - Log.e("LawnchairCrash", "RecentsView constructor failed", target); - } - throw e; - } + setupViews(); updateDisallowBack(); mAppWidgetHolder.startListening(); diff --git a/systemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java b/systemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java index a8cbf275dc..ea03b6fc8e 100644 --- a/systemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java +++ b/systemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java @@ -172,7 +172,8 @@ public class TaskStackChangeListeners { if (!LawnchairQuickstepCompat.ATLEAST_V) return; ActivityTaskManager.getService().registerTaskStackListener(this); mRegistered = true; - } catch (Throwable e) { + } catch (NoClassDefFoundError | ExceptionInInitializerError | Exception e) { + // pE-TODO(CompatTier2): Find a way to deal with LawnchairQuickstepCompat instead of NoClassDefFoundError | ExceptionInInitializerError catch Log.w(TAG, "Failed to call registerTaskStackListener", e); } } @@ -190,7 +191,8 @@ public class TaskStackChangeListeners { if (!LawnchairQuickstepCompat.ATLEAST_V) return; ActivityTaskManager.getService().unregisterTaskStackListener(this); mRegistered = false; - } catch (Throwable e) { + } catch (NoClassDefFoundError | ExceptionInInitializerError | Exception e) { + // pE-TODO(CompatTier2): Find a way to deal with LawnchairQuickstepCompat instead of NoClassDefFoundError | ExceptionInInitializerError catch Log.w(TAG, "Failed to call unregisterTaskStackListener", e); } }