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