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

Commit 34e13d90 authored by John Spurlock's avatar John Spurlock
Browse files

Update transient navigation confirmation logic.

Show the confirmation toast when hiding the transient
navigation bar only the first time per app, per reboot.

Hitting the power key while the transient nav is hidden
is taken as a signal of possible user confusion, so reshow
the prompt the next time.

This requires the confirmation prompt to live in policy
(not sysui).  It arguably should have been here in the first
place, since the transient bar state/policy was here, and
sysui should not have not been able to fail to display
the prompt correctly.

Also take this opportunity to remove a hack wrt positioning
the confirmation properly while the nav bar is transitioning.
Toasts now support LAYOUT_HIDE_NAVIGATION if applied to the
toast's view.

Bug: 10246225
Change-Id: Ieb6355e4ca975c0758918a39e3c2ec13da81c7f4
parent 43e56c4a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@
*/
-->
<resources>
    <item type="string" name="hiding_navigation_confirmation_message">@string/hiding_navigation_confirmation_message_long</item>
    <item type="string" name="transient_navigation_confirmation">@string/transient_navigation_confirmation_long</item>
</resources>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -16,5 +16,5 @@
*/
-->
<resources>
    <item type="string" name="hiding_navigation_confirmation_message">@string/hiding_navigation_confirmation_message_long</item>
    <item type="string" name="transient_navigation_confirmation">@string/transient_navigation_confirmation_long</item>
</resources>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -4313,4 +4313,9 @@
        <item quantity="other">Incorrect PIN. Try again in <xliff:g id="count">%d</xliff:g> seconds.</item>
    </plurals>

    <!-- Toast bar message when hiding the transient navigation bar [CHAR LIMIT=35] -->
    <string name="transient_navigation_confirmation">Swipe edge of screen to reveal bar</string>

    <!-- Longer version of toast bar message when hiding the transient navigation bar (if room) -->
    <string name="transient_navigation_confirmation_long">Swipe from edge of screen to reveal system bar</string>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -870,6 +870,8 @@
  <java-symbol type="string" name="restr_pin_enter_pin" />
  <java-symbol type="string" name="write_fail_reason_cancelled" />
  <java-symbol type="string" name="write_fail_reason_cannot_write" />
  <java-symbol type="string" name="transient_navigation_confirmation" />
  <java-symbol type="string" name="transient_navigation_confirmation_long" />

  <java-symbol type="plurals" name="abbrev_in_num_days" />
  <java-symbol type="plurals" name="abbrev_in_num_hours" />
+0 −6
Original line number Diff line number Diff line
@@ -503,10 +503,4 @@
    <string name="status_bar_help_title">Notifications appear here</string>
    <!-- Body of help text shown when the notification panel is pulled down for the very first time. [CHAR LIMIT=NONE] -->
    <string name="status_bar_help_text">Access them anytime by swiping down.\nSwipe down again for system controls.</string>

    <!-- Toast bar message when hiding the navigation bar -->
    <string name="hiding_navigation_confirmation_message">Swipe edge of screen to reveal bar</string>

    <!-- Longer version of toast bar message when hiding the navigation bar (if room) -->
    <string name="hiding_navigation_confirmation_message_long">Swipe from edge of screen to reveal system bar</string>
</resources>
Loading