Merge "Fixed a bug with talkback where the panel could be expanded" into nyc-dev am: 64954eb

am: 650b300

* commit '650b30005e5e097475fcbeae5783a13f9463ce09':
  Fixed a bug with talkback where the panel could be expanded

Change-Id: I263f2ade4465475e680098f910faee22f5f567ab
This commit is contained in:
Selim Cinek
2016-04-07 20:04:44 +00:00
committed by android-build-merger
2 changed files with 11 additions and 4 deletions

View File

@@ -845,15 +845,19 @@ public abstract class PanelView extends FrameLayout {
};
public void cancelPeek() {
boolean cancelled = mPeekPending;
if (mPeekAnimator != null) {
cancelled = true;
mPeekAnimator.cancel();
}
removeCallbacks(mPeekRunnable);
mPeekPending = false;
// When peeking, we already tell mBar that we expanded ourselves. Make sure that we also
// notify mBar that we might have closed ourselves.
notifyBarPanelExpansionChanged();
if (cancelled) {
// When peeking, we already tell mBar that we expanded ourselves. Make sure that we also
// notify mBar that we might have closed ourselves.
notifyBarPanelExpansionChanged();
}
}
public void expand(final boolean animate) {

View File

@@ -41,7 +41,9 @@ public class PhoneStatusBarView extends PanelBar {
private Runnable mHideExpandedRunnable = new Runnable() {
@Override
public void run() {
mBar.makeExpandedInvisible();
if (mPanelFraction == 0.0f) {
mBar.makeExpandedInvisible();
}
}
};
@@ -135,6 +137,7 @@ public class PhoneStatusBarView extends PanelBar {
super.onTrackingStarted();
mBar.onTrackingStarted();
mScrimController.onTrackingStarted();
removePendingHideExpandedRunnables();
}
@Override