Loading packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java +23 −6 Original line number Diff line number Diff line Loading @@ -456,7 +456,7 @@ public abstract class BaseActivity extends Activity DirectoryFragment dir = getDirectoryFragment(); if (dir != null) { dir.onSortOrderChanged(); }; } } /** Loading @@ -473,7 +473,7 @@ public abstract class BaseActivity extends Activity DirectoryFragment dir = getDirectoryFragment(); if (dir != null) { dir.onViewModeChanged(); }; } } public void setPending(boolean pending) { Loading Loading @@ -561,9 +561,7 @@ public abstract class BaseActivity extends Activity } } if (size > 1) { mState.stack.pop(); refreshCurrentRootAndDirectory(ANIM_LEAVE); if (popDir()) { return; } Loading Loading @@ -603,8 +601,12 @@ public abstract class BaseActivity extends Activity return true; } } else if (keyCode == KeyEvent.KEYCODE_TAB) { // Tab toggles focus on the navigation drawer. toggleNavDrawerFocus(); return true; } else if (keyCode == KeyEvent.KEYCODE_DEL) { popDir(); return true; } return super.onKeyDown(keyCode, event); } Loading Loading @@ -641,6 +643,21 @@ public abstract class BaseActivity extends Activity } } /** * Pops the top entry off the directory stack, and returns the user to the previous directory. * If the directory stack only contains one item, this method does nothing. * * @return Whether the stack was popped. */ private boolean popDir() { if (mState.stack.size() > 1) { mState.stack.pop(); refreshCurrentRootAndDirectory(ANIM_LEAVE); return true; } return false; } private static final class PickRootTask extends PairedTask<BaseActivity, Void, DocumentInfo> { private RootInfo mRoot; Loading Loading
packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java +23 −6 Original line number Diff line number Diff line Loading @@ -456,7 +456,7 @@ public abstract class BaseActivity extends Activity DirectoryFragment dir = getDirectoryFragment(); if (dir != null) { dir.onSortOrderChanged(); }; } } /** Loading @@ -473,7 +473,7 @@ public abstract class BaseActivity extends Activity DirectoryFragment dir = getDirectoryFragment(); if (dir != null) { dir.onViewModeChanged(); }; } } public void setPending(boolean pending) { Loading Loading @@ -561,9 +561,7 @@ public abstract class BaseActivity extends Activity } } if (size > 1) { mState.stack.pop(); refreshCurrentRootAndDirectory(ANIM_LEAVE); if (popDir()) { return; } Loading Loading @@ -603,8 +601,12 @@ public abstract class BaseActivity extends Activity return true; } } else if (keyCode == KeyEvent.KEYCODE_TAB) { // Tab toggles focus on the navigation drawer. toggleNavDrawerFocus(); return true; } else if (keyCode == KeyEvent.KEYCODE_DEL) { popDir(); return true; } return super.onKeyDown(keyCode, event); } Loading Loading @@ -641,6 +643,21 @@ public abstract class BaseActivity extends Activity } } /** * Pops the top entry off the directory stack, and returns the user to the previous directory. * If the directory stack only contains one item, this method does nothing. * * @return Whether the stack was popped. */ private boolean popDir() { if (mState.stack.size() > 1) { mState.stack.pop(); refreshCurrentRootAndDirectory(ANIM_LEAVE); return true; } return false; } private static final class PickRootTask extends PairedTask<BaseActivity, Void, DocumentInfo> { private RootInfo mRoot; Loading