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

Commit 74037d12 authored by Daniel Nishi's avatar Daniel Nishi Committed by Android (Google) Code Review
Browse files

Merge "Don't crash in background after app uninstall." into oc-dev

parents 92fc8bdd 2b80ab7d
Loading
Loading
Loading
Loading
+19 −10
Original line number Diff line number Diff line
@@ -984,6 +984,7 @@ public class ApplicationsState {
                                    mCurComputingSizeUserId = UserHandle.getUserId(entry.info.uid);

                                    mBackgroundHandler.post(() -> {
                                        try {
                                            final StorageStats stats = mStats.queryStatsForPackage(
                                                    mCurComputingSizeUuid, mCurComputingSizePkg,
                                                    UserHandle.of(mCurComputingSizeUserId));
@@ -996,6 +997,14 @@ public class ApplicationsState {
                                                mStatsObserver.onGetStatsCompleted(legacyStats, true);
                                            } catch (RemoteException ignored) {
                                            }
                                        } catch (IllegalStateException e) {
                                            Log.e(TAG,"An exception occurred while fetching app size", e);
                                            try {
                                                mStatsObserver.onGetStatsCompleted(null, false);
                                            } catch (RemoteException ignored) {
                                            }
                                        }

                                    });
                                }
                                if (DEBUG_LOCKING) Log.v(TAG, "MSG_LOAD_SIZES releasing: now computing");