Loading api/test-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -716,6 +716,11 @@ package android.content.pm { package android.content.res { public final class AssetManager implements java.lang.AutoCloseable { method @NonNull public String[] getApkPaths(); method @Nullable public java.util.Map<java.lang.String,java.lang.String> getOverlayableMap(String); } public final class Configuration implements java.lang.Comparable<android.content.res.Configuration> android.os.Parcelable { field public int assetsSeq; field public final android.app.WindowConfiguration windowConfiguration; Loading core/java/android/content/res/AssetManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StringRes; import android.annotation.StyleRes; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.content.pm.ActivityInfo; import android.content.res.Configuration.NativeConfig; Loading Loading @@ -357,6 +358,22 @@ public final class AssetManager implements AutoCloseable { return sEmptyApkAssets; } /** @hide */ @TestApi public @NonNull String[] getApkPaths() { synchronized (this) { if (mOpen) { String[] paths = new String[mApkAssets.length]; final int count = mApkAssets.length; for (int i = 0; i < count; i++) { paths[i] = mApkAssets[i].getAssetPath(); } return paths; } } return new String[0]; } /** * Returns a cookie for use with the other APIs of AssetManager. * @return 0 if the path was not found, otherwise a positive integer cookie representing Loading Loading @@ -1356,6 +1373,7 @@ public final class AssetManager implements AutoCloseable { /** * @hide */ @TestApi @GuardedBy("this") public @Nullable Map<String, String> getOverlayableMap(String packageName) { synchronized (this) { Loading core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ LOCAL_MODULE_TAGS := tests LOCAL_PACKAGE_NAME := OverlayDeviceTests_AppOverlayOne LOCAL_SDK_VERSION := current LOCAL_COMPATIBILITY_SUITE := device-tests LOCAL_CERTIFICATE := platform LOCAL_USE_AAPT2 := true LOCAL_AAPT_FLAGS := --no-resource-removal include $(BUILD_PACKAGE) core/tests/overlaytests/device/test-apps/AppOverlayOne/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,5 +19,5 @@ android:versionCode="1" android:versionName="1.0"> <application android:hasCode="false" /> <overlay android:targetPackage="com.android.overlaytest" android:priority="1" /> <overlay android:targetPackage="com.android.overlaytest" /> </manifest> core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ LOCAL_MODULE_TAGS := tests LOCAL_PACKAGE_NAME := OverlayDeviceTests_AppOverlayTwo LOCAL_SDK_VERSION := current LOCAL_COMPATIBILITY_SUITE := device-tests LOCAL_CERTIFICATE := platform LOCAL_USE_AAPT2 := true LOCAL_AAPT_FLAGS := --no-resource-removal include $(BUILD_PACKAGE) Loading
api/test-current.txt +5 −0 Original line number Diff line number Diff line Loading @@ -716,6 +716,11 @@ package android.content.pm { package android.content.res { public final class AssetManager implements java.lang.AutoCloseable { method @NonNull public String[] getApkPaths(); method @Nullable public java.util.Map<java.lang.String,java.lang.String> getOverlayableMap(String); } public final class Configuration implements java.lang.Comparable<android.content.res.Configuration> android.os.Parcelable { field public int assetsSeq; field public final android.app.WindowConfiguration windowConfiguration; Loading
core/java/android/content/res/AssetManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.StringRes; import android.annotation.StyleRes; import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.content.pm.ActivityInfo; import android.content.res.Configuration.NativeConfig; Loading Loading @@ -357,6 +358,22 @@ public final class AssetManager implements AutoCloseable { return sEmptyApkAssets; } /** @hide */ @TestApi public @NonNull String[] getApkPaths() { synchronized (this) { if (mOpen) { String[] paths = new String[mApkAssets.length]; final int count = mApkAssets.length; for (int i = 0; i < count; i++) { paths[i] = mApkAssets[i].getAssetPath(); } return paths; } } return new String[0]; } /** * Returns a cookie for use with the other APIs of AssetManager. * @return 0 if the path was not found, otherwise a positive integer cookie representing Loading Loading @@ -1356,6 +1373,7 @@ public final class AssetManager implements AutoCloseable { /** * @hide */ @TestApi @GuardedBy("this") public @Nullable Map<String, String> getOverlayableMap(String packageName) { synchronized (this) { Loading
core/tests/overlaytests/device/test-apps/AppOverlayOne/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ LOCAL_MODULE_TAGS := tests LOCAL_PACKAGE_NAME := OverlayDeviceTests_AppOverlayOne LOCAL_SDK_VERSION := current LOCAL_COMPATIBILITY_SUITE := device-tests LOCAL_CERTIFICATE := platform LOCAL_USE_AAPT2 := true LOCAL_AAPT_FLAGS := --no-resource-removal include $(BUILD_PACKAGE)
core/tests/overlaytests/device/test-apps/AppOverlayOne/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -19,5 +19,5 @@ android:versionCode="1" android:versionName="1.0"> <application android:hasCode="false" /> <overlay android:targetPackage="com.android.overlaytest" android:priority="1" /> <overlay android:targetPackage="com.android.overlaytest" /> </manifest>
core/tests/overlaytests/device/test-apps/AppOverlayTwo/Android.mk +0 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ LOCAL_MODULE_TAGS := tests LOCAL_PACKAGE_NAME := OverlayDeviceTests_AppOverlayTwo LOCAL_SDK_VERSION := current LOCAL_COMPATIBILITY_SUITE := device-tests LOCAL_CERTIFICATE := platform LOCAL_USE_AAPT2 := true LOCAL_AAPT_FLAGS := --no-resource-removal include $(BUILD_PACKAGE)