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

Commit b59d35c1 authored by Andres Morales's avatar Andres Morales
Browse files

Remove old NFC unlock api

Bug: 16401635
Change-Id: I667d91c2346355ed0a2115644e6192f5f208e288
parent b7ebbded
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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);
  }
+0 −1
Original line number Diff line number Diff line
@@ -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);
}
+0 −30
Original line number Diff line number Diff line
@@ -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.
     *