Merge "Public self targeting API"
This commit is contained in:
@@ -10033,6 +10033,7 @@ package android.content {
|
||||
field public static final String NFC_SERVICE = "nfc";
|
||||
field public static final String NOTIFICATION_SERVICE = "notification";
|
||||
field public static final String NSD_SERVICE = "servicediscovery";
|
||||
field public static final String OVERLAY_SERVICE = "overlay";
|
||||
field public static final String PEOPLE_SERVICE = "people";
|
||||
field public static final String PERFORMANCE_HINT_SERVICE = "performance_hint";
|
||||
field public static final String POWER_SERVICE = "power";
|
||||
@@ -11201,6 +11202,49 @@ package android.content {
|
||||
|
||||
}
|
||||
|
||||
package android.content.om {
|
||||
|
||||
public class FabricatedOverlay {
|
||||
ctor public FabricatedOverlay(@NonNull String, @NonNull String);
|
||||
method @NonNull public android.content.om.OverlayIdentifier getIdentifier();
|
||||
method @NonNull public void setResourceValue(@NonNull String, @IntRange(from=android.util.TypedValue.TYPE_FIRST_INT, to=android.util.TypedValue.TYPE_LAST_INT) int, int, @Nullable String);
|
||||
method @NonNull public void setResourceValue(@NonNull String, int, @NonNull String, @Nullable String);
|
||||
method @NonNull public void setResourceValue(@NonNull String, @NonNull android.os.ParcelFileDescriptor, @Nullable String);
|
||||
method public void setTargetOverlayable(@Nullable String);
|
||||
}
|
||||
|
||||
public final class OverlayIdentifier implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.content.om.OverlayIdentifier> CREATOR;
|
||||
}
|
||||
|
||||
public final class OverlayInfo implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method @NonNull public android.content.om.OverlayIdentifier getOverlayIdentifier();
|
||||
method @Nullable public String getOverlayName();
|
||||
method @Nullable public String getTargetOverlayableName();
|
||||
method @NonNull public String getTargetPackageName();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.content.om.OverlayInfo> CREATOR;
|
||||
}
|
||||
|
||||
public class OverlayManager {
|
||||
method @NonNull @NonUiContext public java.util.List<android.content.om.OverlayInfo> getOverlayInfosForTarget(@NonNull String);
|
||||
}
|
||||
|
||||
public final class OverlayManagerTransaction implements android.os.Parcelable {
|
||||
ctor public OverlayManagerTransaction(@NonNull android.content.om.OverlayManager);
|
||||
method @NonUiContext public void commit() throws java.io.IOException, android.content.pm.PackageManager.NameNotFoundException;
|
||||
method public int describeContents();
|
||||
method @NonNull public void registerFabricatedOverlay(@NonNull android.content.om.FabricatedOverlay);
|
||||
method @NonNull public void unregisterFabricatedOverlay(@NonNull android.content.om.OverlayIdentifier);
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.content.om.OverlayManagerTransaction> CREATOR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.content.pm {
|
||||
|
||||
public class ActivityInfo extends android.content.pm.ComponentInfo implements android.os.Parcelable {
|
||||
@@ -13107,6 +13151,7 @@ package android.content.res.loader {
|
||||
method @NonNull public static android.content.res.loader.ResourcesProvider loadFromDirectory(@NonNull String, @Nullable android.content.res.loader.AssetsProvider) throws java.io.IOException;
|
||||
method @NonNull public static android.content.res.loader.ResourcesProvider loadFromSplit(@NonNull android.content.Context, @NonNull String) throws java.io.IOException;
|
||||
method @NonNull public static android.content.res.loader.ResourcesProvider loadFromTable(@NonNull android.os.ParcelFileDescriptor, @Nullable android.content.res.loader.AssetsProvider) throws java.io.IOException;
|
||||
method @NonNull public static android.content.res.loader.ResourcesProvider loadOverlay(@NonNull android.content.om.OverlayInfo) throws java.io.IOException;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3429,15 +3429,10 @@ package android.content.integrity {
|
||||
package android.content.om {
|
||||
|
||||
public final class OverlayInfo implements android.os.Parcelable {
|
||||
method public int describeContents();
|
||||
method @Nullable public String getCategory();
|
||||
method @NonNull public String getPackageName();
|
||||
method @Nullable public String getTargetOverlayableName();
|
||||
method @NonNull public String getTargetPackageName();
|
||||
method public int getUserId();
|
||||
method public boolean isEnabled();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.content.om.OverlayInfo> CREATOR;
|
||||
}
|
||||
|
||||
public class OverlayManager {
|
||||
|
||||
@@ -5784,7 +5784,6 @@ public abstract class Context {
|
||||
*
|
||||
* @see #getSystemService(String)
|
||||
* @see android.content.om.OverlayManager
|
||||
* @hide
|
||||
*/
|
||||
public static final String OVERLAY_SERVICE = "overlay";
|
||||
|
||||
|
||||
@@ -78,16 +78,14 @@ import java.util.Objects;
|
||||
*
|
||||
* @see OverlayManager
|
||||
* @see OverlayManagerTransaction
|
||||
* @hide
|
||||
*/
|
||||
public class FabricatedOverlay {
|
||||
|
||||
/**
|
||||
* Retrieves the identifier for this fabricated overlay.
|
||||
* @return the overlay identifier
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
public OverlayIdentifier getIdentifier() {
|
||||
return new OverlayIdentifier(
|
||||
mOverlay.packageName, TextUtils.nullIfEmpty(mOverlay.overlayName));
|
||||
@@ -325,7 +323,6 @@ public class FabricatedOverlay {
|
||||
* @param overlayName a name used to uniquely identify the fabricated overlay owned by the
|
||||
* caller itself.
|
||||
* @param targetPackage the name of the package to be overlaid
|
||||
* @hide
|
||||
*/
|
||||
public FabricatedOverlay(@NonNull String overlayName, @NonNull String targetPackage) {
|
||||
this(generateFabricatedOverlayInternal(
|
||||
@@ -344,7 +341,6 @@ public class FabricatedOverlay {
|
||||
* should specify which overlayable to be overlaid.
|
||||
*
|
||||
* @param targetOverlayable the overlayable name defined in target package.
|
||||
* @hide
|
||||
*/
|
||||
public void setTargetOverlayable(@Nullable String targetOverlayable) {
|
||||
mOverlay.targetOverlayable = TextUtils.emptyIfNull(targetOverlayable);
|
||||
@@ -438,7 +434,6 @@ public class FabricatedOverlay {
|
||||
* @param value the integer representing the new value
|
||||
* @param configuration The string representation of the config this overlay is enabled for
|
||||
* @see android.util.TypedValue#TYPE_INT_COLOR_ARGB8 android.util.TypedValue#type
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
public void setResourceValue(
|
||||
@@ -470,7 +465,6 @@ public class FabricatedOverlay {
|
||||
* @param value the string representing the new value
|
||||
* @param configuration The string representation of the config this overlay is enabled for
|
||||
* @see android.util.TypedValue#TYPE_STRING android.util.TypedValue#type
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
public void setResourceValue(
|
||||
@@ -491,7 +485,6 @@ public class FabricatedOverlay {
|
||||
* [package]:type/entry)
|
||||
* @param value the file descriptor whose contents are the value of the frro
|
||||
* @param configuration The string representation of the config this overlay is enabled for
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
public void setResourceValue(
|
||||
|
||||
@@ -41,7 +41,6 @@ import java.util.Objects;
|
||||
* @see OverlayInfo#getOverlayIdentifier()
|
||||
* @see OverlayManagerTransaction.Builder#unregisterFabricatedOverlay(OverlayIdentifier)
|
||||
*/
|
||||
/** @hide */
|
||||
@DataClass(genConstructor = false, genBuilder = false, genHiddenBuilder = false,
|
||||
genEqualsHashCode = true, genToString = false)
|
||||
public final class OverlayIdentifier implements Parcelable {
|
||||
@@ -176,7 +175,6 @@ public final class OverlayIdentifier implements Parcelable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@DataClass.Generated.Member
|
||||
@@ -194,7 +192,6 @@ public final class OverlayIdentifier implements Parcelable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@DataClass.Generated.Member
|
||||
|
||||
@@ -46,9 +46,7 @@ import java.util.Objects;
|
||||
* -->
|
||||
*
|
||||
* @see OverlayManager#getOverlayInfosForTarget(String)
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public final class OverlayInfo implements CriticalOverlayInfo, Parcelable {
|
||||
|
||||
/** @hide */
|
||||
@@ -59,7 +57,6 @@ public final class OverlayInfo implements CriticalOverlayInfo, Parcelable {
|
||||
STATE_DISABLED,
|
||||
STATE_ENABLED,
|
||||
STATE_ENABLED_IMMUTABLE,
|
||||
// @Deprecated STATE_TARGET_IS_BEING_REPLACED,
|
||||
STATE_OVERLAY_IS_BEING_REPLACED,
|
||||
STATE_SYSTEM_UPDATE_UNINSTALL,
|
||||
})
|
||||
@@ -312,7 +309,6 @@ public final class OverlayInfo implements CriticalOverlayInfo, Parcelable {
|
||||
* Get the overlay name from the registered fabricated overlay.
|
||||
*
|
||||
* @return the overlay name
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
@@ -324,10 +320,8 @@ public final class OverlayInfo implements CriticalOverlayInfo, Parcelable {
|
||||
* Returns the name of the target overlaid package.
|
||||
*
|
||||
* @return the target package name
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@SystemApi
|
||||
@NonNull
|
||||
public String getTargetPackageName() {
|
||||
return targetPackageName;
|
||||
@@ -359,9 +353,7 @@ public final class OverlayInfo implements CriticalOverlayInfo, Parcelable {
|
||||
* Return the target overlayable name.
|
||||
*
|
||||
* @return the name of the target overlayable resources set
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@Override
|
||||
@Nullable
|
||||
public String getTargetOverlayableName() {
|
||||
@@ -394,7 +386,6 @@ public final class OverlayInfo implements CriticalOverlayInfo, Parcelable {
|
||||
*
|
||||
* @return an identifier representing the current overlay.
|
||||
* @see OverlayManagerTransaction.Builder#unregisterFabricatedOverlay(OverlayIdentifier)
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
@NonNull
|
||||
|
||||
@@ -54,9 +54,7 @@ import java.util.List;
|
||||
* </ul>
|
||||
*
|
||||
* @see OverlayManagerTransaction
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@SystemService(Context.OVERLAY_SERVICE)
|
||||
public class OverlayManager {
|
||||
|
||||
@@ -392,7 +390,6 @@ public class OverlayManager {
|
||||
*
|
||||
* @param targetPackageName the target package name
|
||||
* @return a list of overlay information
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
@NonUiContext
|
||||
|
||||
@@ -58,7 +58,6 @@ import java.util.Objects;
|
||||
*
|
||||
* @see OverlayManager
|
||||
* @see FabricatedOverlay
|
||||
* @hide
|
||||
*/
|
||||
public final class OverlayManagerTransaction implements Parcelable {
|
||||
// TODO: remove @hide from this class when OverlayManager is added to the
|
||||
@@ -92,8 +91,6 @@ public final class OverlayManagerTransaction implements Parcelable {
|
||||
/**
|
||||
* Get an overlay manager transaction with the specified handler.
|
||||
* @param overlayManager handles this transaction.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public OverlayManagerTransaction(@NonNull OverlayManager overlayManager) {
|
||||
this(new ArrayList<>(), Objects.requireNonNull(overlayManager));
|
||||
@@ -291,8 +288,6 @@ public final class OverlayManagerTransaction implements Parcelable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
public int describeContents() {
|
||||
@@ -301,8 +296,6 @@ public final class OverlayManagerTransaction implements Parcelable {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
@@ -340,7 +333,6 @@ public final class OverlayManagerTransaction implements Parcelable {
|
||||
*
|
||||
* @throws IOException if there is a file operation error.
|
||||
* @throws PackageManager.NameNotFoundException if the package name is not found.
|
||||
* @hide
|
||||
*/
|
||||
@NonUiContext
|
||||
public void commit() throws PackageManager.NameNotFoundException, IOException {
|
||||
@@ -374,8 +366,6 @@ public final class OverlayManagerTransaction implements Parcelable {
|
||||
* package or target overlayable is changed.
|
||||
*
|
||||
* @param overlay the overlay to register with the overlay manager
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
public void registerFabricatedOverlay(@NonNull FabricatedOverlay overlay) {
|
||||
@@ -389,7 +379,6 @@ public final class OverlayManagerTransaction implements Parcelable {
|
||||
*
|
||||
* @see OverlayManager#getOverlayInfosForTarget(String)
|
||||
* @see OverlayInfo#getOverlayIdentifier()
|
||||
* @hide
|
||||
*/
|
||||
@NonNull
|
||||
public void unregisterFabricatedOverlay(@NonNull OverlayIdentifier overlay) {
|
||||
|
||||
@@ -83,7 +83,6 @@ public class ResourcesProvider implements AutoCloseable, Closeable {
|
||||
* @return the resources provider instance for the {@code overlayInfo}
|
||||
* @throws IOException when the files can't be loaded.
|
||||
* @see OverlayManager#getOverlayInfosForTarget(String) to get the list of overlay info.
|
||||
* @hide
|
||||
*/
|
||||
@SuppressLint("WrongConstant") // TODO(b/238713267): ApkAssets blocks PROPERTY_LOADER
|
||||
@NonNull
|
||||
|
||||
Reference in New Issue
Block a user