Merge "Update Secure NFC API definitions"
This commit is contained in:
@@ -29110,7 +29110,6 @@ package android.nfc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final class NfcAdapter {
|
public final class NfcAdapter {
|
||||||
method public boolean deviceSupportsNfcSecure();
|
|
||||||
method public void disableForegroundDispatch(android.app.Activity);
|
method public void disableForegroundDispatch(android.app.Activity);
|
||||||
method @Deprecated public void disableForegroundNdefPush(android.app.Activity);
|
method @Deprecated public void disableForegroundNdefPush(android.app.Activity);
|
||||||
method public void disableReaderMode(android.app.Activity);
|
method public void disableReaderMode(android.app.Activity);
|
||||||
@@ -29122,7 +29121,8 @@ package android.nfc {
|
|||||||
method @Deprecated public boolean invokeBeam(android.app.Activity);
|
method @Deprecated public boolean invokeBeam(android.app.Activity);
|
||||||
method public boolean isEnabled();
|
method public boolean isEnabled();
|
||||||
method @Deprecated public boolean isNdefPushEnabled();
|
method @Deprecated public boolean isNdefPushEnabled();
|
||||||
method public boolean isNfcSecureEnabled();
|
method public boolean isSecureNfcEnabled();
|
||||||
|
method public boolean isSecureNfcSupported();
|
||||||
method @Deprecated public void setBeamPushUris(android.net.Uri[], android.app.Activity);
|
method @Deprecated public void setBeamPushUris(android.net.Uri[], android.app.Activity);
|
||||||
method @Deprecated public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity);
|
method @Deprecated public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity);
|
||||||
method @Deprecated public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...);
|
method @Deprecated public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...);
|
||||||
|
|||||||
@@ -3958,9 +3958,9 @@ package android.nfc {
|
|||||||
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disableNdefPush();
|
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disableNdefPush();
|
||||||
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable();
|
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable();
|
||||||
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableNdefPush();
|
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableNdefPush();
|
||||||
|
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableSecureNfc(boolean);
|
||||||
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean removeNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler);
|
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean removeNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler);
|
||||||
method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, int);
|
method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, int);
|
||||||
method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean setNfcSecure(boolean);
|
|
||||||
field public static final int FLAG_NDEF_PUSH_NO_CONFIRM = 1; // 0x1
|
field public static final int FLAG_NDEF_PUSH_NO_CONFIRM = 1; // 0x1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1714,11 +1714,12 @@ public final class NfcAdapter {
|
|||||||
/**
|
/**
|
||||||
* Sets Secure NFC feature.
|
* Sets Secure NFC feature.
|
||||||
* <p>This API is for the Settings application.
|
* <p>This API is for the Settings application.
|
||||||
|
* @return True if successful
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
@RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
|
@RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS)
|
||||||
public boolean setNfcSecure(boolean enable) {
|
public boolean enableSecureNfc(boolean enable) {
|
||||||
if (!sHasNfcFeature) {
|
if (!sHasNfcFeature) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
@@ -1736,7 +1737,7 @@ public final class NfcAdapter {
|
|||||||
* @return True if device supports Secure NFC, false otherwise
|
* @return True if device supports Secure NFC, false otherwise
|
||||||
* @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
|
* @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
|
||||||
*/
|
*/
|
||||||
public boolean deviceSupportsNfcSecure() {
|
public boolean isSecureNfcSupported() {
|
||||||
if (!sHasNfcFeature) {
|
if (!sHasNfcFeature) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
@@ -1751,12 +1752,12 @@ public final class NfcAdapter {
|
|||||||
/**
|
/**
|
||||||
* Checks Secure NFC feature is enabled.
|
* Checks Secure NFC feature is enabled.
|
||||||
*
|
*
|
||||||
* @return True if device supports Secure NFC is enabled, false otherwise
|
* @return True if Secure NFC is enabled, false otherwise
|
||||||
* @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
|
* @throws UnsupportedOperationException if FEATURE_NFC is unavailable.
|
||||||
* @throws UnsupportedOperationException if device doesn't support
|
* @throws UnsupportedOperationException if device doesn't support
|
||||||
* Secure NFC functionality. {@link #deviceSupportsNfcSecure}
|
* Secure NFC functionality. {@link #isSecureNfcSupported}
|
||||||
*/
|
*/
|
||||||
public boolean isNfcSecureEnabled() {
|
public boolean isSecureNfcEnabled() {
|
||||||
if (!sHasNfcFeature) {
|
if (!sHasNfcFeature) {
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user