1 /* 2 * Copyright 2023 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.view.KeyEvent 20 import android.view.MotionEvent 21 import com.android.systemui.classifier.FalsingCollectorImpl.logDebug 22 import com.android.systemui.dagger.SysUISingleton 23 import javax.inject.Inject 24 25 @SysUISingleton 26 class FalsingCollectorNoOp @Inject constructor() : FalsingCollector { initnull27 override fun init() { 28 logDebug("NOOP: init") 29 } 30 onSuccessfulUnlocknull31 override fun onSuccessfulUnlock() { 32 logDebug("NOOP: onSuccessfulUnlock") 33 } 34 setShowingAodnull35 override fun setShowingAod(showingAod: Boolean) { 36 logDebug("NOOP: setShowingAod($showingAod)") 37 } 38 shouldEnforceBouncernull39 override fun shouldEnforceBouncer(): Boolean = false 40 41 override fun onScreenOnFromTouch() { 42 logDebug("NOOP: onScreenOnFromTouch") 43 } 44 isReportingEnablednull45 override fun isReportingEnabled(): Boolean = false 46 47 override fun onScreenTurningOn() { 48 logDebug("NOOP: onScreenTurningOn") 49 } 50 onScreenOffnull51 override fun onScreenOff() { 52 logDebug("NOOP: onScreenOff") 53 } 54 onBouncerShownnull55 override fun onBouncerShown() { 56 logDebug("NOOP: onBouncerShown") 57 } 58 onBouncerHiddennull59 override fun onBouncerHidden() { 60 logDebug("NOOP: onBouncerHidden") 61 } 62 onKeyEventnull63 override fun onKeyEvent(ev: KeyEvent) { 64 logDebug("NOOP: onKeyEvent(${KeyEvent.actionToString(ev.action)}") 65 } 66 onTouchEventnull67 override fun onTouchEvent(ev: MotionEvent) { 68 logDebug("NOOP: onTouchEvent(${MotionEvent.actionToString(ev.actionMasked)})") 69 } 70 onMotionEventCompletenull71 override fun onMotionEventComplete() { 72 logDebug("NOOP: onMotionEventComplete") 73 } 74 avoidGesturenull75 override fun avoidGesture() { 76 logDebug("NOOP: avoidGesture") 77 } 78 cleanupnull79 override fun cleanup() { 80 logDebug("NOOP: cleanup") 81 } 82 updateFalseConfidencenull83 override fun updateFalseConfidence(result: FalsingClassifier.Result) { 84 logDebug("NOOP: updateFalseConfidence(${result.isFalse})") 85 } 86 onA11yActionnull87 override fun onA11yAction() { 88 logDebug("NOOP: onA11yAction") 89 } 90 } 91