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

Commit e8974f6f authored by Ivan Chiang's avatar Ivan Chiang
Browse files

[PM] Fix A11y issue (2/N)

- If we declare configChanges in AndroidManifest.xml, it avoid the
  activity recreation. Before we use the viewModel design, it may
  have some data not set correctly after the activity is creatected.
  After we use the viewModel design, the data is persisetent. Then,
  the activity can be recreated without setting configChanges and it
  can avoid some unexpected UI issues
- Current design already supports the scroll behavior. Remove the
  setMovementMethod of the custom textview to avoid the a11y issue.
  The custom textview is clickable and long-clickable after setting
  the movementmethod. It causes when the custom textview got the a11y
  focus, the Talkback announces `Double tap to activatee`. But, it
  doesn't have any action after the user clicked it.
- Use " instead of ' in some strings to avoid a11y to announce the
  symbol

Flag: android.content.pm.use_pia_v2
Test: Test it with Talkback
Bug: 437849981
Bug: 437840312
Bug: 438063448
Bug: 420544301

Change-Id: Idf3e287a5d1cda97adbaf7dfb5d1e0bf71ea150f
parent e596223a
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -46,7 +46,6 @@
        </receiver>

        <activity android:name=".v2.ui.InstallLaunch"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:exported="false"/>

        <activity android:name=".InstallStart"
@@ -122,7 +121,6 @@
        </activity>

        <activity android:name=".v2.ui.UninstallLaunch"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:excludeFromRecents="true"
            android:noHistory="true"
            android:exported="false" />
@@ -181,7 +179,6 @@
        </activity>

        <activity android:name=".v2.ui.UnarchiveLaunch"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:exported="false"/>
    </application>

+2 −2
Original line number Diff line number Diff line
@@ -49,14 +49,14 @@
    <string name="title_uninstall_updates_system_app">Uninstall app updates?</string>
    <string name="title_uninstall_updates_system_app_all_users">Uninstall app updates for all users?</string>
    <string name="title_uninstall_all_users">Uninstall this app for all users?</string>
    <string name="title_uninstall_other_user">Uninstall this app for user \'<xliff:g id="user_name">%1$s</xliff:g>\'?</string>
    <string name="title_uninstall_other_user">Uninstall this app for user \"<xliff:g id="user_name">%1$s</xliff:g>\"?</string>
    <string name="title_uninstall_app_not_found">App not found</string>
    <string name="title_uninstall_user_not_allowed">Can\'t uninstall this app</string>
    <string name="title_uninstall_failed">App not uninstalled</string>

    <string name="title_archive">Archive this app?</string>
    <string name="title_archive_all_users">Archive this app for all users?</string>
    <string name="title_archive_other_user">Archive this app for user \'<xliff:g id="user_name">%1$s</xliff:g>\'?</string>
    <string name="title_archive_other_user">Archive this app for user \"<xliff:g id="user_name">%1$s</xliff:g>\"?</string>
    <string name="title_restore">Restore this app?</string>
    <string name="title_restore_error_user_action_needed">Action required</string>
    <string name="title_restore_error_less_storage">Not enough storage</string>
+0 −2
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import android.content.pm.ResolveInfo;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Html;
import android.text.method.ScrollingMovementMethod;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@@ -620,7 +619,6 @@ public class InstallationFragment extends DialogFragment {
                        installStage.getExistingUpdateOwnerLabel());
                mCustomMessageTextView.setText(
                        Html.fromHtml(updateOwnerString, Html.FROM_HTML_MODE_LEGACY));
                mCustomMessageTextView.setMovementMethod(new ScrollingMovementMethod());
            } else {
                title = getString(R.string.title_update);
                positiveBtnTextRes = R.string.button_update;