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 canPasteInto; 34 public boolean canExtract; 35 public boolean canOpenWith; 36 public boolean canViewInOwner; 37 38 @Override containsPartialFiles()39 public boolean containsPartialFiles() { 40 return containPartial; 41 } 42 43 @Override containsFiles()44 public boolean containsFiles() { 45 return containFiles; 46 } 47 48 @Override containsDirectories()49 public boolean containsDirectories() { 50 return containDirectories; 51 } 52 53 @Override containsFilesInArchive()54 public boolean containsFilesInArchive() { 55 return containsFilesInArchive; 56 } 57 58 @Override canRename()59 public boolean canRename() { 60 return canRename; 61 } 62 63 @Override canDelete()64 public boolean canDelete() { 65 return canDelete; 66 } 67 68 @Override canExtract()69 public boolean canExtract() { 70 return canExtract; 71 } 72 73 @Override canPasteInto()74 public boolean canPasteInto() { 75 return canPasteInto; 76 } 77 78 @Override canOpenWith()79 public boolean canOpenWith() { 80 return canOpenWith; 81 } 82 83 @Override canViewInOwner()84 public boolean canViewInOwner() { 85 return canViewInOwner; 86 } 87 88 @Override size()89 public int size() { 90 return size; 91 } 92 } 93