1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.documentsui.testing; 18 19 import com.android.documentsui.MenuManager.SelectionDetails; 20 21 /** 22 * Test copy of SelectionDetails, everything default to false 23 */ 24 public class TestSelectionDetails implements SelectionDetails { 25 26 public int size; 27 public boolean canRename; 28 public boolean canDelete; 29 public boolean containPartial; 30 public boolean containsFilesInArchive; 31 public boolean containDirectories; 32 public boolean containFiles; 33 public boolean isArchive; 34 public boolean canPasteInto; 35 public boolean canExtract; 36 public boolean canOpen; 37 public boolean canViewInOwner; 38 39 @Override containsPartialFiles()40 public boolean containsPartialFiles() { 41 return containPartial; 42 } 43 44 @Override containsFiles()45 public boolean containsFiles() { 46 return containFiles; 47 } 48 49 @Override containsDirectories()50 public boolean containsDirectories() { 51 return containDirectories; 52 } 53 54 @Override containsFilesInArchive()55 public boolean containsFilesInArchive() { 56 return containsFilesInArchive; 57 } 58 59 @Override isArchive()60 public boolean isArchive() { 61 return isArchive; 62 } 63 64 @Override canRename()65 public boolean canRename() { 66 return canRename; 67 } 68 69 @Override canDelete()70 public boolean canDelete() { 71 return canDelete; 72 } 73 74 @Override canExtract()75 public boolean canExtract() { 76 return canExtract; 77 } 78 79 @Override canPasteInto()80 public boolean canPasteInto() { 81 return canPasteInto; 82 } 83 84 @Override canOpen()85 public boolean canOpen() { 86 return canOpen; 87 } 88 89 @Override canViewInOwner()90 public boolean canViewInOwner() { 91 return canViewInOwner; 92 } 93 94 @Override size()95 public int size() { 96 return size; 97 } 98 } 99