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

Commit 6e56f6ba authored by Joanne Chung's avatar Joanne Chung
Browse files

The client implementation for remote selection bar

The DefaultSelectionToolbarRenderService renders the menu items and
callbacks to the application with the SurfacePackage and the relative
postition, the application will set the SurfacePackage to the
SurfaceView and put the PopupWindow on the correct position.

The MenuItemRepr is a copy from LocalFloatingToolbarPopup, no logic
change in this class. The above changes don't contain the solution
for transfering the touch focus on the non-toolbar part to the
application process. The part will be implemented on the follow up
change.

Bug: 190030331
Bug: 205823020
Test: manual. Enable the flag, try to selectin the text then the
toolbar can show successfully. Can open opverflow menu, scroll the
view, the selection toolbar also changes the position.

Merged-In: I3915e8165b4d371700cb5fb9e7eb23d46f39bd5c
Change-Id: I1f2add3e93cee9d7af20cba9ccd4e0b393afffcb
parent db78cc2c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.widget.floatingtoolbar;

import android.annotation.Nullable;
import android.content.Context;
import android.graphics.Rect;
import android.view.MenuItem;
@@ -84,7 +85,8 @@ public interface FloatingToolbarPopup {
     * @see PopupWindow#setFocusable(boolean)
     * @see PopupWindow.OnDismissListener
     */
    boolean setOutsideTouchable(boolean outsideTouchable, PopupWindow.OnDismissListener onDismiss);
    boolean setOutsideTouchable(boolean outsideTouchable,
            @Nullable PopupWindow.OnDismissListener onDismiss);

    /**
     * Returns {@link RemoteFloatingToolbarPopup} implementation if the system selection toolbar
+488 −14

File changed.

Preview size limit exceeded, changes collapsed.