Loading src/com/android/documentsui/AbstractActionHandler.java +7 −3 Original line number Diff line number Diff line Loading @@ -616,9 +616,11 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA contentsUri = DocumentsContract.setManageMode(contentsUri); } if (DEBUG) Log.d(TAG, if (DEBUG) { Log.d(TAG, "Creating new directory loader for: " + DocumentInfo.debugString(mState.stack.peek())); } return new DirectoryLoader( mInjector.features, Loading @@ -633,8 +635,10 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA @Override public void onLoadFinished(Loader<DirectoryResult> loader, DirectoryResult result) { if (DEBUG) Log.d(TAG, "Loader has finished for: " if (DEBUG) { Log.d(TAG, "Loader has finished for: " + DocumentInfo.debugString(mState.stack.peek())); } assert(result != null); mInjector.getModel().update(result); Loading src/com/android/documentsui/ActionModeController.java +12 −4 Original line number Diff line number Diff line Loading @@ -75,13 +75,17 @@ public class ActionModeController extends SelectionObserver<String> mSelectionMgr.copySelection(mSelected); if (mSelected.size() > 0) { if (mActionMode == null) { if (DEBUG) Log.d(TAG, "Starting action mode."); if (DEBUG) { Log.d(TAG, "Starting action mode."); } mActionMode = mActivity.startActionMode(this); } updateActionMenu(); } else { if (mActionMode != null) { if (DEBUG) Log.d(TAG, "Finishing action mode."); if (DEBUG) { Log.d(TAG, "Finishing action mode."); } mActionMode.finish(); } } Loading @@ -104,12 +108,16 @@ public class ActionModeController extends SelectionObserver<String> @Override public void onDestroyActionMode(ActionMode mode) { if (mActionMode == null) { if (DEBUG) Log.w(TAG, "Received call to destroy action mode on alien mode object."); if (DEBUG) { Log.w(TAG, "Received call to destroy action mode on alien mode object."); } } assert(mActionMode.equals(mode)); if (DEBUG) Log.d(TAG, "Handling action mode destroyed."); if (DEBUG) { Log.d(TAG, "Handling action mode destroyed."); } mActionMode = null; mMenu = null; Loading src/com/android/documentsui/BaseActivity.java +6 −2 Original line number Diff line number Diff line Loading @@ -334,7 +334,9 @@ public abstract class BaseActivity private State getState(@Nullable Bundle icicle) { if (icicle != null) { State state = icicle.<State>getParcelable(Shared.EXTRA_STATE); if (DEBUG) Log.d(mTag, "Recovered existing state object: " + state); if (DEBUG) { Log.d(mTag, "Recovered existing state object: " + state); } return state; } Loading @@ -354,7 +356,9 @@ public abstract class BaseActivity // Only show the toggle if advanced isn't forced enabled. state.showDeviceStorageOption = !Shared.mustShowDeviceRoot(intent); if (DEBUG) Log.d(mTag, "Created new state object: " + state); if (DEBUG) { Log.d(mTag, "Created new state object: " + state); } return state; } Loading src/com/android/documentsui/FocusManager.java +9 −3 Original line number Diff line number Diff line Loading @@ -143,7 +143,9 @@ public final class FocusManager extends FocusDelegate<String> implements FocusHa @Override public boolean focusDirectoryList() { if (!mScope.isValid() || mScope.adapter.getItemCount() == 0) { if (DEBUG) Log.v(TAG, "Nothing to focus."); if (DEBUG) { Log.v(TAG, "Nothing to focus."); } return false; } Loading @@ -152,7 +154,9 @@ public final class FocusManager extends FocusDelegate<String> implements FocusHa // vs. Cut focused // item) if (mSelectionMgr.hasSelection()) { if (DEBUG) Log.v(TAG, "Existing selection found. No focus will be done."); if (DEBUG) { Log.v(TAG, "Existing selection found. No focus will be done."); } return false; } Loading Loading @@ -199,7 +203,9 @@ public final class FocusManager extends FocusDelegate<String> implements FocusHa @Override public void focusDocument(String modelId) { if (!mScope.isValid()) { if (DEBUG) Log.v(TAG, "Invalid mScope. No focus will be done."); if (DEBUG) { Log.v(TAG, "Invalid mScope. No focus will be done."); } return; } int pos = mScope.adapter.getAdapterPosition(modelId); Loading src/com/android/documentsui/Model.java +9 −3 Original line number Diff line number Diff line Loading @@ -113,7 +113,9 @@ public class Model { @VisibleForTesting public void update(DirectoryResult result) { assert(result != null); if (DEBUG) Log.i(TAG, "Updating model with new result set."); if (DEBUG) { Log.i(TAG, "Updating model with new result set."); } if (result.exception != null) { Log.e(TAG, "Error while loading directory contents", result.exception); Loading Loading @@ -177,13 +179,17 @@ public class Model { public @Nullable Cursor getItem(String modelId) { Integer pos = mPositions.get(modelId); if (pos == null) { if (DEBUG) Log.d(TAG, "Unabled to find cursor position for modelId: " + modelId); if (DEBUG) { Log.d(TAG, "Unabled to find cursor position for modelId: " + modelId); } return null; } if (!mCursor.moveToPosition(pos)) { if (DEBUG) Log.d(TAG, if (DEBUG) { Log.d(TAG, "Unabled to move cursor to position " + pos + " for modelId: " + modelId); } return null; } Loading Loading
src/com/android/documentsui/AbstractActionHandler.java +7 −3 Original line number Diff line number Diff line Loading @@ -616,9 +616,11 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA contentsUri = DocumentsContract.setManageMode(contentsUri); } if (DEBUG) Log.d(TAG, if (DEBUG) { Log.d(TAG, "Creating new directory loader for: " + DocumentInfo.debugString(mState.stack.peek())); } return new DirectoryLoader( mInjector.features, Loading @@ -633,8 +635,10 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA @Override public void onLoadFinished(Loader<DirectoryResult> loader, DirectoryResult result) { if (DEBUG) Log.d(TAG, "Loader has finished for: " if (DEBUG) { Log.d(TAG, "Loader has finished for: " + DocumentInfo.debugString(mState.stack.peek())); } assert(result != null); mInjector.getModel().update(result); Loading
src/com/android/documentsui/ActionModeController.java +12 −4 Original line number Diff line number Diff line Loading @@ -75,13 +75,17 @@ public class ActionModeController extends SelectionObserver<String> mSelectionMgr.copySelection(mSelected); if (mSelected.size() > 0) { if (mActionMode == null) { if (DEBUG) Log.d(TAG, "Starting action mode."); if (DEBUG) { Log.d(TAG, "Starting action mode."); } mActionMode = mActivity.startActionMode(this); } updateActionMenu(); } else { if (mActionMode != null) { if (DEBUG) Log.d(TAG, "Finishing action mode."); if (DEBUG) { Log.d(TAG, "Finishing action mode."); } mActionMode.finish(); } } Loading @@ -104,12 +108,16 @@ public class ActionModeController extends SelectionObserver<String> @Override public void onDestroyActionMode(ActionMode mode) { if (mActionMode == null) { if (DEBUG) Log.w(TAG, "Received call to destroy action mode on alien mode object."); if (DEBUG) { Log.w(TAG, "Received call to destroy action mode on alien mode object."); } } assert(mActionMode.equals(mode)); if (DEBUG) Log.d(TAG, "Handling action mode destroyed."); if (DEBUG) { Log.d(TAG, "Handling action mode destroyed."); } mActionMode = null; mMenu = null; Loading
src/com/android/documentsui/BaseActivity.java +6 −2 Original line number Diff line number Diff line Loading @@ -334,7 +334,9 @@ public abstract class BaseActivity private State getState(@Nullable Bundle icicle) { if (icicle != null) { State state = icicle.<State>getParcelable(Shared.EXTRA_STATE); if (DEBUG) Log.d(mTag, "Recovered existing state object: " + state); if (DEBUG) { Log.d(mTag, "Recovered existing state object: " + state); } return state; } Loading @@ -354,7 +356,9 @@ public abstract class BaseActivity // Only show the toggle if advanced isn't forced enabled. state.showDeviceStorageOption = !Shared.mustShowDeviceRoot(intent); if (DEBUG) Log.d(mTag, "Created new state object: " + state); if (DEBUG) { Log.d(mTag, "Created new state object: " + state); } return state; } Loading
src/com/android/documentsui/FocusManager.java +9 −3 Original line number Diff line number Diff line Loading @@ -143,7 +143,9 @@ public final class FocusManager extends FocusDelegate<String> implements FocusHa @Override public boolean focusDirectoryList() { if (!mScope.isValid() || mScope.adapter.getItemCount() == 0) { if (DEBUG) Log.v(TAG, "Nothing to focus."); if (DEBUG) { Log.v(TAG, "Nothing to focus."); } return false; } Loading @@ -152,7 +154,9 @@ public final class FocusManager extends FocusDelegate<String> implements FocusHa // vs. Cut focused // item) if (mSelectionMgr.hasSelection()) { if (DEBUG) Log.v(TAG, "Existing selection found. No focus will be done."); if (DEBUG) { Log.v(TAG, "Existing selection found. No focus will be done."); } return false; } Loading Loading @@ -199,7 +203,9 @@ public final class FocusManager extends FocusDelegate<String> implements FocusHa @Override public void focusDocument(String modelId) { if (!mScope.isValid()) { if (DEBUG) Log.v(TAG, "Invalid mScope. No focus will be done."); if (DEBUG) { Log.v(TAG, "Invalid mScope. No focus will be done."); } return; } int pos = mScope.adapter.getAdapterPosition(modelId); Loading
src/com/android/documentsui/Model.java +9 −3 Original line number Diff line number Diff line Loading @@ -113,7 +113,9 @@ public class Model { @VisibleForTesting public void update(DirectoryResult result) { assert(result != null); if (DEBUG) Log.i(TAG, "Updating model with new result set."); if (DEBUG) { Log.i(TAG, "Updating model with new result set."); } if (result.exception != null) { Log.e(TAG, "Error while loading directory contents", result.exception); Loading Loading @@ -177,13 +179,17 @@ public class Model { public @Nullable Cursor getItem(String modelId) { Integer pos = mPositions.get(modelId); if (pos == null) { if (DEBUG) Log.d(TAG, "Unabled to find cursor position for modelId: " + modelId); if (DEBUG) { Log.d(TAG, "Unabled to find cursor position for modelId: " + modelId); } return null; } if (!mCursor.moveToPosition(pos)) { if (DEBUG) Log.d(TAG, if (DEBUG) { Log.d(TAG, "Unabled to move cursor to position " + pos + " for modelId: " + modelId); } return null; } Loading