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

Commit 8a10fb5a authored by Matthew Ng's avatar Matthew Ng
Browse files

Always show back button when screen pinning, for prototype

In navigation bar prototypes, the back button can be hidden and then
user cannot exit from screen pinning. Force show the back button and
then the user can exit from pinning.

Test: manual
Bug: 112934365
Change-Id: I58ac7149ceafd57964c39382859314d2cfdfff0a
parent 5119ee33
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -276,8 +276,10 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav

        @Override
        public void onBackButtonVisibilityChanged(boolean visible) {
            if (!inScreenPinning()) {
                getBackButton().setVisibility(visible ? VISIBLE : GONE);
            }
        }

        @Override
        public void onColorAdaptChanged(boolean enabled) {
@@ -940,6 +942,9 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
    public void showPinningEnterExitToast(boolean entering) {
        if (entering) {
            mScreenPinningNotify.showPinningStartToast();

            // TODO(b/112934365): remove after prototype finished, only needed to escape from pin
            getBackButton().setVisibility(VISIBLE);
        } else {
            mScreenPinningNotify.showPinningExitToast();
        }