Loading AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ </activity> <activity android:enabled="false" android:enabled="@bool/feature_inspector" android:name=".inspector.DocumentInspectorActivity" android:label="Properties" android:icon="@drawable/launcher_icon" Loading src/com/android/documentsui/AbstractActionHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ public abstract class AbstractActionHandler<T extends Activity & CommonAddons> throw new UnsupportedOperationException("Can't open document."); } public void showInspector(Selection selection, Context context) { public void showInspector(DocumentInfo doc) { throw new UnsupportedOperationException("Can't open properties."); } Loading src/com/android/documentsui/ActionHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public interface ActionHandler { void showCreateDirectoryDialog(); void showInspector(Selection selection, Context context); void showInspector(DocumentInfo doc); @Nullable DocumentInfo renameDocument(String name, DocumentInfo document); Loading src/com/android/documentsui/dirlist/DirectoryFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -684,7 +684,9 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On case R.id.action_menu_inspector: mActionModeController.finishActionMode(); mActions.showInspector(selection, getContext()); assert(selection.size() == 1); DocumentInfo doc = mModel.getDocuments(selection).get(0); mActions.showInspector(doc); return true; case R.id.dir_menu_cut_to_clipboard: Loading src/com/android/documentsui/files/ActionHandler.java +5 −6 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ import com.android.documentsui.clipping.UrisSupplier; import com.android.documentsui.dirlist.AnimationView; import com.android.documentsui.dirlist.DocumentDetails; import com.android.documentsui.files.ActionHandler.Addons; import com.android.documentsui.inspector.DocumentInspectorActivity; import com.android.documentsui.queries.SearchViewManager; import com.android.documentsui.roots.ProvidersAccess; import com.android.documentsui.selection.Selection; Loading Loading @@ -674,12 +675,10 @@ public class ActionHandler<T extends Activity & Addons> extends AbstractActionHa } @Override public void showInspector(Selection selected, Context context) { assert(selected.size() == 1); Intent intent = new Intent(mActivity, FilesActivity.class); DocumentInfo selectedDoc = mModel.getDocuments(selected).get(0); intent.putExtra(Intent.ACTION_VIEW, selectedDoc.derivedUri); Metrics.logUserAction(context, Metrics.USER_ACTION_INSPECTOR); public void showInspector(DocumentInfo doc) { Intent intent = new Intent(mActivity, DocumentInspectorActivity.class); intent.putExtra(Intent.ACTION_VIEW, doc.derivedUri); Metrics.logUserAction(mActivity.getBaseContext(), Metrics.USER_ACTION_INSPECTOR); mActivity.startActivity(intent); } Loading Loading
AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,7 @@ </activity> <activity android:enabled="false" android:enabled="@bool/feature_inspector" android:name=".inspector.DocumentInspectorActivity" android:label="Properties" android:icon="@drawable/launcher_icon" Loading
src/com/android/documentsui/AbstractActionHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -230,7 +230,7 @@ public abstract class AbstractActionHandler<T extends Activity & CommonAddons> throw new UnsupportedOperationException("Can't open document."); } public void showInspector(Selection selection, Context context) { public void showInspector(DocumentInfo doc) { throw new UnsupportedOperationException("Can't open properties."); } Loading
src/com/android/documentsui/ActionHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public interface ActionHandler { void showCreateDirectoryDialog(); void showInspector(Selection selection, Context context); void showInspector(DocumentInfo doc); @Nullable DocumentInfo renameDocument(String name, DocumentInfo document); Loading
src/com/android/documentsui/dirlist/DirectoryFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -684,7 +684,9 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On case R.id.action_menu_inspector: mActionModeController.finishActionMode(); mActions.showInspector(selection, getContext()); assert(selection.size() == 1); DocumentInfo doc = mModel.getDocuments(selection).get(0); mActions.showInspector(doc); return true; case R.id.dir_menu_cut_to_clipboard: Loading
src/com/android/documentsui/files/ActionHandler.java +5 −6 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ import com.android.documentsui.clipping.UrisSupplier; import com.android.documentsui.dirlist.AnimationView; import com.android.documentsui.dirlist.DocumentDetails; import com.android.documentsui.files.ActionHandler.Addons; import com.android.documentsui.inspector.DocumentInspectorActivity; import com.android.documentsui.queries.SearchViewManager; import com.android.documentsui.roots.ProvidersAccess; import com.android.documentsui.selection.Selection; Loading Loading @@ -674,12 +675,10 @@ public class ActionHandler<T extends Activity & Addons> extends AbstractActionHa } @Override public void showInspector(Selection selected, Context context) { assert(selected.size() == 1); Intent intent = new Intent(mActivity, FilesActivity.class); DocumentInfo selectedDoc = mModel.getDocuments(selected).get(0); intent.putExtra(Intent.ACTION_VIEW, selectedDoc.derivedUri); Metrics.logUserAction(context, Metrics.USER_ACTION_INSPECTOR); public void showInspector(DocumentInfo doc) { Intent intent = new Intent(mActivity, DocumentInspectorActivity.class); intent.putExtra(Intent.ACTION_VIEW, doc.derivedUri); Metrics.logUserAction(mActivity.getBaseContext(), Metrics.USER_ACTION_INSPECTOR); mActivity.startActivity(intent); } Loading