1 /* 2 * Copyright (C) 2017 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 package com.android.documentsui.testing; 17 18 import androidx.annotation.BoolRes; 19 20 import com.android.documentsui.base.Features; 21 22 public class TestFeatures implements Features { 23 24 public boolean archiveCreation = true; 25 public boolean commandProcessor = true; 26 public boolean contentPaging = true; 27 public boolean contentRefresh = true; 28 public boolean debugSupport = true; 29 public boolean foldersInSearchResults = true; 30 public boolean gestureScale = true; 31 public boolean inspector = true; 32 public boolean jobProgressDialog = false; 33 public boolean launchToDocument = true; 34 public boolean notificationChannel = true; 35 public boolean overwriteConfirmation = true; 36 public boolean remoteActions = true; 37 public boolean systemKeyboardNavigation = true; 38 public boolean virtualFilesSharing = true; 39 public boolean forceDefaultRoot = false; 40 41 @Override isArchiveCreationEnabled()42 public boolean isArchiveCreationEnabled() { 43 return archiveCreation; 44 } 45 46 @Override isCommandInterceptorEnabled()47 public boolean isCommandInterceptorEnabled() { 48 return commandProcessor; 49 } 50 51 @Override isContentPagingEnabled()52 public boolean isContentPagingEnabled() { 53 return contentPaging; 54 } 55 56 @Override isContentRefreshEnabled()57 public boolean isContentRefreshEnabled() { 58 return contentRefresh; 59 } 60 61 @Override isDebugSupportEnabled()62 public boolean isDebugSupportEnabled() { 63 return debugSupport; 64 } 65 66 @Override isFoldersInSearchResultsEnabled()67 public boolean isFoldersInSearchResultsEnabled() { 68 return foldersInSearchResults; 69 } 70 71 @Override isJobProgressDialogEnabled()72 public boolean isJobProgressDialogEnabled() { 73 return jobProgressDialog; 74 } 75 76 @Override isGestureScaleEnabled()77 public boolean isGestureScaleEnabled() { 78 return gestureScale; 79 } 80 81 @Override isInspectorEnabled()82 public boolean isInspectorEnabled() { 83 return inspector; 84 } 85 86 @Override isLaunchToDocumentEnabled()87 public boolean isLaunchToDocumentEnabled() { 88 return launchToDocument; 89 } 90 91 @Override isNotificationChannelEnabled()92 public boolean isNotificationChannelEnabled() { 93 return notificationChannel; 94 } 95 96 @Override isOverwriteConfirmationEnabled()97 public boolean isOverwriteConfirmationEnabled() { 98 return overwriteConfirmation; 99 } 100 101 @Override isRemoteActionsEnabled()102 public boolean isRemoteActionsEnabled() { 103 return remoteActions; 104 } 105 106 @Override isSystemKeyboardNavigationEnabled()107 public boolean isSystemKeyboardNavigationEnabled() { 108 return systemKeyboardNavigation; 109 } 110 111 @Override isVirtualFilesSharingEnabled()112 public boolean isVirtualFilesSharingEnabled() { 113 return virtualFilesSharing; 114 } 115 116 @Override isDefaultRootInBrowseEnabled()117 public boolean isDefaultRootInBrowseEnabled() { 118 return forceDefaultRoot; 119 } 120 121 @Override forceFeature(@oolRes int feature, boolean enabled)122 public void forceFeature(@BoolRes int feature, boolean enabled) { 123 throw new UnsupportedOperationException("Implement as needed."); 124 } 125 } 126