diff options
| author | 2023-02-24 10:43:45 -0800 | |
|---|---|---|
| committer | 2023-03-16 15:56:58 +0000 | |
| commit | 7bf3becc98706029401a82b46b2bb37088667fbd (patch) | |
| tree | 2d82b8fe5cdd88f658c062d93d71a94bac34d783 | |
| parent | 4dfa2fb12ed6b9a6e17d0485f0f33133acc2cd0f (diff) | |
nfc(api): Remove isResumed checks from API class
Similar to aosp/2448864, checks for isResumed() is somewhat redundant
since we enforce that only fg apps can use this API.
Bug: 263565738
Test: atest CtsNfcTestCases
Test: CtsVerifier tag tests
Change-Id: Ib354cb2d8a81cd0a461ac3807daf8adee980c93e
| -rw-r--r-- | core/java/android/nfc/cardemulation/CardEmulation.java | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/core/java/android/nfc/cardemulation/CardEmulation.java b/core/java/android/nfc/cardemulation/CardEmulation.java index ac3344e91c06..4909b0830eeb 100644 --- a/core/java/android/nfc/cardemulation/CardEmulation.java +++ b/core/java/android/nfc/cardemulation/CardEmulation.java @@ -594,9 +594,6 @@ public final class CardEmulation { if (activity == null || service == null) { throw new NullPointerException("activity or service or category is null"); } - if (!activity.isResumed()) { - throw new IllegalArgumentException("Activity must be resumed."); - } try { return sService.setPreferredService(service); } catch (RemoteException e) { @@ -629,9 +626,6 @@ public final class CardEmulation { if (activity == null) { throw new NullPointerException("activity is null"); } - if (!activity.isResumed()) { - throw new IllegalArgumentException("Activity must be resumed."); - } try { return sService.unsetPreferredService(); } catch (RemoteException e) { |