Better error message for missing job services.

Bug: 141645789
Test: presubmit
Change-Id: I334639d624f08ae2ec5ee235d609c780a09a1338
This commit is contained in:
Alex Buynytskyy
2021-05-05 15:36:52 -07:00
parent e68bdc6c8b
commit 8e1f1debde
2 changed files with 2 additions and 4 deletions

View File

@@ -2629,8 +2629,7 @@ public class JobSchedulerService extends com.android.server.SystemService
}
} catch (NameNotFoundException e) {
throw new IllegalArgumentException(
"Tried to schedule job for non-existent package: "
+ service.getPackageName());
"Tried to schedule job for non-existent component: " + service);
}
}

View File

@@ -4775,8 +4775,7 @@ public abstract class PackageManager {
* @param flags Additional option flags to modify the data returned.
* @return A {@link ServiceInfo} object containing information about the
* service.
* @throws NameNotFoundException if a package with the given name cannot be
* found on the system.
* @throws NameNotFoundException if the component cannot be found on the system.
*/
@NonNull
public abstract ServiceInfo getServiceInfo(@NonNull ComponentName component,