diff options
author | 2025-03-24 08:46:36 -0700 | |
---|---|---|
committer | 2025-03-24 08:46:36 -0700 | |
commit | cfcb27aa9d87c89055cd99198396675352fda030 (patch) | |
tree | ae831a40138cab95b8329cd4101fe5faa0ce327a /quickstep/src | |
parent | 9cf28d1772c94141599f643c508309d84f915973 (diff) |
Revert "Improve reliability of cleanup done in onDestroy."
This reverts commit 9cf28d1772c94141599f643c508309d84f915973.
Reason for revert: Fix in ag/32425180
Change-Id: I714665944384db6f68634de529272e618bccdad9
Diffstat (limited to 'quickstep/src')
-rw-r--r-- | quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java | 46 |
1 files changed, 11 insertions, 35 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 14a99e147b..1a42d21b6f 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -86,7 +86,6 @@ import android.os.Trace; import android.os.UserHandle; import android.text.TextUtils; import android.util.AttributeSet; -import android.util.Log; import android.view.Display; import android.view.HapticFeedbackConstants; import android.view.KeyEvent; @@ -227,7 +226,6 @@ import java.util.stream.Stream; public class QuickstepLauncher extends Launcher implements RecentsViewContainer, SystemShortcut.BubbleActivityStarter { - private static final String TAG = "QuickstepLauncher"; private static final boolean TRACE_LAYOUTS = SystemProperties.getBoolean("persist.debug.trace_layouts", false); private static final String TRACE_RELAYOUT_CLASS = @@ -563,35 +561,20 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, @Override public void onDestroy() { - // wrap non-trivial clean up blocks in try-catch to avoid stopping clean up of rest of - // objects - if (mAppTransitionManager != null) { - try { - mAppTransitionManager.onActivityDestroyed(); - } catch (Exception e) { - Log.e(TAG, "Failed to destroy mAppTransitionManager", e); - } + mAppTransitionManager.onActivityDestroyed(); } mAppTransitionManager = null; mIsPredictiveBackToHomeInProgress = false; if (mUnfoldTransitionProgressProvider != null) { - try { - SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); - mUnfoldTransitionProgressProvider.destroy(); - } catch (Exception e) { - Log.e(TAG, "Failed to destroy mUnfoldTransitionProgressProvider", e); - } + SystemUiProxy.INSTANCE.get(this).setUnfoldAnimationListener(null); + mUnfoldTransitionProgressProvider.destroy(); } OverviewComponentObserver.INSTANCE.get(this) .removeOverviewChangeListener(mOverviewChangeListener); - try { - mTISBindHelper.onDestroy(); - } catch (Exception e) { - Log.e(TAG, "Failed to destroy mTISBindHelper", e); - } + mTISBindHelper.onDestroy(); if (mLauncherUnfoldAnimationController != null) { mLauncherUnfoldAnimationController.onDestroy(); @@ -601,22 +584,15 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, mSplitSelectStateController.onDestroy(); } - try { - RecentsView recentsView = getOverviewPanel(); - if (recentsView != null) { - recentsView.destroy(); - } - } catch (Exception e) { - Log.e(TAG, "Failed to destroy RecentsView", e); + RecentsView recentsView = getOverviewPanel(); + if (recentsView != null) { + recentsView.destroy(); } - try { - super.onDestroy(); - } finally { // trivial close operations in finally. - mHotseatPredictionController.destroy(); - if (mViewCapture != null) mViewCapture.close(); - removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler()); - } + super.onDestroy(); + mHotseatPredictionController.destroy(); + if (mViewCapture != null) mViewCapture.close(); + removeBackAnimationCallback(mSplitSelectStateController.getSplitBackHandler()); } @Override |