Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cf7c31e authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Fix noisy log from sysui flag changes" into sc-dev

parents 029e9307 7700bffc
Loading
Loading
Loading
Loading
+15 −11
Original line number Original line Diff line number Diff line
@@ -239,8 +239,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
        @BinderThread
        @BinderThread
        public void onSystemUiStateChanged(int stateFlags) {
        public void onSystemUiStateChanged(int stateFlags) {
            MAIN_EXECUTOR.execute(() -> {
            MAIN_EXECUTOR.execute(() -> {
                int lastFlags = mDeviceState.getSystemUiStateFlags();
                mDeviceState.setSystemUiFlags(stateFlags);
                mDeviceState.setSystemUiFlags(stateFlags);
                TouchInteractionService.this.onSystemUiFlagsChanged();
                TouchInteractionService.this.onSystemUiFlagsChanged(lastFlags);
            });
            });
        }
        }


@@ -362,7 +363,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
        mResetGestureInputConsumer = new ResetGestureInputConsumer(mTaskAnimationManager);
        mResetGestureInputConsumer = new ResetGestureInputConsumer(mTaskAnimationManager);
        mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer();
        mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer();
        mInputConsumer.registerInputConsumer();
        mInputConsumer.registerInputConsumer();
        onSystemUiFlagsChanged();
        onSystemUiFlagsChanged(mDeviceState.getSystemUiStateFlags());
        onAssistantVisibilityChanged();
        onAssistantVisibilityChanged();


        // Temporarily disable model preload
        // Temporarily disable model preload
@@ -414,7 +415,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
    }
    }


    @UiThread
    @UiThread
    private void onSystemUiFlagsChanged() {
    private void onSystemUiFlagsChanged(int lastSysUIFlags) {
        if (mDeviceState.isUserUnlocked()) {
        if (mDeviceState.isUserUnlocked()) {
            int systemUiStateFlags = mDeviceState.getSystemUiStateFlags();
            int systemUiStateFlags = mDeviceState.getSystemUiStateFlags();
            SystemUiProxy.INSTANCE.get(this).setLastSystemUiStateFlags(systemUiStateFlags);
            SystemUiProxy.INSTANCE.get(this).setLastSystemUiStateFlags(systemUiStateFlags);
@@ -422,6 +423,8 @@ public class TouchInteractionService extends Service implements PluginListener<O
            mOverviewComponentObserver.getActivityInterface().onSystemUiFlagsChanged(
            mOverviewComponentObserver.getActivityInterface().onSystemUiFlagsChanged(
                    systemUiStateFlags);
                    systemUiStateFlags);


            if ((lastSysUIFlags & SYSUI_STATE_TRACING_ENABLED) !=
                    (systemUiStateFlags & SYSUI_STATE_TRACING_ENABLED)) {
                // Update the tracing state
                // Update the tracing state
                if ((systemUiStateFlags & SYSUI_STATE_TRACING_ENABLED) != 0) {
                if ((systemUiStateFlags & SYSUI_STATE_TRACING_ENABLED) != 0) {
                    Log.d(TAG, "Starting tracing.");
                    Log.d(TAG, "Starting tracing.");
@@ -433,6 +436,7 @@ public class TouchInteractionService extends Service implements PluginListener<O
                }
                }
            }
            }
        }
        }
    }


    @UiThread
    @UiThread
    private void onAssistantVisibilityChanged() {
    private void onAssistantVisibilityChanged() {