Merge "Skip item infos that fail session info verification." into sc-dev
This commit is contained in:
commit
e00d88e32a
|
@ -130,8 +130,9 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
|||
packageName);
|
||||
|
||||
if (!packageInstaller.verifySessionInfo(sessionInfo)) {
|
||||
FileLog.d(LOG, "Item info failed session info verification: "
|
||||
+ workspaceInfo);
|
||||
FileLog.d(LOG, "Item info failed session info verification. "
|
||||
+ "Skipping : " + workspaceInfo);
|
||||
continue;
|
||||
}
|
||||
|
||||
List<LauncherActivityInfo> activities = launcherApps
|
||||
|
|
|
@ -217,7 +217,8 @@ public class InstallSessionHelper {
|
|||
void tryQueuePromiseAppIcon(PackageInstaller.SessionInfo sessionInfo) {
|
||||
if (FeatureFlags.PROMISE_APPS_NEW_INSTALLS.get()
|
||||
&& SessionCommitReceiver.isEnabled(mAppContext)
|
||||
&& verifySessionInfo(sessionInfo)) {
|
||||
&& verifySessionInfo(sessionInfo)
|
||||
&& !promiseIconAddedForId(sessionInfo.getSessionId())) {
|
||||
FileLog.d(LOG, "Adding package name to install queue: "
|
||||
+ sessionInfo.getAppPackageName());
|
||||
|
||||
|
@ -234,25 +235,28 @@ public class InstallSessionHelper {
|
|||
&& sessionInfo.getInstallReason() == PackageManager.INSTALL_REASON_USER
|
||||
&& sessionInfo.getAppIcon() != null
|
||||
&& !TextUtils.isEmpty(sessionInfo.getAppLabel())
|
||||
&& !promiseIconAddedForId(sessionInfo.getSessionId())
|
||||
&& !new PackageManagerHelper(mAppContext).isAppInstalled(
|
||||
sessionInfo.getAppPackageName(), getUserHandle(sessionInfo));
|
||||
|
||||
if (sessionInfo != null) {
|
||||
Bitmap appIcon = sessionInfo.getAppIcon();
|
||||
|
||||
FileLog.d(LOG, String.format(
|
||||
"Verifying session info. Valid: %b, Session verified: %b, Install reason valid:"
|
||||
+ " %b, App icon: %s, App label: %s, Promise icon added: %b, "
|
||||
+ "App installed: %b.",
|
||||
validSessionInfo,
|
||||
verify(sessionInfo) != null,
|
||||
sessionInfo.getInstallReason() == PackageManager.INSTALL_REASON_USER,
|
||||
appIcon == null ? "null" : IOUtils.toBase64String(appIcon),
|
||||
sessionInfo.getAppLabel(),
|
||||
promiseIconAddedForId(sessionInfo.getSessionId()),
|
||||
new PackageManagerHelper(mAppContext).isAppInstalled(
|
||||
sessionInfo.getAppPackageName(), getUserHandle(sessionInfo))));
|
||||
if (Utilities.IS_DEBUG_DEVICE) {
|
||||
FileLog.d(LOG, String.format(
|
||||
"Verifying session info. Valid: %b,"
|
||||
+ " Session verified: %b,"
|
||||
+ " Install reason valid: %b,"
|
||||
+ " App icon: %s,"
|
||||
+ " App label: %s,"
|
||||
+ " App installed: %b.",
|
||||
validSessionInfo,
|
||||
verify(sessionInfo) != null,
|
||||
sessionInfo.getInstallReason() == PackageManager.INSTALL_REASON_USER,
|
||||
appIcon == null ? "null" : IOUtils.toBase64String(appIcon),
|
||||
sessionInfo.getAppLabel(),
|
||||
new PackageManagerHelper(mAppContext).isAppInstalled(
|
||||
sessionInfo.getAppPackageName(), getUserHandle(sessionInfo))));
|
||||
}
|
||||
} else {
|
||||
FileLog.d(LOG, "Verifying session info failed: session info null.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue