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

Commit 59bc73a1 authored by Kweku Adams's avatar Kweku Adams
Browse files

Use LimitExceededException instead of IllegalStateException.

Bug: 141645789
Test: Android builds
Change-Id: If4b8cd24af96062acf86bef9ebd5ce5db63c9e0e
parent 18fb866d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import android.os.BatteryStats;
import android.os.BatteryStatsInternal;
import android.os.Binder;
import android.os.Handler;
import android.os.LimitExceededException;
import android.os.Looper;
import android.os.Message;
import android.os.ParcelFileDescriptor;
@@ -1002,7 +1003,7 @@ public class JobSchedulerService extends com.android.server.SystemService
                    }
                    if (isDebuggable) {
                        // Only throw the exception for debuggable apps.
                        throw new IllegalStateException(
                        throw new LimitExceededException(
                                "schedule()/enqueue() called more than "
                                        + mQuotaTracker.getLimit(Category.SINGLE_CATEGORY)
                                        + " times in the past "