Merge "Add debug logs for haptics in NotificationPanelViewController." into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
92f2962957
@@ -4722,6 +4722,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
if (!openingWithTouch || !mHasVibratedOnOpen) {
|
if (!openingWithTouch || !mHasVibratedOnOpen) {
|
||||||
mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK);
|
mVibratorHelper.vibrate(VibrationEffect.EFFECT_TICK);
|
||||||
mHasVibratedOnOpen = true;
|
mHasVibratedOnOpen = true;
|
||||||
|
mShadeLog.v("Vibrating on opening, mHasVibratedOnOpen=true");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6122,6 +6123,7 @@ public final class NotificationPanelViewController implements Dumpable {
|
|||||||
if (isFullyCollapsed()) {
|
if (isFullyCollapsed()) {
|
||||||
// If panel is fully collapsed, reset haptic effect before adding movement.
|
// If panel is fully collapsed, reset haptic effect before adding movement.
|
||||||
mHasVibratedOnOpen = false;
|
mHasVibratedOnOpen = false;
|
||||||
|
mShadeLog.logHasVibrated(mHasVibratedOnOpen, mExpandedFraction);
|
||||||
}
|
}
|
||||||
addMovement(event);
|
addMovement(event);
|
||||||
if (!isFullyCollapsed()) {
|
if (!isFullyCollapsed()) {
|
||||||
|
|||||||
@@ -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(
|
fun logQsExpansionChanged(
|
||||||
message: String,
|
message: String,
|
||||||
qsExpanded: Boolean,
|
qsExpanded: Boolean,
|
||||||
|
|||||||
Reference in New Issue
Block a user