Commit 342b0294 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Fix a crash in PackageMetrics.getPackageStatsForAndroidO.

This CL catches an exception in PackageMetrics.getPackageStatsForAndroidO.

The crash happens if (Binder.getCallingUid() != appInfo.uid).

Currently we don't know the reason. Something tries to launch Chrome process
in a remote process.

Bug: 984761
Change-Id: If6186d9218fdde99be95c4ad8ec4da896abbba4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1725473Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682539}
parent 91ebbb8c
......@@ -66,7 +66,7 @@ public class PackageMetrics {
pmd.codeSize += storageStats.getAppBytes();
pmd.dataSize += (storageStats.getDataBytes() - storageStats.getCacheBytes());
pmd.cacheSize += storageStats.getCacheBytes();
} catch (IOException | NameNotFoundException ex) {
} catch (IOException | NameNotFoundException | SecurityException ex) {
Log.e(TAG, "Error calling into queryStatsForPackage", ex);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment