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

Commit 7700bffc authored by Winson Chung's avatar Winson Chung
Browse files

Fix noisy log from sysui flag changes

Bug: 144854916
Test: Logcat after sysui flag changes, ensure no tracing change logs
Change-Id: I36b6b71bae08303787508ab6eb63ca989866370c
parent e77fc9cc
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -239,8 +239,9 @@ public class TouchInteractionService extends Service implements PluginListener<O
        @BinderThread
        public void onSystemUiStateChanged(int stateFlags) {
            MAIN_EXECUTOR.execute(() -> {
                int lastFlags = mDeviceState.getSystemUiStateFlags();
                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);
        mInputConsumer = InputConsumerController.getRecentsAnimationInputConsumer();
        mInputConsumer.registerInputConsumer();
        onSystemUiFlagsChanged();
        onSystemUiFlagsChanged(mDeviceState.getSystemUiStateFlags());
        onAssistantVisibilityChanged();

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

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

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

    @UiThread
    private void onAssistantVisibilityChanged() {