Merge "Add debug logs for haptics in NotificationPanelViewController." into tm-qpr-dev am: 92f2962957 am: 8133f23e18

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20721950

Change-Id: I3d4639cfb6c98af0c4fd115e53101e2e6213d962
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
TreeHugger Robot
2022-12-14 16:17:59 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 0 deletions

View File

@@ -4722,6 +4722,7 @@ public final class NotificationPanelViewController implements Dumpable {
if (!openingWithTouch || !mHasVibratedOnOpen) {
mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK);
mHasVibratedOnOpen = true;
mShadeLog.v("Vibrating on opening, mHasVibratedOnOpen=true");
}
}
}
@@ -6122,6 +6123,7 @@ public final class NotificationPanelViewController implements Dumpable {
if (isFullyCollapsed()) {
// If panel is fully collapsed, reset haptic effect before adding movement.
mHasVibratedOnOpen = false;
mShadeLog.logHasVibrated(mHasVibratedOnOpen, mExpandedFraction);
}
addMovement(event);
if (!isFullyCollapsed()) {

View File

@@ -140,6 +140,15 @@ class ShadeLogger @Inject constructor(@ShadeLog private val buffer: LogBuffer) {
})
}
fun logHasVibrated(hasVibratedOnOpen: Boolean, fraction: Float) {
log(LogLevel.VERBOSE, {
bool1 = hasVibratedOnOpen
double1 = fraction.toDouble()
}, {
"hasVibratedOnOpen=$bool1, expansionFraction=$double1"
})
}
fun logQsExpansionChanged(
message: String,
qsExpanded: Boolean,