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
This commit is contained in:
Roshan Pius
2023-02-24 10:43:45 -08:00
parent 4dfa2fb12e
commit 7bf3becc98

View File

@@ -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) {