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

Commit cd67f6b6 authored by Haoran Zhang's avatar Haoran Zhang
Browse files

[Augmented Autofill] Add accessibility title to augmented drop down window.

Similar to how normal autofill set it in FillUi.java. After the change, the talkback would read "Window autofill option": https://screenshot.googleplex.com/ALg8LVCuH9A28HY

Change-Id: I894dfefb280879fc130f4fd404ba234303b02bca
Flag: android.service.autofill.add_accessibility_title_for_augmented_autofill_dropdown
Bug: b/375284244
Test: build && manual test (b/375284244#comment18)
parent 799131ca
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package android.service.autofill.augmented;

import static android.service.autofill.augmented.AugmentedAutofillService.sDebug;
import static android.service.autofill.augmented.AugmentedAutofillService.sVerbose;
import static android.service.autofill.Flags.addAccessibilityTitleForAugmentedAutofillDropdown;

import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;

@@ -36,6 +37,7 @@ import android.view.WindowManager;
import android.view.autofill.IAutofillWindowPresenter;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.R;

import dalvik.system.CloseGuard;

@@ -208,6 +210,12 @@ public final class FillWindow implements AutoCloseable {
            if (mWm != null && mFillView != null) {
                try {
                    p.flags |= WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
                    if (addAccessibilityTitleForAugmentedAutofillDropdown()) {
                        p.accessibilityTitle =
                            mFillView
                                    .getContext()
                                    .getString(R.string.autofill_picker_accessibility_title);
                    }
                    if (!mShowing) {
                        mWm.addView(mFillView, p);
                        mShowing = true;
+10 −0
Original line number Diff line number Diff line
@@ -96,3 +96,13 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "add_accessibility_title_for_augmented_autofill_dropdown"
  namespace: "autofill"
  description: "Add accessibility title for augmented autofill dropdown"
  bug: "375284244"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}