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

Commit 1ec0ccaf authored by Svetoslav's avatar Svetoslav Committed by Android Git Automerger
Browse files

am 97273d50: Merge "Fixing backwards cmpatibility for enabling explore by touch"

# Via Android (Google) Code Review (1) and Svetoslav (1)
* commit '97273d50':
  Fixing backwards cmpatibility for enabling explore by touch
parents da805b14 97273d50
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -150,10 +150,18 @@ public class AccessibilityServiceInfo implements Parcelable {
     * flag does not guarantee that the device will not be in touch exploration
     * mode since there may be another enabled service that requested it.
     * <p>
     * Clients that want to set this flag have to request the
     * For accessibility services targeting API version higher than
     * {@link Build.VERSION_CODES#JELLY_BEAN_MR1} that want to set
     * this flag have to request the
     * {@link android.Manifest.permission#CAN_REQUEST_TOUCH_EXPLORATION_MODE}
     * permission or the flag will be ignored.
     * </p>
     * <p>
     * Services targeting API version equal to or lower than
     * {@link Build.VERSION_CODES#JELLY_BEAN_MR1} will work normally, i.e.
     * the first time they are run, if this flag is specified, a dialog is
     * shown to the user to confirm enabling explore by touch.
     * </p>
     */
    public static final int FLAG_REQUEST_TOUCH_EXPLORATION_MODE = 0x0000004;

+0 −1
Original line number Diff line number Diff line
@@ -3351,7 +3351,6 @@ public final class Settings {
         *
         * @hide
         */
        @Deprecated
        public static final String TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES =
            "touch_exploration_granted_accessibility_services";

+21 −2
Original line number Diff line number Diff line
@@ -950,8 +950,8 @@
    <string name="permlab_canRequestEnahncedWebAccessibility">request enhanced web accessibility</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_canRequestEnahncedWebAccessibility">Allows the hoder to request
        enabling of web accessibility enhancements. For example, installing scripts from
        Google to make app content more accessible.</string>
        enabling of web accessibility enhancements. For example, installing scripts to make
        app content more accessible.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_bindTextService">bind to a text service</string>
@@ -2714,6 +2714,25 @@
    <!-- SearchView accessibility description for voice button [CHAR LIMIT=NONE] -->
    <string name="searchview_description_voice">Voice search</string>

    <!-- Title for a warning message about the interaction model changes after allowing an accessibility
         service to put the device into explore by touch mode, displayed as a dialog message when
         the user selects to enables the service. (default). [CHAR LIMIT=45] -->
    <string name="enable_explore_by_touch_warning_title">Enable Explore by Touch?</string>
    <!-- Summary for a warning message about the interaction model changes after allowing an accessibility
         service to put the device into explore by touch mode, displayed as a dialog message when
         the user selects to enables the service. (tablet). [CHAR LIMIT=NONE] -->
    <string name="enable_explore_by_touch_warning_message" product="tablet">
        <xliff:g id="accessibility_service_name">%1$s</xliff:g> wants to enable Explore by Touch.
        When Explore by Touch is turned on, you can hear or see descriptions of what\'s under
        your finger or perform gestures to interact with the tablet.</string>
    <!-- Summary for a warning message about the interaction model changes after allowing an accessibility
         service to put the device into explore by touch mode, displayed as a dialog message when
         the user selects to enables the service. (default). [CHAR LIMIT=NONE] -->
    <string name="enable_explore_by_touch_warning_message" product="default">
        <xliff:g id="accessibility_service_name">%1$s</xliff:g> wants to enable Explore by Touch.
       When Explore by Touch is turned on, you can hear or see descriptions of what\'s under
       your finger or perform gestures to interact with the phone.</string>

    <!-- String used to display the date. This is the string to say something happened 1 month ago. -->
    <string name="oneMonthDurationPast">1 month ago</string>
    <!-- String used to display the date. This is the string to say something happened more than 1 month ago. -->
+1 −17
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
    // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
    // is properly propagated through your change.  Not doing so will result in a loss of user
    // settings.
    private static final int DATABASE_VERSION = 97;
    private static final int DATABASE_VERSION = 96;

    private Context mContext;
    private int mUserHandle;
@@ -1536,22 +1536,6 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            upgradeVersion = 96;
        }

        if (upgradeVersion == 96) {
            // Remove Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES
            if (mUserHandle == UserHandle.USER_OWNER) {
                db.beginTransaction();
                try {
                    db.execSQL("DELETE FROM system WHERE name='"
                            + Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES
                            + "'");
                    db.setTransactionSuccessful();
                } finally {
                    db.endTransaction();
                }
            }
            upgradeVersion = 97;
        }

        // *** Remember to update DATABASE_VERSION above!

        if (upgradeVersion != currentVersion) {
+215 −36

File changed.

Preview size limit exceeded, changes collapsed.