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

Commit 4f54cceb authored by Tony Wickham's avatar Tony Wickham Committed by Android (Google) Code Review
Browse files

Merge "Remove obsolete binder calls to TaskTransitionSpec" into 24D1-dev

parents f1b3a2fc 35b08fe4
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -25,10 +25,6 @@ import static com.android.quickstep.views.DesktopTaskView.isDesktopModeSupported

import android.animation.Animator;
import android.animation.AnimatorSet;
import android.os.RemoteException;
import android.util.Log;
import android.view.TaskTransitionSpec;
import android.view.WindowManagerGlobal;
import android.window.RemoteTransition;

import androidx.annotation.NonNull;
@@ -37,7 +33,6 @@ import androidx.annotation.Nullable;
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.LauncherState;
import com.android.launcher3.QuickstepTransitionManager;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.logging.InstanceId;
@@ -129,7 +124,6 @@ public class LauncherTaskbarUIController extends TaskbarUIController {

        mLauncher.setTaskbarUIController(null);
        mLauncher.removeOnDeviceProfileChangeListener(mOnDeviceProfileChangeListener);
        updateTaskTransitionSpec(true);
    }

    private void onInAppDisplayProgressChanged() {
@@ -268,26 +262,6 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
    private void onStashedInAppChanged(DeviceProfile deviceProfile) {
        boolean taskbarStashedInApps = mControllers.taskbarStashController.isStashedInApp();
        deviceProfile.isTaskbarPresentInApps = !taskbarStashedInApps;
        updateTaskTransitionSpec(taskbarStashedInApps);
    }

    private void updateTaskTransitionSpec(boolean taskbarIsHidden) {
        try {
            if (taskbarIsHidden) {
                // Clear custom task transition settings when the taskbar is stashed
                WindowManagerGlobal.getWindowManagerService().clearTaskTransitionSpec();
            } else {
                // Adjust task transition spec to account for taskbar being visible
                WindowManagerGlobal.getWindowManagerService().setTaskTransitionSpec(
                        new TaskTransitionSpec(
                                mLauncher.getColor(R.color.taskbar_background)));
            }
        } catch (RemoteException e) {
            // This shouldn't happen but if it does task animations won't look good until the
            // taskbar stashing state is changed.
            Log.e(TAG, "Failed to update task transition spec to account for new taskbar state",
                    e);
        }
    }

    /**