Remove old NFC unlock api
Bug: 16401635 Change-Id: I667d91c2346355ed0a2115644e6192f5f208e288
This commit is contained in:
@@ -19045,7 +19045,6 @@ package android.nfc {
|
||||
method public boolean invokeBeam(android.app.Activity);
|
||||
method public boolean isEnabled();
|
||||
method public boolean isNdefPushEnabled();
|
||||
method public boolean registerLockscreenDispatch(android.nfc.NfcAdapter.NfcLockscreenDispatch, java.lang.String[]);
|
||||
method public void setBeamPushUris(android.net.Uri[], android.app.Activity);
|
||||
method public void setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity);
|
||||
method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, android.app.Activity...);
|
||||
@@ -19081,10 +19080,6 @@ package android.nfc {
|
||||
method public abstract android.nfc.NdefMessage createNdefMessage(android.nfc.NfcEvent);
|
||||
}
|
||||
|
||||
public static abstract interface NfcAdapter.NfcLockscreenDispatch {
|
||||
method public abstract boolean onTagDetected(android.nfc.Tag);
|
||||
}
|
||||
|
||||
public static abstract interface NfcAdapter.OnNdefPushCompleteCallback {
|
||||
method public abstract void onNdefPushComplete(android.nfc.NfcEvent);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,6 @@ interface INfcAdapter
|
||||
void setReaderMode (IBinder b, IAppCallback callback, int flags, in Bundle extras);
|
||||
void setP2pModes(int initatorModes, int targetModes);
|
||||
|
||||
void registerLockscreenDispatch(INfcLockscreenDispatch lockscreenDispatch, in int[] techList);
|
||||
void addNfcUnlockHandler(INfcUnlockHandler unlockHandler, in int[] techList);
|
||||
void removeNfcUnlockHandler(INfcUnlockHandler unlockHandler);
|
||||
}
|
||||
|
||||
@@ -384,16 +384,6 @@ public final class NfcAdapter {
|
||||
public Uri[] createBeamUris(NfcEvent event);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A callback to be invoked when an application has registered for receiving
|
||||
* tags at the lockscreen.
|
||||
*/
|
||||
public interface NfcLockscreenDispatch {
|
||||
public boolean onTagDetected(Tag tag);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A callback to be invoked when an application has registered as a
|
||||
* handler to unlock the device given an NFC tag at the lockscreen.
|
||||
@@ -1468,26 +1458,6 @@ public final class NfcAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean registerLockscreenDispatch(final NfcLockscreenDispatch lockscreenDispatch,
|
||||
String[] techList) {
|
||||
try {
|
||||
sService.registerLockscreenDispatch(new INfcLockscreenDispatch.Stub() {
|
||||
@Override
|
||||
public boolean onTagDetected(Tag tag) throws RemoteException {
|
||||
return lockscreenDispatch.onTagDetected(tag);
|
||||
}
|
||||
}, Tag.getTechCodesFromStrings(techList));
|
||||
} catch (RemoteException e) {
|
||||
attemptDeadServiceRecovery(e);
|
||||
return false;
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.e(TAG, "Unable to register LockscreenDispatch", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a new NFC unlock handler with the NFC service.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user