mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Merge branch 'android14-release' into 14-dev
This commit is contained in:
@@ -24,14 +24,12 @@ import android.content.pm.PackageInstaller.SessionInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.UserHandle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.ItemInstallQueue;
|
||||
import com.android.launcher3.pm.InstallSessionHelper;
|
||||
import com.android.launcher3.testing.shared.TestProtocol;
|
||||
import com.android.launcher3.util.Executors;
|
||||
import com.patrykmichalik.opto.core.PreferenceExtensionsKt;
|
||||
|
||||
@@ -56,9 +54,6 @@ public class SessionCommitReceiver extends BroadcastReceiver {
|
||||
private static void processIntent(Context context, Intent intent) {
|
||||
if (!isEnabled(context)) {
|
||||
// User has decided to not add icons on homescreen.
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " not enabled");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -67,26 +62,14 @@ public class SessionCommitReceiver extends BroadcastReceiver {
|
||||
if (!PackageInstaller.ACTION_SESSION_COMMITTED.equals(intent.getAction())
|
||||
|| info == null || user == null) {
|
||||
// Invalid intent.
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG + " invalid intent");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
InstallSessionHelper packageInstallerCompat = InstallSessionHelper.INSTANCE.get(context);
|
||||
packageInstallerCompat.restoreDbIfApplicable(info);
|
||||
if (TextUtils.isEmpty(info.getAppPackageName())
|
||||
|| info.getInstallReason() != PackageManager.INSTALL_REASON_USER
|
||||
|| packageInstallerCompat.promiseIconAddedForId(info.getSessionId())) {
|
||||
packageInstallerCompat.removePromiseIconId(info.getSessionId());
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
int id = info.getSessionId();
|
||||
Log.d(TestProtocol.MISSING_PROMISE_ICON, LOG
|
||||
+ ", TextUtils.isEmpty=" + TextUtils.isEmpty(info.getAppPackageName())
|
||||
+ ", info.getInstallReason()=" + info.getInstallReason()
|
||||
+ ", INSTALL_REASON_USER=" + PackageManager.INSTALL_REASON_USER
|
||||
+ ", icon added=" + packageInstallerCompat.promiseIconAddedForId(id));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user