Updated launcher logging.
Updated logging to help track down b/168788486 Bug: 168788486 Test: manual Change-Id: I064f0eb70f0281fb09083b95c321857d17e31a7d
This commit is contained in:
parent
7ef5456182
commit
344b200710
|
@ -24,10 +24,10 @@ 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.util.Executors;
|
||||
|
@ -71,7 +71,7 @@ public class SessionCommitReceiver extends BroadcastReceiver {
|
|||
return;
|
||||
}
|
||||
|
||||
Log.d(LOG,
|
||||
FileLog.d(LOG,
|
||||
"Adding package name to install queue. Package name: " + info.getAppPackageName()
|
||||
+ ", has app icon: " + (info.getAppIcon() != null)
|
||||
+ ", has app label: " + !TextUtils.isEmpty(info.getAppLabel()));
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.content.pm.LauncherActivityInfo;
|
|||
import android.content.pm.LauncherApps;
|
||||
import android.content.pm.PackageInstaller.SessionInfo;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
import android.util.LongSparseArray;
|
||||
import android.util.Pair;
|
||||
|
||||
|
@ -28,6 +27,7 @@ import com.android.launcher3.InvariantDeviceProfile;
|
|||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherModel.CallbackTask;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.BgDataModel.Callbacks;
|
||||
import com.android.launcher3.model.data.AppInfo;
|
||||
import com.android.launcher3.model.data.FolderInfo;
|
||||
|
@ -130,7 +130,7 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
|||
packageName);
|
||||
|
||||
if (!packageInstaller.verifySessionInfo(sessionInfo)) {
|
||||
Log.d(LOG, "Item info failed session info verification: "
|
||||
FileLog.d(LOG, "Item info failed session info verification: "
|
||||
+ workspaceInfo);
|
||||
}
|
||||
|
||||
|
@ -180,11 +180,11 @@ public class AddWorkspaceItemsTask extends BaseModelUpdateTask {
|
|||
addedItemsFinal.add(itemInfo);
|
||||
|
||||
// log bitmap and label
|
||||
Log.d(LOG, "Adding item info to workspace: " + itemInfo);
|
||||
FileLog.d(LOG, "Adding item info to workspace: " + itemInfo);
|
||||
if (itemInfo instanceof ItemInfoWithIcon) {
|
||||
ItemInfoWithIcon infoWithIcon = (ItemInfoWithIcon) itemInfo;
|
||||
|
||||
Log.d(LOG, "Item info icon base 64 string: "
|
||||
FileLog.d(LOG, "Item info icon base 64 string: "
|
||||
+ infoWithIcon.bitmap.icon == null
|
||||
? "null" : IOUtils.toBase64String(infoWithIcon.bitmap.icon));
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.android.launcher3.InvariantDeviceProfile;
|
|||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.LauncherAppWidgetInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
|
@ -191,11 +192,11 @@ public class ItemInstallQueue {
|
|||
MODEL_EXECUTOR.post(() -> {
|
||||
Pair<ItemInfo, Object> itemInfo = info.getItemInfo(mContext);
|
||||
if (itemInfo == null) {
|
||||
Log.d(LOG,
|
||||
FileLog.d(LOG,
|
||||
"Adding PendingInstallShortcutInfo with no attached info to queue.",
|
||||
stackTrace);
|
||||
} else {
|
||||
Log.d(LOG,
|
||||
FileLog.d(LOG,
|
||||
"Adding PendingInstallShortcutInfo to queue. Attached info: "
|
||||
+ itemInfo.first,
|
||||
stackTrace);
|
||||
|
|
|
@ -30,7 +30,6 @@ 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;
|
||||
|
@ -40,6 +39,7 @@ import com.android.launcher3.LauncherSettings;
|
|||
import com.android.launcher3.SessionCommitReceiver;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.FileLog;
|
||||
import com.android.launcher3.model.ItemInstallQueue;
|
||||
import com.android.launcher3.util.IOUtils;
|
||||
import com.android.launcher3.util.IntArray;
|
||||
|
@ -218,7 +218,7 @@ public class InstallSessionHelper {
|
|||
if (FeatureFlags.PROMISE_APPS_NEW_INSTALLS.get()
|
||||
&& SessionCommitReceiver.isEnabled(mAppContext)
|
||||
&& verifySessionInfo(sessionInfo)) {
|
||||
Log.d(LOG, "Adding package name to install queue: "
|
||||
FileLog.d(LOG, "Adding package name to install queue: "
|
||||
+ sessionInfo.getAppPackageName());
|
||||
|
||||
ItemInstallQueue.INSTANCE.get(mAppContext)
|
||||
|
@ -241,7 +241,7 @@ public class InstallSessionHelper {
|
|||
if (sessionInfo != null) {
|
||||
Bitmap appIcon = sessionInfo.getAppIcon();
|
||||
|
||||
Log.d(LOG, String.format(
|
||||
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.",
|
||||
|
@ -254,7 +254,7 @@ public class InstallSessionHelper {
|
|||
new PackageManagerHelper(mAppContext).isAppInstalled(
|
||||
sessionInfo.getAppPackageName(), getUserHandle(sessionInfo))));
|
||||
} else {
|
||||
Log.d(LOG, "Verifying session info failed: session info null.");
|
||||
FileLog.d(LOG, "Verifying session info failed: session info null.");
|
||||
}
|
||||
|
||||
return validSessionInfo;
|
||||
|
|
Loading…
Reference in New Issue