Removed urlBarResourceId.
It will be removed before the final P build. Test: atest FrameworksServicesTests:AutofillManagerServiceTest CtsAutoFillServiceTestCases Fixes: 74445943 Change-Id: I9bc243a3c1ae78f2c385dbb907d362d8ab16b34c
This commit is contained in:
@ -1378,7 +1378,7 @@ package android {
|
||||
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
|
||||
@ -1469,7 +1469,6 @@ package android {
|
||||
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
|
||||
@ -1549,7 +1548,7 @@ package android {
|
||||
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
|
||||
|
@ -207,7 +207,7 @@ package android {
|
||||
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 {
|
||||
|
@ -198,14 +198,6 @@ public final class AutofillServiceInfo {
|
||||
} 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<>();
|
||||
}
|
||||
|
@ -7984,8 +7984,6 @@
|
||||
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>
|
||||
|
||||
<!-- =============================== -->
|
||||
|
@ -2869,8 +2869,6 @@
|
||||
<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" />
|
||||
|
@ -108,10 +108,6 @@ public final class AutofillManagerService extends SystemService {
|
||||
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;
|
||||
|
||||
@ -600,7 +596,7 @@ public final class AutofillManagerService extends SystemService {
|
||||
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) {
|
||||
|
@ -27,8 +27,6 @@ import java.util.Map;
|
||||
|
||||
@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() {
|
||||
@ -42,16 +40,8 @@ public class AutofillManagerServiceTest {
|
||||
|
||||
@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
|
||||
@ -80,12 +70,7 @@ public class AutofillManagerServiceTest {
|
||||
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
|
||||
@ -94,12 +79,7 @@ public class AutofillManagerServiceTest {
|
||||
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");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user