diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-30 14:03:05 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-30 14:04:44 -0700 |
commit | e9e0ba63e04202c8454d25d3af3d02f580a1a35d (patch) | |
tree | d01cba0f140cc3bbc19764f94038df7d655755b8 | |
parent | a05715b9df049d3154f2f9124069e458c1596eee (diff) |
When dragging, don't slide action bar if pane is closed.
Ideally it would probably be better to put this in the
ActionBarController. However, that requires substantially more
refactoring, and per an email earlier the implementation/behavior
might change and render that refactoring needless. So... opting
for the easier soltuion to fix this bug (which appears on drag).
Bug: 15313430
Change-Id: I3e6aaba5d0b1721ce2a035a10ea6073fe6527472
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 8 | ||||
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 6a0706f8d..df2a87c8a 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -1007,7 +1007,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O */ @Override public void onDragStarted(int x, int y, PhoneFavoriteSquareTileView view) { - mActionBarController.slideActionBarUp(true); + if (mListsFragment.isPaneOpen()) { + mActionBarController.slideActionBarUp(true); + } mRemoveViewContainer.setVisibility(View.VISIBLE); } @@ -1020,7 +1022,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O */ @Override public void onDragFinished(int x, int y) { - mActionBarController.slideActionBarDown(true); + if (mListsFragment.isPaneOpen()) { + mActionBarController.slideActionBarDown(true); + } mRemoveViewContainer.setVisibility(View.GONE); } diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 30e0e0fa0..3de714d11 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -338,6 +338,10 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste return mIsPanelOpen && mActionBar != null; } + public boolean isPaneOpen() { + return mIsPanelOpen; + } + private void setupPaneLayout(OverlappingPaneLayout paneLayout) { // TODO: Remove the notion of a capturable view. The entire view be slideable, once // the framework better supports nested scrolling. |