Add logging for adding pending icons to the workspace.

Added logging to help track down b/168788486

Bug: 168788486

Test: manual
Change-Id: I96b38be7c02793f1b6649e6c0de5cdf47dca6edb
This commit is contained in:
Schneider Victor-tulias
2021-03-25 13:51:20 -07:00
parent f23ea3b067
commit bf694d61ee
4 changed files with 32 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ import android.os.Build;
import android.os.Process;
import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
@@ -56,6 +57,8 @@ import java.util.List;
*/
public class InstallSessionHelper {
private static final String LOG = "InstallSessionHelper";
// Set<String> of session ids of promise icons that have been added to the home screen
// as FLAG_PROMISE_NEW_INSTALLS.
protected static final String PROMISE_ICON_IDS = "promise_icon_ids";
@@ -219,6 +222,9 @@ public class InstallSessionHelper {
&& !promiseIconAddedForId(sessionInfo.getSessionId())
&& !new PackageManagerHelper(mAppContext).isAppInstalled(
sessionInfo.getAppPackageName(), getUserHandle(sessionInfo))) {
Log.i(LOG, "Adding package name to install queue: "
+ sessionInfo.getAppPackageName());
ItemInstallQueue.INSTANCE.get(mAppContext)
.queueItem(sessionInfo.getAppPackageName(), getUserHandle(sessionInfo));