Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 9b5279a

Browse files
authored
Add session debugging function (#3238)
1 parent 610815d commit 9b5279a

File tree

1 file changed

+16
-0
lines changed
  • app/src/common/shared/org/mozilla/vrbrowser/browser/engine

1 file changed

+16
-0
lines changed

app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java

+16
Original file line numberDiff line numberDiff line change
@@ -1687,4 +1687,20 @@ public void surfaceChanged(@NonNull final Surface surface, final int left, final
16871687
}
16881688
mState.mDisplay.surfaceChanged(surface, left, top, width, height);
16891689
}
1690+
1691+
public void logState() {
1692+
if (mState == null) {
1693+
Log.d(LOGTAG, "Session state is null");
1694+
return;
1695+
}
1696+
Log.d(LOGTAG, "Session: " + (mState.mSession != null ? mState.mSession.hashCode() : "null"));
1697+
Log.d(LOGTAG, "\tActive: " + mState.isActive());
1698+
Log.d(LOGTAG, "\tUri: " + (mState.mUri != null ? mState.mUri : "null"));
1699+
Log.d(LOGTAG, "\tFullscreen: " + mState.mFullScreen);
1700+
Log.d(LOGTAG, "\tCan go back: " + mState.mCanGoBack);
1701+
Log.d(LOGTAG, "\tCan go forward: " + mState.mCanGoForward);
1702+
if (mState.mSettings != null) {
1703+
Log.d(LOGTAG, "\tPrivate Browsing: " + mState.mSettings.isPrivateBrowsingEnabled());
1704+
}
1705+
}
16901706
}

0 commit comments

Comments
 (0)