diff --git a/systemUI/shared/src/com/android/systemui/shared/animation/DisableSubpixelTextTransitionListener.kt b/systemUI/shared/src/com/android/systemui/shared/animation/DisableSubpixelTextTransitionListener.kt index 637ce5f68d..24383665f3 100644 --- a/systemUI/shared/src/com/android/systemui/shared/animation/DisableSubpixelTextTransitionListener.kt +++ b/systemUI/shared/src/com/android/systemui/shared/animation/DisableSubpixelTextTransitionListener.kt @@ -19,7 +19,6 @@ import android.graphics.Paint import android.view.ViewGroup import android.widget.TextView import androidx.core.view.forEach -import com.android.app.tracing.traceSection import com.android.systemui.unfold.UnfoldTransitionProgressProvider.TransitionProgressListener import java.lang.ref.WeakReference @@ -34,30 +33,22 @@ class DisableSubpixelTextTransitionListener(private val rootView: ViewGroup?) : override fun onTransitionStarted() { isTransitionInProgress = true - traceSection("subpixelFlagSetForTextView") { - traceSection("subpixelFlagTraverseHierarchy") { - getAllChildTextView(rootView, childrenTextViews) - } - traceSection("subpixelFlagDisableForTextView") { - childrenTextViews.forEach { child -> - val childTextView = child.get() ?: return@forEach - childTextView.paintFlags = childTextView.paintFlags or Paint.SUBPIXEL_TEXT_FLAG - } - } + getAllChildTextView(rootView, childrenTextViews) + childrenTextViews.forEach { child -> + val childTextView = child.get() ?: return@forEach + childTextView.paintFlags = childTextView.paintFlags or Paint.SUBPIXEL_TEXT_FLAG } } override fun onTransitionFinished() { if (!isTransitionInProgress) return isTransitionInProgress = false - traceSection("subpixelFlagEnableForTextView") { - childrenTextViews.forEach { child -> - val childTextView = child.get() ?: return@forEach - childTextView.paintFlags = - childTextView.paintFlags and Paint.SUBPIXEL_TEXT_FLAG.inv() - } - childrenTextViews.clear() + childrenTextViews.forEach { child -> + val childTextView = child.get() ?: return@forEach + childTextView.paintFlags = + childTextView.paintFlags and Paint.SUBPIXEL_TEXT_FLAG.inv() } + childrenTextViews.clear() } /** diff --git a/systemUI/shared/src/com/android/systemui/shared/system/UncaughtExceptionPreHandlerManager.kt b/systemUI/shared/src/com/android/systemui/shared/system/UncaughtExceptionPreHandlerManager.kt index 621778b557..3204029d38 100644 --- a/systemUI/shared/src/com/android/systemui/shared/system/UncaughtExceptionPreHandlerManager.kt +++ b/systemUI/shared/src/com/android/systemui/shared/system/UncaughtExceptionPreHandlerManager.kt @@ -28,13 +28,13 @@ class UncaughtExceptionPreHandlerManager @Inject constructor() { * Verifies that the global handler is set in Thread. If not, sets is up. */ private fun checkGlobalHandlerSetup() { - val currentHandler = Thread.getUncaughtExceptionPreHandler() + val currentHandler = Thread.getDefaultUncaughtExceptionHandler() if (currentHandler != globalUncaughtExceptionPreHandler) { if (currentHandler is GlobalUncaughtExceptionHandler) { throw IllegalStateException("Two UncaughtExceptionPreHandlerManagers created") } currentHandler?.let { addHandler(it) } - Thread.setUncaughtExceptionPreHandler(globalUncaughtExceptionPreHandler) + Thread.setDefaultUncaughtExceptionHandler(globalUncaughtExceptionPreHandler) } } @@ -68,4 +68,4 @@ class UncaughtExceptionPreHandlerManager @Inject constructor() { handleUncaughtException(thread, throwable) } } -} \ No newline at end of file +} diff --git a/systemUI/shared/src/com/android/systemui/unfold/system/SystemUnfoldSharedModule.kt b/systemUI/shared/src/com/android/systemui/unfold/system/SystemUnfoldSharedModule.kt index 56cd7d1a90..2fa9b2c6c6 100644 --- a/systemUI/shared/src/com/android/systemui/unfold/system/SystemUnfoldSharedModule.kt +++ b/systemUI/shared/src/com/android/systemui/unfold/system/SystemUnfoldSharedModule.kt @@ -18,7 +18,7 @@ import android.os.Handler import android.os.HandlerThread import android.os.Looper import android.os.Process -import com.android.systemui.dagger.qualifiers.Application +//import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dagger.qualifiers.UiBackground import com.android.systemui.unfold.config.ResourceUnfoldTransitionConfig @@ -98,7 +98,8 @@ abstract class SystemUnfoldSharedModule { @Singleton fun unfoldTrackingContext( @UnfoldSingleThreadBg singleThreadBgExecutor: Executor, - @Application applicationScope: CoroutineScope, + // @Application + applicationScope: CoroutineScope, ): CoroutineScope { // tracking depends on being executed on a single thread so when changing it, ensure all // consumers are not accessing shared state