Commit 56e8a2e3 authored by Jeevan Shikaram's avatar Jeevan Shikaram Committed by Commit Bot

[App Management] Correctly label Play Store as a system app.

This CL modifies the function that determins the install source of an
ARC app. This handles the special case of the Play Store app, which is
classified as a default app on the Android side, but cannot be
uninstalled as it's a system image app.

Bug: 1009397
Change-Id: Iaf7e92d46596b85f09a46c724a17bc75f55991ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1837552Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: Jeevan Shikaram <jshikaram@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702604}
parent 79479bfc
...@@ -468,6 +468,11 @@ void ArcApps::LoadPlayStoreIcon(apps::mojom::IconCompression icon_compression, ...@@ -468,6 +468,11 @@ void ArcApps::LoadPlayStoreIcon(apps::mojom::IconCompression icon_compression,
apps::mojom::InstallSource GetInstallSource(const ArcAppListPrefs* prefs, apps::mojom::InstallSource GetInstallSource(const ArcAppListPrefs* prefs,
const std::string& package_name) { const std::string& package_name) {
// TODO(crbug.com/1010821): Create a generic check for kSystem apps.
if (prefs->GetAppIdByPackageName(package_name) == arc::kPlayStoreAppId) {
return apps::mojom::InstallSource::kSystem;
}
if (prefs->IsDefault(package_name)) { if (prefs->IsDefault(package_name)) {
return apps::mojom::InstallSource::kDefault; return apps::mojom::InstallSource::kDefault;
} }
......
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