Merge "Slightly tweak the "extract" script." into main
diff --git a/nfc/api/system-current.txt b/nfc/api/system-current.txt
index cf11ac0..6bd6072 100644
--- a/nfc/api/system-current.txt
+++ b/nfc/api/system-current.txt
@@ -200,9 +200,11 @@
method @Nullable @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) @WorkerThread public android.nfc.T4tNdefNfceeCcFileInfo readCcfile();
method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) @WorkerThread public byte[] readData(@IntRange(from=0, to=65535) int);
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) @WorkerThread public int writeData(@IntRange(from=0, to=65535) int, @NonNull byte[]);
+ field public static final int CLEAR_DATA_FAILED_DEVICE_BUSY = -1; // 0xffffffff
field public static final int CLEAR_DATA_FAILED_INTERNAL = 0; // 0x0
field public static final int CLEAR_DATA_SUCCESS = 1; // 0x1
field public static final int WRITE_DATA_ERROR_CONNECTION_FAILED = -6; // 0xfffffffa
+ field public static final int WRITE_DATA_ERROR_DEVICE_BUSY = -9; // 0xfffffff7
field public static final int WRITE_DATA_ERROR_EMPTY_PAYLOAD = -7; // 0xfffffff9
field public static final int WRITE_DATA_ERROR_INTERNAL = -1; // 0xffffffff
field public static final int WRITE_DATA_ERROR_INVALID_FILE_ID = -4; // 0xfffffffc
@@ -217,21 +219,14 @@
method public int describeContents();
method @IntRange(from=15, to=32767) public int getCcFileLength();
method @IntRange(from=0xffffffff, to=65535) public int getFileId();
- method @IntRange(from=15, to=65535) public int getMaxReadLength();
method @IntRange(from=5, to=32767) public int getMaxSize();
- method @IntRange(from=13, to=65535) public int getMaxWriteLength();
- method public int getReadAccess();
method public int getVersion();
- method public int getWriteAccess();
+ method public boolean isReadAllowed();
+ method public boolean isWriteAllowed();
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.nfc.T4tNdefNfceeCcFileInfo> CREATOR;
- field public static final int READ_ACCESS_GRANTED_RESTRICTED = 128; // 0x80
- field public static final int READ_ACCESS_GRANTED_UNRESTRICTED = 0; // 0x0
field public static final int VERSION_2_0 = 32; // 0x20
field public static final int VERSION_3_0 = 48; // 0x30
- field public static final int WRITE_ACCESS_GRANTED_RESTRICTED = 128; // 0x80
- field public static final int WRITE_ACCESS_GRANTED_UNRESTRICTED = 0; // 0x0
- field public static final int WRITE_ACCESS_NOT_GRANTED = 255; // 0xff
}
}
diff --git a/nfc/java/android/nfc/T4tNdefNfcee.java b/nfc/java/android/nfc/T4tNdefNfcee.java
index 06d02c5..05a30aa 100644
--- a/nfc/java/android/nfc/T4tNdefNfcee.java
+++ b/nfc/java/android/nfc/T4tNdefNfcee.java
@@ -100,9 +100,14 @@
public static final int WRITE_DATA_ERROR_EMPTY_PAYLOAD = -7;
/**
* Returns flag for {@link #writeData(int, byte[])}.
- * It idicates write data fail due to invalid ndef format.
+ * It indicates write data fail due to invalid ndef format.
*/
public static final int WRITE_DATA_ERROR_NDEF_VALIDATION_FAILED = -8;
+ /**
+ * Returns flag for {@link #writeData(int, byte[])}.
+ * It indicates write data fail if a concurrent NDEF NFCEE operation is ongoing.
+ */
+ public static final int WRITE_DATA_ERROR_DEVICE_BUSY = -9;
/**
* Possible return values for {@link #writeData(int, byte[])}.
@@ -119,6 +124,7 @@
WRITE_DATA_ERROR_CONNECTION_FAILED,
WRITE_DATA_ERROR_EMPTY_PAYLOAD,
WRITE_DATA_ERROR_NDEF_VALIDATION_FAILED,
+ WRITE_DATA_ERROR_DEVICE_BUSY,
})
@Retention(RetentionPolicy.SOURCE)
public @interface WriteDataStatus{}
@@ -128,6 +134,9 @@
*
* <p>This is an I/O operation and will block until complete. It must
* not be called from the main application thread.</p>
+ * <p>Applications must send complete Ndef Message payload, do not need to fragment
+ * the payload, it will be automatically fragmented and defragmented by
+ * {@link #writeData} if it exceeds max message length limits</p>
*
* @param fileId File id (Refer NFC Forum Type 4 Tag Specification
* Section 4.2 File Identifiers and Access Conditions
@@ -155,9 +164,10 @@
* @param fileId File Id (Refer
* Section 4.2 File Identifiers and Access Conditions
* for more information) from which to read.
- * @return - Returns Ndef message if success
+ * @return - Returns complete Ndef message if success
* Refer to Nfc forum NDEF specification NDEF Message section
- * @throws IllegalStateException if read fails because the fileId is invalid.
+ * @throws IllegalStateException if read fails because the fileId is invalid
+ * or if a concurrent operation is in progress.
* @hide
*/
@SystemApi
@@ -179,6 +189,12 @@
* It indicates clear data failed due to internal error while processing the clear.
*/
public static final int CLEAR_DATA_FAILED_INTERNAL = 0;
+ /**
+ * Return flag for {@link #clearNdefData()}.
+ * It indicates clear data failed if a concurrent NDEF NFCEE operation is ongoing.
+ */
+ public static final int CLEAR_DATA_FAILED_DEVICE_BUSY = -1;
+
/**
* Possible return values for {@link #clearNdefData()}.
@@ -188,6 +204,7 @@
@IntDef(prefix = { "CLEAR_DATA_" }, value = {
CLEAR_DATA_SUCCESS,
CLEAR_DATA_FAILED_INTERNAL,
+ CLEAR_DATA_FAILED_DEVICE_BUSY,
})
@Retention(RetentionPolicy.SOURCE)
public @interface ClearDataStatus{}
@@ -245,6 +262,7 @@
* Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.4" for more details.
*
* @return Returns CC file content if success or null if failed to read.
+ * @throws IllegalStateException if the device is busy.
* @hide
*/
@SystemApi
diff --git a/nfc/java/android/nfc/T4tNdefNfceeCcFileInfo.java b/nfc/java/android/nfc/T4tNdefNfceeCcFileInfo.java
index 5fca052..ce67f8f 100644
--- a/nfc/java/android/nfc/T4tNdefNfceeCcFileInfo.java
+++ b/nfc/java/android/nfc/T4tNdefNfceeCcFileInfo.java
@@ -47,14 +47,6 @@
*/
private int mVersion;
/**
- * Indicates the max data size by a single ReadBinary<p>
- */
- private int mMaxReadLength;
- /**
- * Indicates the max data size by a single UpdateBinary<p>
- */
- private int mMaxWriteLength;
- /**
* Indicates the NDEF File Identifier<p>
*/
private int mFileId;
@@ -65,40 +57,35 @@
/**
* Indicates the read access condition<p>
*/
- private int mReadAccess;
+ private boolean mIsReadAllowed;
/**
* Indicates the write access condition<p>
*/
- private int mWriteAccess;
+ private boolean mIsWriteAllowed;
/**
* Constructor to be used by NFC service and internal classes.
* @hide
*/
- public T4tNdefNfceeCcFileInfo(int cclen, int version, int maxLe, int maxLc,
+ public T4tNdefNfceeCcFileInfo(int cclen, int version,
int ndefFileId, int ndefMaxSize,
- int ndefReadAccess, int ndefWriteAccess) {
+ boolean isReadAllowed, boolean isWriteAllowed) {
mCcLength = cclen;
mVersion = version;
- mMaxWriteLength = maxLc;
- mMaxReadLength = maxLe;
mFileId = ndefFileId;
mMaxSize = ndefMaxSize;
- mReadAccess = ndefReadAccess;
- mWriteAccess = ndefWriteAccess;
+ mIsReadAllowed = isReadAllowed;
+ mIsWriteAllowed = isWriteAllowed;
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
-
dest.writeInt(mCcLength);
dest.writeInt(mVersion);
- dest.writeInt(mMaxWriteLength);
- dest.writeInt(mMaxReadLength);
dest.writeInt(mFileId);
dest.writeInt(mMaxSize);
- dest.writeInt(mReadAccess);
- dest.writeInt(mWriteAccess);
+ dest.writeBoolean(mIsReadAllowed);
+ dest.writeBoolean(mIsWriteAllowed);
}
/**
@@ -146,30 +133,6 @@
}
/**
- * Indicates the max data size that can be read by a single invocation of
- * {@link T4tNdefNfcee#readData(int)}.
- *
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.4" MLe.
- * @return max size of read (in bytes).
- */
- @IntRange(from = 0xf, to = 0xffff)
- public int getMaxReadLength() {
- return mMaxReadLength;
- }
-
- /**
- * Indicates the max data size that can be written by a single invocation of
- * {@link T4tNdefNfcee#writeData(int, byte[])}
- *
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.4" MLc.
- * @return max size of write (in bytes).
- */
- @IntRange(from = 0xd, to = 0xffff)
- public int getMaxWriteLength() {
- return mMaxWriteLength;
- }
-
- /**
* Indicates the NDEF File Identifier. This is the identifier used in the last invocation of
* {@link T4tNdefNfcee#writeData(int, byte[])}
*
@@ -191,73 +154,21 @@
}
/**
- * T4T tag read access granted without any security.
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- */
- public static final int READ_ACCESS_GRANTED_UNRESTRICTED = 0x0;
- /**
- * T4T tag read access granted with limited proprietary access only.
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- */
- public static final int READ_ACCESS_GRANTED_RESTRICTED = 0x80;
-
- /**
- * Possible return values for {@link #getVersion()}.
- * @hide
- */
- @IntDef(prefix = { "READ_ACCESS_GRANTED_" }, value = {
- READ_ACCESS_GRANTED_RESTRICTED,
- READ_ACCESS_GRANTED_UNRESTRICTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface ReadAccess {}
-
- /**
* Indicates the read access condition.
* Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- * @return read access restriction
+ * @return boolean true if read access is allowed, otherwise false.
*/
- @ReadAccess
- public int getReadAccess() {
- return mReadAccess;
+ public boolean isReadAllowed() {
+ return mIsReadAllowed;
}
/**
- * T4T tag write access granted without any security.
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- */
- public static final int WRITE_ACCESS_GRANTED_UNRESTRICTED = 0x0;
- /**
- * T4T tag write access granted with limited proprietary access only.
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- */
- public static final int WRITE_ACCESS_GRANTED_RESTRICTED = 0x80;
- /**
- * T4T tag write access not granted.
- * Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- */
- public static final int WRITE_ACCESS_NOT_GRANTED = 0xFF;
-
- /**
- * Possible return values for {@link #getVersion()}.
- * @hide
- */
- @IntDef(prefix = { "READ_ACCESS_GRANTED_" }, value = {
- WRITE_ACCESS_GRANTED_RESTRICTED,
- WRITE_ACCESS_GRANTED_UNRESTRICTED,
- WRITE_ACCESS_NOT_GRANTED,
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface WriteAccess {}
-
- /**
* Indicates the write access condition.
* Refer to the NFC forum specification "NFCForum-TS-T4T-1.1 section 4.2" for more details.
- * @return write access restriction
+ * @return boolean if write access is allowed, otherwise false.
*/
- @WriteAccess
- public int getWriteAccess() {
- return mWriteAccess;
+ public boolean isWriteAllowed() {
+ return mIsWriteAllowed;
}
@Override
@@ -273,16 +184,14 @@
// NdefNfceeCcFileInfo fields
int cclen = in.readInt();
int version = in.readInt();
- int maxLe = in.readInt();
- int maxLc = in.readInt();
int ndefFileId = in.readInt();
int ndefMaxSize = in.readInt();
- int ndefReadAccess = in.readInt();
- int ndefWriteAccess = in.readInt();
+ boolean isReadAllowed = in.readBoolean();
+ boolean isWriteAllowed = in.readBoolean();
- return new T4tNdefNfceeCcFileInfo(cclen, version, maxLe, maxLc,
+ return new T4tNdefNfceeCcFileInfo(cclen, version,
ndefFileId, ndefMaxSize,
- ndefReadAccess, ndefWriteAccess);
+ isReadAllowed, isWriteAllowed);
}
@Override
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java b/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java
index 2227943..9140cef 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DeviceConfigService.java
@@ -66,7 +66,6 @@
public final class DeviceConfigService extends Binder {
private static final List<String> sAconfigTextProtoFilesOnDevice = List.of(
"/system/etc/aconfig_flags.pb",
- "/system_ext/etc/aconfig_flags.pb",
"/product/etc/aconfig_flags.pb",
"/vendor/etc/aconfig_flags.pb");
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
index 68b66df..3b4988e 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java
@@ -171,7 +171,6 @@
private static final List<String> sAconfigTextProtoFilesOnDevice = List.of(
"/system/etc/aconfig_flags.pb",
- "/system_ext/etc/aconfig_flags.pb",
"/product/etc/aconfig_flags.pb",
"/vendor/etc/aconfig_flags.pb");
diff --git a/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS b/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS
index 1f66c91..1ed8c06 100644
--- a/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS
+++ b/packages/SystemUI/src/com/android/systemui/accessibility/OWNERS
@@ -1,3 +1,4 @@
# Bug component: 44215
-include /core/java/android/view/accessibility/OWNERS
\ No newline at end of file
+include /core/java/android/view/accessibility/OWNERS
+jonesriley@google.com
\ No newline at end of file