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

Commit 89041b54 authored by Winson Chung's avatar Winson Chung
Browse files

Remove unused interfaces and controllers

- Some interfaces only existed to propagate configuration or keyguard
  changes which now go through the ShellController.  TaskSurfaceHelper
  is no longer used since game dashboard has moved to GMS.

Bug: 238217847
Test: atest WMShellUnitTests
Change-Id: Ie8c5a77bf7bd5b8cc5f4a1b2382013228b1e5e3d
parent b50a3b46
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -28,6 +28,13 @@ import com.android.wm.shell.common.annotations.ExternalThread;
@ExternalThread
public interface BackAnimation {

    /**
     * Returns a binder that can be passed to an external process to update back animations.
     */
    default IBackAnimation createExternalInterface() {
        return null;
    }

    /**
     * Called when a {@link MotionEvent} is generated by a back gesture.
     *
@@ -46,13 +53,6 @@ public interface BackAnimation {
     */
    void setTriggerBack(boolean triggerBack);

    /**
     * Returns a binder that can be passed to an external process to update back animations.
     */
    default IBackAnimation createExternalInterface() {
        return null;
    }

    /**
     * Sets the threshold values that defining edge swipe behavior.
     * @param triggerThreshold the min threshold to trigger back.
+0 −26
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.wm.shell.compatui;

import com.android.wm.shell.common.annotations.ExternalThread;

/**
 * Interface to engage compat UI.
 */
@ExternalThread
public interface CompatUI {
}
+0 −14
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import com.android.wm.shell.common.DisplayInsetsController.OnInsetsChangedListen
import com.android.wm.shell.common.DisplayLayout;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.SyncTransactionQueue;
import com.android.wm.shell.common.annotations.ExternalThread;
import com.android.wm.shell.compatui.CompatUIWindowManager.CompatUIHintsState;
import com.android.wm.shell.compatui.letterboxedu.LetterboxEduWindowManager;
import com.android.wm.shell.sysui.KeyguardChangeListener;
@@ -109,7 +108,6 @@ public class CompatUIController implements OnDisplaysChangedListener,
    private final SyncTransactionQueue mSyncQueue;
    private final ShellExecutor mMainExecutor;
    private final Lazy<Transitions> mTransitionsLazy;
    private final CompatUIImpl mImpl = new CompatUIImpl();

    private CompatUICallback mCallback;

@@ -142,11 +140,6 @@ public class CompatUIController implements OnDisplaysChangedListener,
        shellController.addKeyguardChangeListener(this);
    }

    /** Returns implementation of {@link CompatUI}. */
    public CompatUI asCompatUI() {
        return mImpl;
    }

    /** Sets the callback for UI interactions. */
    public void setCompatUICallback(CompatUICallback callback) {
        mCallback = callback;
@@ -380,13 +373,6 @@ public class CompatUIController implements OnDisplaysChangedListener,
        }
    }

    /**
     * The interface for calls from outside the Shell, within the host process.
     */
    @ExternalThread
    private class CompatUIImpl implements CompatUI {
    }

    /** An implementation of {@link OnInsetsChangedListener} for a given display id. */
    private class PerDisplayOnInsetsChangedListener implements OnInsetsChangedListener {
        final int mDisplayId;
+0 −40
Original line number Diff line number Diff line
@@ -57,15 +57,12 @@ import com.android.wm.shell.common.annotations.ShellAnimationThread;
import com.android.wm.shell.common.annotations.ShellBackgroundThread;
import com.android.wm.shell.common.annotations.ShellMainThread;
import com.android.wm.shell.common.annotations.ShellSplashscreenThread;
import com.android.wm.shell.compatui.CompatUI;
import com.android.wm.shell.compatui.CompatUIController;
import com.android.wm.shell.displayareahelper.DisplayAreaHelper;
import com.android.wm.shell.displayareahelper.DisplayAreaHelperController;
import com.android.wm.shell.draganddrop.DragAndDrop;
import com.android.wm.shell.draganddrop.DragAndDropController;
import com.android.wm.shell.freeform.FreeformTaskListener;
import com.android.wm.shell.fullscreen.FullscreenTaskListener;
import com.android.wm.shell.hidedisplaycutout.HideDisplayCutout;
import com.android.wm.shell.hidedisplaycutout.HideDisplayCutoutController;
import com.android.wm.shell.kidsmode.KidsModeTaskOrganizer;
import com.android.wm.shell.onehanded.OneHanded;
@@ -85,8 +82,6 @@ import com.android.wm.shell.startingsurface.StartingWindowTypeAlgorithm;
import com.android.wm.shell.startingsurface.phone.PhoneStartingWindowTypeAlgorithm;
import com.android.wm.shell.sysui.ShellController;
import com.android.wm.shell.sysui.ShellInterface;
import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelper;
import com.android.wm.shell.tasksurfacehelper.TaskSurfaceHelperController;
import com.android.wm.shell.transition.ShellTransitions;
import com.android.wm.shell.transition.Transitions;
import com.android.wm.shell.unfold.ShellUnfoldProgressProvider;
@@ -171,12 +166,6 @@ public abstract class WMShellBaseModule {
                iconProvider, mainExecutor);
    }

    @WMSingleton
    @Provides
    static Optional<DragAndDrop> provideDragAndDrop(DragAndDropController dragAndDropController) {
        return Optional.of(dragAndDropController.asDragAndDrop());
    }

    @WMSingleton
    @Provides
    static ShellTaskOrganizer provideShellTaskOrganizer(@ShellMainThread ShellExecutor mainExecutor,
@@ -206,11 +195,6 @@ public abstract class WMShellBaseModule {
                recentTasksOptional);
    }

    @WMSingleton
    @Provides static Optional<CompatUI> provideCompatUI(CompatUIController compatUIController) {
        return Optional.of(compatUIController.asCompatUI());
    }

    @WMSingleton
    @Provides
    static CompatUIController provideCompatUIController(Context context,
@@ -374,13 +358,6 @@ public abstract class WMShellBaseModule {
    // Hide display cutout
    //

    @WMSingleton
    @Provides
    static Optional<HideDisplayCutout> provideHideDisplayCutout(
            Optional<HideDisplayCutoutController> hideDisplayCutoutController) {
        return hideDisplayCutoutController.map((controller) -> controller.asHideDisplayCutout());
    }

    @WMSingleton
    @Provides
    static Optional<HideDisplayCutoutController> provideHideDisplayCutoutController(Context context,
@@ -416,23 +393,6 @@ public abstract class WMShellBaseModule {
        return Optional.empty();
    }

    //
    // Task to Surface communication
    //

    @WMSingleton
    @Provides
    static Optional<TaskSurfaceHelper> provideTaskSurfaceHelper(
            Optional<TaskSurfaceHelperController> taskSurfaceController) {
        return taskSurfaceController.map((controller) -> controller.asTaskSurfaceHelper());
    }

    @Provides
    static Optional<TaskSurfaceHelperController> provideTaskSurfaceHelperController(
            ShellTaskOrganizer taskOrganizer, @ShellMainThread ShellExecutor mainExecutor) {
        return Optional.ofNullable(new TaskSurfaceHelperController(taskOrganizer, mainExecutor));
    }

    //
    // Pip (optional feature)
    //
+0 −26
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.wm.shell.draganddrop;

import com.android.wm.shell.common.annotations.ExternalThread;

/**
 * Interface for telling DragAndDrop stuff.
 */
@ExternalThread
public interface DragAndDrop {
}
Loading