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

Commit c4356fb7 authored by Matthew Ng's avatar Matthew Ng
Browse files

Uses back and home button for screen pinning when recents is invisible

All the text and screen pinning hint shows tells the user that the back
and home button should be held to exit screen pinning. The hint also do
not have the recents button shown if it is invisible. The toast code has
been moved to recents and services calls through to post a toast message
depending if the recents button is visible.

Test: manual
Fixes: 72059911
Change-Id: I93abf5072b97760f33e7e77421544a4b3ad27beb
parent f00c786f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -132,6 +132,12 @@ oneway interface IStatusBar
    void clickQsTile(in ComponentName tile);
    void handleSystemKey(in int key);

    /**
     * Methods to show toast messages for screen pinning
     */
    void showPinningEnterExitToast(boolean entering);
    void showPinningEscapeToast();

    void showShutdownUi(boolean isReboot, String reason);

    // Used to show the dialog when FingerprintService starts authentication
+6 −0
Original line number Diff line number Diff line
@@ -81,6 +81,12 @@ interface IStatusBarService
    void clickTile(in ComponentName tile);
    void handleSystemKey(in int key);

    /**
     * Methods to show toast messages for screen pinning
     */
    void showPinningEnterExitToast(boolean entering);
    void showPinningEscapeToast();

    // Used to show the dialog when FingerprintService starts authentication
    void showFingerprintDialog(in Bundle bundle, IFingerprintDialogReceiver receiver);
    // Used to hide the dialog when a finger is authenticated
+0 −9
Original line number Diff line number Diff line
@@ -4419,15 +4419,6 @@
    <!-- DO NOT TRANSLATE -->
    <string name="date_picker_day_typeface">sans-serif-medium</string>

    <!-- Notify use that they are in Lock-to-app -->
    <string name="lock_to_app_toast">To unpin this screen, touch &amp; hold Back and Overview
        buttons</string>

    <!-- Starting lock-to-app indication. -->
    <string name="lock_to_app_start">Screen pinned</string>
    <!-- Exting lock-to-app indication. -->
    <string name="lock_to_app_exit">Screen unpinned</string>

    <!-- Lock-to-app unlock pin string -->
    <string name="lock_to_app_unlock_pin">Ask for PIN before unpinning</string>
    <!-- Lock-to-app unlock pattern string -->
+0 −3
Original line number Diff line number Diff line
@@ -767,9 +767,6 @@
  <java-symbol type="string" name="kilobyteShort" />
  <java-symbol type="string" name="last_month" />
  <java-symbol type="string" name="launchBrowserDefault" />
  <java-symbol type="string" name="lock_to_app_toast" />
  <java-symbol type="string" name="lock_to_app_start" />
  <java-symbol type="string" name="lock_to_app_exit" />
  <java-symbol type="string" name="lock_to_app_unlock_pin" />
  <java-symbol type="string" name="lock_to_app_unlock_pattern" />
  <java-symbol type="string" name="lock_to_app_unlock_password" />
+19 −1
Original line number Diff line number Diff line
@@ -84,7 +84,25 @@
        android:layout_height="@dimen/screen_pinning_request_button_height"
        android:layout_weight="0"
        android:paddingStart="@dimen/screen_pinning_request_frame_padding"
        android:paddingEnd="@dimen/screen_pinning_request_frame_padding" >
        android:paddingEnd="@dimen/screen_pinning_request_frame_padding"
        android:theme="@*android:style/ThemeOverlay.DeviceDefault.Accent">

        <ImageView
            android:id="@+id/screen_pinning_home_bg_light"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="matrix"
            android:src="@drawable/screen_pinning_light_bg_circ" />

        <ImageView
            android:id="@+id/screen_pinning_home_bg"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingEnd="@dimen/screen_pinning_request_inner_padding"
            android:paddingStart="@dimen/screen_pinning_request_inner_padding"
            android:paddingTop="@dimen/screen_pinning_request_inner_padding"
            android:scaleType="matrix"
            android:src="@drawable/screen_pinning_bg_circ" />

        <ImageView
            android:layout_width="match_parent"
Loading