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

Commit c8ce55ce authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "displayAreaOrganizer_migration"

* changes:
  The one handed UX of auto-stop one handed by conditions (10/N)
  TouchHandler to handle touch events inside & outside displayArea (9/N)
  Implement Timer for one handed to handle auto-exit (8/N)
  Implement DisplayArea Animation/Transition for one handed (7/N)
  Register DisplayAreaOrganizer for one handed (6/N)
  Create OneHandedSettingsUtil handle settings configs (5/N)
  Sysui-infra for one handed mode (1/N)
parents 735b631f 5f2d3992
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5293,6 +5293,7 @@ package android.window {
    method public void onDisplayAreaVanished(@NonNull android.window.DisplayAreaInfo);
    method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS) public void registerOrganizer(int);
    field public static final int FEATURE_DEFAULT_TASK_CONTAINER = 1; // 0x1
    field public static final int FEATURE_ONE_HANDED = 3; // 0x3
    field public static final int FEATURE_ROOT = 0; // 0x0
    field public static final int FEATURE_SYSTEM_FIRST = 0; // 0x0
    field public static final int FEATURE_SYSTEM_LAST = 10000; // 0x2710
+30 −4
Original line number Diff line number Diff line
@@ -30,18 +30,44 @@ import android.view.SurfaceControl;
@TestApi
public class DisplayAreaOrganizer extends WindowOrganizer {

    /**
     * The value in display area indicating that no value has been set.
     */
    public static final int FEATURE_UNDEFINED = -1;

    /**
     * The Root display area on a display
     */
    public static final int FEATURE_SYSTEM_FIRST = 0;
    // The Root display area on a display

    /**
     * The Root display area on a display
     */
    public static final int FEATURE_ROOT = FEATURE_SYSTEM_FIRST;
    // Display area hosting the default task container.

    /**
     * Display area hosting the default task container.
     */
    public static final int FEATURE_DEFAULT_TASK_CONTAINER = FEATURE_SYSTEM_FIRST + 1;
    // Display area hosting non-activity window tokens.

    /**
     * Display area hosting non-activity window tokens.
     */
    public static final int FEATURE_WINDOW_TOKENS = FEATURE_SYSTEM_FIRST + 2;

    /**
     * Display area for one handed feature
     */
    public static final int FEATURE_ONE_HANDED = FEATURE_SYSTEM_FIRST + 3;

    /**
     * The last boundary of display area for system features
     */
    public static final int FEATURE_SYSTEM_LAST = 10_000;

    // Vendor specific display area definition can start with this value.
    /**
     * Vendor specific display area definition can start with this value.
     */
    public static final int FEATURE_VENDOR_FIRST = FEATURE_SYSTEM_LAST + 1;

    @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS)
+7 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.systemui.car.window.SystemUIOverlayWindowManager;
import com.android.systemui.globalactions.GlobalActionsComponent;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.keyguard.dagger.KeyguardModule;
import com.android.systemui.onehanded.OneHandedUI;
import com.android.systemui.pip.PipUI;
import com.android.systemui.power.PowerUI;
import com.android.systemui.recents.Recents;
@@ -102,6 +103,12 @@ public abstract class CarSystemUIBinder {
    @ClassKey(LatencyTester.class)
    public abstract SystemUI bindLatencyTester(LatencyTester sysui);

    /** Inject into OneHandedUI. */
    @Binds
    @IntoMap
    @ClassKey(OneHandedUI.class)
    public abstract SystemUI bindOneHandedUI(OneHandedUI sysui);

    /** Inject into PipUI. */
    @Binds
    @IntoMap
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import com.android.systemui.dagger.DependencyProvider;
import com.android.systemui.dagger.SystemServicesModule;
import com.android.systemui.dagger.SystemUIModule;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.onehanded.dagger.OneHandedModule;
import com.android.systemui.pip.phone.dagger.PipModule;

import javax.inject.Singleton;
@@ -34,6 +35,7 @@ import dagger.Component;
                DependencyProvider.class,
                DependencyBinder.class,
                PipModule.class,
                OneHandedModule.class,
                SystemUIFactory.ContextHolder.class,
                SystemServicesModule.class,
                SystemUIModule.class,
+4 −0
Original line number Diff line number Diff line
@@ -116,6 +116,10 @@ Plays ringtones.

Shows UI for keyboard shortcuts (triggered by keyboard shortcut).

### [com.android.systemui.onehanded.OneHandedUI](/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java)

Shows the overlay controls when One handed is triggered.

### [com.android.systemui.pip.PipUI](/packages/SystemUI/src/com/android/systemui/pip/PipUI.java)

Shows the overlay controls when Pip is showing.
Loading