mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
fix crash attempting to install/update apps (#5073)
This commit is contained in:
committed by
GitHub
parent
305d8720ba
commit
980fdda002
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.launcher3.pm;
|
package com.android.launcher3.pm;
|
||||||
|
|
||||||
|
import static com.android.launcher3.Utilities.ATLEAST_V;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.LauncherApps;
|
import android.content.pm.LauncherApps;
|
||||||
@@ -241,7 +243,9 @@ public class InstallSessionHelper implements SafeCloseable {
|
|||||||
|
|
||||||
public boolean verifySessionInfo(@Nullable final PackageInstaller.SessionInfo sessionInfo) {
|
public boolean verifySessionInfo(@Nullable final PackageInstaller.SessionInfo sessionInfo) {
|
||||||
// For archived apps we always want to show promise icons and the checks below don't apply.
|
// For archived apps we always want to show promise icons and the checks below don't apply.
|
||||||
if (Flags.enableSupportForArchiving() && sessionInfo != null
|
if (Flags.enableSupportForArchiving()
|
||||||
|
&& sessionInfo != null
|
||||||
|
&& ATLEAST_V
|
||||||
&& sessionInfo.isUnarchival()) {
|
&& sessionInfo.isUnarchival()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user