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.plugins;
18 
19 import android.net.Uri;
20 import android.view.MotionEvent;
21 
22 import com.android.systemui.plugins.annotations.ProvidesInterface;
23 
24 import java.io.PrintWriter;
25 
26 /**
27  * Interface that decides whether a touch on the phone was accidental. i.e. Pocket Dialing.
28  *
29  * {@see com.android.systemui.classifier.FalsingManagerImpl}
30  */
31 @ProvidesInterface(version = FalsingManager.VERSION)
32 public interface FalsingManager {
33     int VERSION = 2;
34 
onSucccessfulUnlock()35     void onSucccessfulUnlock();
36 
onNotificationActive()37     void onNotificationActive();
38 
setShowingAod(boolean showingAod)39     void setShowingAod(boolean showingAod);
40 
onNotificatonStartDraggingDown()41     void onNotificatonStartDraggingDown();
42 
isUnlockingDisabled()43     boolean isUnlockingDisabled();
44 
isFalseTouch()45     boolean isFalseTouch();
46 
onNotificatonStopDraggingDown()47     void onNotificatonStopDraggingDown();
48 
setNotificationExpanded()49     void setNotificationExpanded();
50 
isClassiferEnabled()51     boolean isClassiferEnabled();
52 
onQsDown()53     void onQsDown();
54 
setQsExpanded(boolean expanded)55     void setQsExpanded(boolean expanded);
56 
shouldEnforceBouncer()57     boolean shouldEnforceBouncer();
58 
onTrackingStarted(boolean secure)59     void onTrackingStarted(boolean secure);
60 
onTrackingStopped()61     void onTrackingStopped();
62 
onLeftAffordanceOn()63     void onLeftAffordanceOn();
64 
onCameraOn()65     void onCameraOn();
66 
onAffordanceSwipingStarted(boolean rightCorner)67     void onAffordanceSwipingStarted(boolean rightCorner);
68 
onAffordanceSwipingAborted()69     void onAffordanceSwipingAborted();
70 
onStartExpandingFromPulse()71     void onStartExpandingFromPulse();
72 
onExpansionFromPulseStopped()73     void onExpansionFromPulseStopped();
74 
reportRejectedTouch()75     Uri reportRejectedTouch();
76 
onScreenOnFromTouch()77     void onScreenOnFromTouch();
78 
isReportingEnabled()79     boolean isReportingEnabled();
80 
onUnlockHintStarted()81     void onUnlockHintStarted();
82 
onCameraHintStarted()83     void onCameraHintStarted();
84 
onLeftAffordanceHintStarted()85     void onLeftAffordanceHintStarted();
86 
onScreenTurningOn()87     void onScreenTurningOn();
88 
onScreenOff()89     void onScreenOff();
90 
onNotificatonStopDismissing()91     void onNotificatonStopDismissing();
92 
onNotificationDismissed()93     void onNotificationDismissed();
94 
onNotificatonStartDismissing()95     void onNotificatonStartDismissing();
96 
onNotificationDoubleTap(boolean accepted, float dx, float dy)97     void onNotificationDoubleTap(boolean accepted, float dx, float dy);
98 
onBouncerShown()99     void onBouncerShown();
100 
onBouncerHidden()101     void onBouncerHidden();
102 
onTouchEvent(MotionEvent ev, int width, int height)103     void onTouchEvent(MotionEvent ev, int width, int height);
104 
dump(PrintWriter pw)105     void dump(PrintWriter pw);
106 
cleanup()107     void cleanup();
108 }
109