Add debug logs for testPromiseIcon_addedFromEligibleSession
Bug: 202985412 Test: PromiseIconUiTest Change-Id: I160b9229bebe07015575f8184ac2d53bcbf2bad0
This commit is contained in:
1 parent
40570799b3
commit
701774d021
7 files changed
+106
No files matched your search
@@ -25,10 +25,12 @@ import android.content.pm.PackageInstaller;
|
||||
import android.content.pm.PackageInstaller.SessionInfo;
|
||||
import android.os.Build;
|
||||
import android.os.UserHandle;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
|
||||
import androidx.annotation.WorkerThread;
|
||||
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.PackageUserKey;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
@@ -57,10 +59,19 @@ public class InstallSessionTracker extends PackageInstaller.SessionCallback {
|
||||
public void onCreated(int sessionId) {
|
||||
InstallSessionHelper helper = mWeakHelper.get();
|
||||
Callback callback = mWeakCallback.get();
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.MISSING_PROMISE_ICON, "Session created sessionId=" + sessionId
|
||||
+ ", callback=" + callback
|
||||
+ ", helper=" + helper);
|
||||
}
|
||||
if (callback == null || helper == null) {
|
||||
return;
|
||||
}
|
||||
SessionInfo sessionInfo = pushSessionDisplayToLauncher(sessionId, helper, callback);
|
||||
if (TestProtocol.sDebugTracing) {
|
||||
Log.d(TestProtocol.MISSING_PROMISE_ICON, "Session created sessionId=" + sessionId
|
||||
+ ", sessionInfo=" + sessionInfo);
|
||||
}
|
||||
if (sessionInfo != null) {
|
||||
callback.onInstallSessionCreated(PackageInstallInfo.fromInstallingState(sessionInfo));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user