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

Commit e6b72a18 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Fix job scheduler crash due to uninstall race am: 652c5ad5 am:...

Merge "Fix job scheduler crash due to uninstall race am: 652c5ad5 am: 1131f280" into nyc-mr1-dev-plus-aosp
parents 8e6fcafd fe834350
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -429,7 +429,18 @@ public final class JobSchedulerService extends com.android.server.SystemService
                                        }
                                        cancelJobsForUid(pkgUid, true);
                                    }
                                } catch (RemoteException e) { /* cannot happen */ }
                                } catch (RemoteException|IllegalArgumentException e) {
                                    /*
                                     * IllegalArgumentException means that the package doesn't exist.
                                     * This arises when PACKAGE_CHANGED broadcast delivery has lagged
                                     * behind outright uninstall, so by the time we try to act it's gone.
                                     * We don't need to act on this PACKAGE_CHANGED when this happens;
                                     * we'll get a PACKAGE_REMOVED later and clean up then.
                                     *
                                     * RemoteException can't actually happen; the package manager is
                                     * running in this same process.
                                     */
                                }
                                break;
                            }
                        }