field public static final int textEditSidePasteWindowLayout = 16843614; // 0x101035e
field public static final int textEditSuggestionItemLayout = 16843636; // 0x1010374
field public static final int textFilterEnabled = 16843007; // 0x10100ff
- field public static final int textFontWeight = 16844166; // 0x1010586
+ field public static final int textFontWeight = 16844165; // 0x1010585
field public static final int textIsSelectable = 16843542; // 0x1010316
field public static final int textOff = 16843045; // 0x1010125
field public static final int textOn = 16843044; // 0x1010124
field public static final deprecated int unfocusedMonthDateColor = 16843588; // 0x1010344
field public static final int unselectedAlpha = 16843278; // 0x101020e
field public static final int updatePeriodMillis = 16843344; // 0x1010250
- field public static final int urlBarResourceId = 16844164; // 0x1010584
field public static final int use32bitAbi = 16844053; // 0x1010515
field public static final int useDefaultMargins = 16843641; // 0x1010379
field public static final int useIntrinsicSizeAsMinimum = 16843536; // 0x1010310
field public static final int windowHideAnimation = 16842935; // 0x10100b7
field public static final int windowIsFloating = 16842839; // 0x1010057
field public static final int windowIsTranslucent = 16842840; // 0x1010058
- field public static final int windowLayoutInDisplayCutoutMode = 16844167; // 0x1010587
+ field public static final int windowLayoutInDisplayCutoutMode = 16844166; // 0x1010586
field public static final int windowLightNavigationBar = 16844140; // 0x101056c
field public static final int windowLightStatusBar = 16844000; // 0x10104e0
field public static final int windowMinWidthMajor = 16843606; // 0x1010356
field public static final int isVrOnly = 16844152; // 0x1010578
field public static final int requiredSystemPropertyName = 16844133; // 0x1010565
field public static final int requiredSystemPropertyValue = 16844134; // 0x1010566
- field public static final int userRestriction = 16844165; // 0x1010585
+ field public static final int userRestriction = 16844164; // 0x1010584
}
public static final class R.raw {
} else {
maxVersionCode = Long.MAX_VALUE;
}
- if (true) { // TODO(b/74445943): remove block after P DP2 is branched
- final String urlBarResourceId = cpAttributes.getString(
- R.styleable.AutofillService_CompatibilityPackage_urlBarResourceId);
- if (urlBarResourceId != null) {
- Log.e(TAG, "Service is using deprecated attribute 'urlBarResourceId'");
- }
- }
-
if (compatibilityPackages == null) {
compatibilityPackages = new ArrayMap<>();
}
android.content.pm.PackageInfo#getLongVersionCode()} for the target package.
-->
<attr name="maxLongVersionCode" format="string" />
- <!-- TODO(b/74445943): STOPSHIP (urlBarResourceId should be removed after P DP2 is branched)-->
- <attr name="urlBarResourceId" format="string" />
</declare-styleable>
<!-- =============================== -->
<public name="outlineSpotShadowColor" />
<public name="outlineAmbientShadowColor" />
<public name="maxLongVersionCode" />
- <!-- TODO(b/74445943): STOPSHIP (urlBarResourceId should be removed after P DP2 is branched)-->
- <public name="urlBarResourceId" />
<!-- @hide @SystemApi -->
<public name="userRestriction" />
<public name="textFontWeight" />
private static final char COMPAT_PACKAGE_URL_IDS_BLOCK_BEGIN = '[';
private static final char COMPAT_PACKAGE_URL_IDS_BLOCK_END = ']';
- // TODO(b/74445943): temporary work around until P Development Preview 3 is branched
- private static final List<String> DEFAULT_BUTTONS = Arrays.asList("url_bar",
- "location_bar_edit_text");
-
private final Context mContext;
private final AutoFillUI mUi;
final List<String> urlBarIds;
if (urlBlockIndex == -1) {
packageName = packageBlock;
- urlBarIds = DEFAULT_BUTTONS; // TODO(b/74445943): back to null
+ urlBarIds = null;
} else {
if (packageBlock.charAt(packageBlock.length() - 1)
!= COMPAT_PACKAGE_URL_IDS_BLOCK_END) {
@RunWith(JUnit4.class)
public class AutofillManagerServiceTest {
- // TODO(b/74445943): temporary work around until P Development Preview 3 is branched
- private static final boolean ADDS_DEFAULT_BUTTON = true;
@Test
public void testGetWhitelistedCompatModePackages_null() {
@Test
public void testGetWhitelistedCompatModePackages_onePackageNoUrls() {
- if (ADDS_DEFAULT_BUTTON) {
- final Map<String, String[]> result =
- getWhitelistedCompatModePackages("one_is_the_loniest_package");
- assertThat(result).hasSize(1);
- assertThat(result.get("one_is_the_loniest_package")).asList()
- .containsExactly("url_bar", "location_bar_edit_text");
- } else {
- assertThat(getWhitelistedCompatModePackages("one_is_the_loniest_package"))
- .containsExactly("one_is_the_loniest_package", null);
- }
+ assertThat(getWhitelistedCompatModePackages("one_is_the_loniest_package"))
+ .containsExactly("one_is_the_loniest_package", null);
}
@Test
public void testGetWhitelistedCompatModePackages_multiplePackagesOneInvalid() {
final Map<String, String[]> result = getWhitelistedCompatModePackages("one:two[");
assertThat(result).hasSize(1);
- if (ADDS_DEFAULT_BUTTON) {
- assertThat(result.get("one")).asList()
- .containsExactly("url_bar", "location_bar_edit_text");
- } else {
- assertThat(result.get("one")).isNull();
- }
+ assertThat(result.get("one")).isNull();
}
@Test
getWhitelistedCompatModePackages("p1[p1u1]:p2:p3[p3u1,p3u2]");
assertThat(result).hasSize(3);
assertThat(result.get("p1")).asList().containsExactly("p1u1");
- if (ADDS_DEFAULT_BUTTON) {
- assertThat(result.get("p2")).asList()
- .containsExactly("url_bar", "location_bar_edit_text");
- } else {
- assertThat(result.get("p2")).isNull();
- }
+ assertThat(result.get("p2")).isNull();
assertThat(result.get("p3")).asList().containsExactly("p3u1", "p3u2");
}