Modern-Apps.git
Publicgit clone https://git.maproj.org/Modern-Apps.gitModern-Apps.git / library / aosp-stubs / src / main / java / android / app / backup / RestoreDescription.java
RestoreDescription.java32 lines · 1005 BRaw
| 1 | package android.app.backup; |
| 2 | |
| 3 | /** |
| 4 | * Compile-only stub of the framework's {@code @SystemApi} |
| 5 | * {@code android.app.backup.RestoreDescription}. Describes the next package to |
| 6 | * restore and whether its data is key/value or a full stream. Not packaged; the real |
| 7 | * class is provided by the framework at runtime. |
| 8 | */ |
| 9 | public class RestoreDescription { |
| 10 | public static final int TYPE_KEY_VALUE = 1; |
| 11 | public static final int TYPE_FULL_STREAM = 2; |
| 12 | |
| 13 | /** Sentinel returned by {@code nextRestorePackage()} when the set is exhausted. */ |
| 14 | public static final RestoreDescription NO_MORE_PACKAGES = |
| 15 | new RestoreDescription("NO_MORE_PACKAGES", 0); |
| 16 | |
| 17 | private final String mPackageName; |
| 18 | private final int mDataType; |
| 19 | |
| 20 | public RestoreDescription(String packageName, int dataType) { |
| 21 | mPackageName = packageName; |
| 22 | mDataType = dataType; |
| 23 | } |
| 24 | |
| 25 | public String getPackageName() { |
| 26 | return mPackageName; |
| 27 | } |
| 28 | |
| 29 | public int getDataType() { |
| 30 | return mDataType; |
| 31 | } |
| 32 | } |