summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/nfc/NfcService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java
index 551469d..d63f84f 100755
--- a/src/com/android/nfc/NfcService.java
+++ b/src/com/android/nfc/NfcService.java
@@ -1403,7 +1403,16 @@ public class NfcService implements DeviceHostListener {
public void setCardEmulationRoute(String pkg, int route) throws RemoteException {
NfcService.this.enforceNfceeAdminPerm(pkg);
mEeRoutingState = route;
- applyRouting(true);
+ ApplyRoutingTask applyRoutingTask = new ApplyRoutingTask();
+ applyRoutingTask.execute();
+ try {
+ // Block until route is set
+ applyRoutingTask.get();
+ } catch (ExecutionException e) {
+ Log.e(TAG, "failed to set card emulation mode");
+ } catch (InterruptedException e) {
+ Log.e(TAG, "failed to set card emulation mode");
+ }
}
@Override