Merge "Add logging for floating rotation button" into tm-qpr-dev

This commit is contained in:
Winson Chung
2022-12-15 23:29:50 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ import java.util.function.Supplier;
*/ */
public class RotationButtonController { public class RotationButtonController {
private static final String TAG = "StatusBar/RotationButtonController"; private static final String TAG = "RotationButtonController";
private static final int BUTTON_FADE_IN_OUT_DURATION_MS = 100; private static final int BUTTON_FADE_IN_OUT_DURATION_MS = 100;
private static final int NAVBAR_HIDDEN_PENDING_ICON_TIMEOUT_MS = 20000; private static final int NAVBAR_HIDDEN_PENDING_ICON_TIMEOUT_MS = 20000;
private static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator(); private static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
@@ -377,6 +377,7 @@ public class RotationButtonController {
} }
// Prepare to show the navbar icon by updating the icon style to change anim params // Prepare to show the navbar icon by updating the icon style to change anim params
Log.i(TAG, "onRotationProposal(rotation=" + rotation + ")");
mLastRotationSuggestion = rotation; // Remember rotation for click mLastRotationSuggestion = rotation; // Remember rotation for click
final boolean rotationCCW = Utilities.isRotationAnimationCCW(windowRotation, rotation); final boolean rotationCCW = Utilities.isRotationAnimationCCW(windowRotation, rotation);
if (windowRotation == Surface.ROTATION_0 || windowRotation == Surface.ROTATION_180) { if (windowRotation == Surface.ROTATION_0 || windowRotation == Surface.ROTATION_180) {
@@ -499,6 +500,7 @@ public class RotationButtonController {
mUiEventLogger.log(RotationButtonEvent.ROTATION_SUGGESTION_ACCEPTED); mUiEventLogger.log(RotationButtonEvent.ROTATION_SUGGESTION_ACCEPTED);
incrementNumAcceptedRotationSuggestionsIfNeeded(); incrementNumAcceptedRotationSuggestionsIfNeeded();
setRotationLockedAtAngle(mLastRotationSuggestion); setRotationLockedAtAngle(mLastRotationSuggestion);
Log.i(TAG, "onRotateSuggestionClick() mLastRotationSuggestion=" + mLastRotationSuggestion);
v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY); v.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
} }

View File

@@ -464,6 +464,8 @@ public class NavigationBarController implements
@Override @Override
public void dump(@NonNull PrintWriter pw, @NonNull String[] args) { public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
pw.println("mIsTablet=" + mIsTablet);
pw.println("mNavMode=" + mNavMode);
for (int i = 0; i < mNavigationBars.size(); i++) { for (int i = 0; i < mNavigationBars.size(); i++) {
if (i > 0) { if (i > 0) {
pw.println(); pw.println();