Dave Mankoff | 781ef7e | 2019-06-28 16:33:25 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 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.systemui.classifier; |
| 18 | |
| 19 | import android.net.Uri; |
| 20 | import android.view.MotionEvent; |
| 21 | |
| 22 | import com.android.internal.annotations.VisibleForTesting; |
| 23 | import com.android.systemui.plugins.FalsingManager; |
| 24 | |
| 25 | import java.io.PrintWriter; |
| 26 | |
| 27 | /** |
| 28 | * Simple Fake for testing where {@link FalsingManager} is required. |
| 29 | */ |
| 30 | public class FalsingManagerFake implements FalsingManager { |
| 31 | private boolean mIsFalseTouch; |
| 32 | private boolean mIsUnlockingDisabled; |
| 33 | private boolean mIsClassiferEnabled; |
| 34 | private boolean mShouldEnforceBouncer; |
| 35 | private boolean mIsReportingEnabled; |
| 36 | |
| 37 | @Override |
| 38 | public void onSucccessfulUnlock() { |
| 39 | |
| 40 | } |
| 41 | |
| 42 | @Override |
| 43 | public void onNotificationActive() { |
| 44 | |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public void setShowingAod(boolean showingAod) { |
| 49 | |
| 50 | } |
| 51 | |
| 52 | @Override |
| 53 | public void onNotificatonStartDraggingDown() { |
| 54 | |
| 55 | } |
| 56 | |
| 57 | @VisibleForTesting |
| 58 | public void setIsUnlockingDisabled(boolean isUnlockingDisabled) { |
| 59 | mIsUnlockingDisabled = isUnlockingDisabled; |
| 60 | } |
| 61 | |
| 62 | @Override |
| 63 | public boolean isUnlockingDisabled() { |
| 64 | return mIsUnlockingDisabled; |
| 65 | } |
| 66 | |
| 67 | @VisibleForTesting |
| 68 | public void setIsFalseTouch(boolean isFalseTouch) { |
| 69 | mIsFalseTouch = isFalseTouch; |
| 70 | } |
| 71 | |
| 72 | @Override |
| 73 | public boolean isFalseTouch() { |
| 74 | return mIsFalseTouch; |
| 75 | } |
| 76 | |
| 77 | @Override |
| 78 | public void onNotificatonStopDraggingDown() { |
| 79 | |
| 80 | } |
| 81 | |
| 82 | @Override |
| 83 | public void setNotificationExpanded() { |
| 84 | |
| 85 | } |
| 86 | |
| 87 | @VisibleForTesting |
| 88 | public void setIsClassiferEnabled(boolean isClassiferEnabled) { |
| 89 | mIsClassiferEnabled = isClassiferEnabled; |
| 90 | } |
| 91 | |
| 92 | @Override |
| 93 | public boolean isClassiferEnabled() { |
| 94 | return mIsClassiferEnabled; |
| 95 | } |
| 96 | |
| 97 | @Override |
| 98 | public void onQsDown() { |
| 99 | |
| 100 | } |
| 101 | |
| 102 | @Override |
| 103 | public void setQsExpanded(boolean expanded) { |
| 104 | |
| 105 | } |
| 106 | |
| 107 | @VisibleForTesting |
| 108 | public void setShouldEnforceBouncer(boolean shouldEnforceBouncer) { |
| 109 | mShouldEnforceBouncer = shouldEnforceBouncer; |
| 110 | } |
| 111 | |
| 112 | @Override |
| 113 | public boolean shouldEnforceBouncer() { |
| 114 | return mShouldEnforceBouncer; |
| 115 | } |
| 116 | |
| 117 | @Override |
| 118 | public void onTrackingStarted(boolean secure) { |
| 119 | |
| 120 | } |
| 121 | |
| 122 | @Override |
| 123 | public void onTrackingStopped() { |
| 124 | |
| 125 | } |
| 126 | |
| 127 | @Override |
| 128 | public void onLeftAffordanceOn() { |
| 129 | |
| 130 | } |
| 131 | |
| 132 | @Override |
| 133 | public void onCameraOn() { |
| 134 | |
| 135 | } |
| 136 | |
| 137 | @Override |
| 138 | public void onAffordanceSwipingStarted(boolean rightCorner) { |
| 139 | |
| 140 | } |
| 141 | |
| 142 | @Override |
| 143 | public void onAffordanceSwipingAborted() { |
| 144 | |
| 145 | } |
| 146 | |
| 147 | @Override |
| 148 | public void onStartExpandingFromPulse() { |
| 149 | |
| 150 | } |
| 151 | |
| 152 | @Override |
| 153 | public void onExpansionFromPulseStopped() { |
| 154 | |
| 155 | } |
| 156 | |
| 157 | @Override |
| 158 | public Uri reportRejectedTouch() { |
| 159 | return null; |
| 160 | } |
| 161 | |
| 162 | @Override |
| 163 | public void onScreenOnFromTouch() { |
| 164 | |
| 165 | } |
| 166 | |
| 167 | |
| 168 | @VisibleForTesting |
| 169 | public void setIsReportingEnabled(boolean isReportingEnabled) { |
| 170 | mIsReportingEnabled = isReportingEnabled; |
| 171 | } |
| 172 | |
| 173 | @Override |
| 174 | public boolean isReportingEnabled() { |
| 175 | return mIsReportingEnabled; |
| 176 | } |
| 177 | |
| 178 | @Override |
| 179 | public void onUnlockHintStarted() { |
| 180 | |
| 181 | } |
| 182 | |
| 183 | @Override |
| 184 | public void onCameraHintStarted() { |
| 185 | |
| 186 | } |
| 187 | |
| 188 | @Override |
| 189 | public void onLeftAffordanceHintStarted() { |
| 190 | |
| 191 | } |
| 192 | |
| 193 | @Override |
| 194 | public void onScreenTurningOn() { |
| 195 | |
| 196 | } |
| 197 | |
| 198 | @Override |
| 199 | public void onScreenOff() { |
| 200 | |
| 201 | } |
| 202 | |
| 203 | @Override |
| 204 | public void onNotificatonStopDismissing() { |
| 205 | |
| 206 | } |
| 207 | |
| 208 | @Override |
| 209 | public void onNotificationDismissed() { |
| 210 | |
| 211 | } |
| 212 | |
| 213 | @Override |
| 214 | public void onNotificatonStartDismissing() { |
| 215 | |
| 216 | } |
| 217 | |
| 218 | @Override |
| 219 | public void onNotificationDoubleTap(boolean accepted, float dx, float dy) { |
| 220 | |
| 221 | } |
| 222 | |
| 223 | @Override |
| 224 | public void onBouncerShown() { |
| 225 | |
| 226 | } |
| 227 | |
| 228 | @Override |
| 229 | public void onBouncerHidden() { |
| 230 | |
| 231 | } |
| 232 | |
| 233 | @Override |
| 234 | public void onTouchEvent(MotionEvent ev, int width, int height) { |
| 235 | |
| 236 | } |
| 237 | |
| 238 | @Override |
| 239 | public void dump(PrintWriter pw) { |
| 240 | |
| 241 | } |
| 242 | |
| 243 | @Override |
| 244 | public void cleanup() { |
| 245 | } |
| 246 | } |