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

Commit 98a8e241 authored by Robert Berry's avatar Robert Berry
Browse files

Add flag indicating transport is device-to-device transfer

This flag allows BackupAgent instances to optionally backup more data
for a device-to-device transfer. i.e., an app developer might want to
only backup certain sensitive data if the transport is either
client-side encrypted or a direct device-to-device transfer.

Test: none, as it is just adding a flag
Bug: 72486408
Change-Id: I7512ed0b1510f48789fe47cb8b7379674c315e76
parent 53d179d2
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -6894,6 +6894,7 @@ package android.app.backup {
    method public void onRestoreFile(android.os.ParcelFileDescriptor, long, java.io.File, int, long, long) throws java.io.IOException;
    method public void onRestoreFinished();
    field public static final int FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED = 1; // 0x1
    field public static final int FLAG_DEVICE_TO_DEVICE_TRANSFER = 2; // 0x2
    field public static final int TYPE_DIRECTORY = 2; // 0x2
    field public static final int TYPE_FILE = 1; // 0x1
  }
@@ -11558,15 +11559,15 @@ package android.content.res {
  public final class AssetManager implements java.lang.AutoCloseable {
    method public void close();
    method public final java.lang.String[] getLocales();
    method public final java.lang.String[] list(java.lang.String) throws java.io.IOException;
    method public final java.io.InputStream open(java.lang.String) throws java.io.IOException;
    method public final java.io.InputStream open(java.lang.String, int) throws java.io.IOException;
    method public final android.content.res.AssetFileDescriptor openFd(java.lang.String) throws java.io.IOException;
    method public final android.content.res.AssetFileDescriptor openNonAssetFd(java.lang.String) throws java.io.IOException;
    method public final android.content.res.AssetFileDescriptor openNonAssetFd(int, java.lang.String) throws java.io.IOException;
    method public final android.content.res.XmlResourceParser openXmlResourceParser(java.lang.String) throws java.io.IOException;
    method public final android.content.res.XmlResourceParser openXmlResourceParser(int, java.lang.String) throws java.io.IOException;
    method public java.lang.String[] getLocales();
    method public java.lang.String[] list(java.lang.String) throws java.io.IOException;
    method public java.io.InputStream open(java.lang.String) throws java.io.IOException;
    method public java.io.InputStream open(java.lang.String, int) throws java.io.IOException;
    method public android.content.res.AssetFileDescriptor openFd(java.lang.String) throws java.io.IOException;
    method public android.content.res.AssetFileDescriptor openNonAssetFd(java.lang.String) throws java.io.IOException;
    method public android.content.res.AssetFileDescriptor openNonAssetFd(int, java.lang.String) throws java.io.IOException;
    method public android.content.res.XmlResourceParser openXmlResourceParser(java.lang.String) throws java.io.IOException;
    method public android.content.res.XmlResourceParser openXmlResourceParser(int, java.lang.String) throws java.io.IOException;
    field public static final int ACCESS_BUFFER = 3; // 0x3
    field public static final int ACCESS_RANDOM = 1; // 0x1
    field public static final int ACCESS_STREAMING = 2; // 0x2
+9 −0
Original line number Diff line number Diff line
@@ -154,6 +154,15 @@ public abstract class BackupAgent extends ContextWrapper {
     */
    public static final int FLAG_CLIENT_SIDE_ENCRYPTION_ENABLED = 1;

    /**
     * Flag for {@link BackupDataOutput#getTransportFlags()} and
     * {@link FullBackupDataOutput#getTransportFlags()} only.
     *
     * <p>The transport is for a device-to-device transfer. There is no third party or intermediate
     * storage. The user's backup data is sent directly to another device over e.g., USB or WiFi.
     */
    public static final int FLAG_DEVICE_TO_DEVICE_TRANSFER = 2;

    Handler mHandler = null;

    Handler getHandler() {