Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

NfcAdapterExtras: expose driver name.

Bug: 7276355
Change-Id: I65597f732c2ccb749f8fc5ef1793bacf5de8b592
  • Loading branch information...
commit f74df47fc9aee3a274db006db5024892972a0c8a 1 parent 26884df
@mik3y mik3y authored
View
1  core/java/android/nfc/INfcAdapterExtras.aidl
@@ -29,4 +29,5 @@ interface INfcAdapterExtras {
int getCardEmulationRoute(in String pkg);
void setCardEmulationRoute(in String pkg, int route);
void authenticate(in String pkg, in byte[] token);
+ String getDriverName(in String pkg);
}
View
17 nfc-extras/java/com/android/nfc_extras/NfcAdapterExtras.java
@@ -234,4 +234,21 @@ public void authenticate(byte[] token) {
attemptDeadServiceRecovery(e);
}
}
+
+ /**
+ * Returns the name of this adapter's driver.
+ *
+ * <p>Different NFC adapters may use different drivers. This value is
+ * informational and should not be parsed.
+ *
+ * @return the driver name, or empty string if unknown
+ */
+ public String getDriverName() {
+ try {
+ return sService.getDriverName(mPackageName);
+ } catch (RemoteException e) {
+ attemptDeadServiceRecovery(e);
+ return "";
+ }
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.