blob: 913e7819b7fae8176c4e2990a7ae7e5a0ce204cc [file] [log] [blame]
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -07001/*
2 * Copyright (C) 2015 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
17package com.android.systemui.classifier;
18
19import android.content.Context;
20import android.database.ContentObserver;
21import android.hardware.Sensor;
22import android.hardware.SensorEvent;
23import android.hardware.SensorEventListener;
24import android.hardware.SensorManager;
Adrian Roos7bb38a92016-07-21 11:44:01 -070025import android.net.Uri;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070026import android.os.Handler;
Selim Cinekf8c4add2017-06-08 09:54:58 -070027import android.os.Looper;
Adrian Roosc5584ce2016-02-24 14:17:19 -080028import android.os.PowerManager;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070029import android.os.UserHandle;
30import android.provider.Settings;
31import android.view.MotionEvent;
Adrian Roosca664b92016-04-18 14:40:27 -070032import android.view.accessibility.AccessibilityManager;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070033
Jorim Jaggie549a8d2017-05-15 02:40:05 +020034import com.android.systemui.Dependency;
35import com.android.systemui.UiOffloadThread;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070036import com.android.systemui.analytics.DataCollector;
37import com.android.systemui.statusbar.StatusBarState;
Adrian Roos7a8ae8a2017-08-02 16:26:50 +020038import com.android.systemui.util.AsyncSensorManager;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070039
Adrian Roos401caae2016-03-04 13:35:21 -080040import java.io.PrintWriter;
41
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070042/**
43 * When the phone is locked, listens to touch, sensor and phone events and sends them to
44 * DataCollector and HumanInteractionClassifier.
45 *
46 * It does not collect touch events when the bouncer shows up.
47 */
48public class FalsingManager implements SensorEventListener {
49 private static final String ENFORCE_BOUNCER = "falsing_manager_enforce_bouncer";
50
Blazej Magnowski6dc59b42015-09-22 15:14:20 -070051 private static final int[] CLASSIFIER_SENSORS = new int[] {
52 Sensor.TYPE_PROXIMITY,
53 };
54
55 private static final int[] COLLECTOR_SENSORS = new int[] {
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070056 Sensor.TYPE_ACCELEROMETER,
57 Sensor.TYPE_GYROSCOPE,
58 Sensor.TYPE_PROXIMITY,
59 Sensor.TYPE_LIGHT,
60 Sensor.TYPE_ROTATION_VECTOR,
61 };
62
Selim Cinekf8c4add2017-06-08 09:54:58 -070063 private final Handler mHandler = new Handler(Looper.getMainLooper());
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070064 private final Context mContext;
65
66 private final SensorManager mSensorManager;
67 private final DataCollector mDataCollector;
68 private final HumanInteractionClassifier mHumanInteractionClassifier;
Adrian Roosca664b92016-04-18 14:40:27 -070069 private final AccessibilityManager mAccessibilityManager;
Jorim Jaggie549a8d2017-05-15 02:40:05 +020070 private final UiOffloadThread mUiOffloadThread;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070071
72 private static FalsingManager sInstance = null;
73
74 private boolean mEnforceBouncer = false;
75 private boolean mBouncerOn = false;
76 private boolean mSessionActive = false;
77 private int mState = StatusBarState.SHADE;
Adrian Roosc5584ce2016-02-24 14:17:19 -080078 private boolean mScreenOn;
Adrian Roose395b5d2017-06-28 16:52:37 +020079 private boolean mShowingAod;
Adrian Roos8e291a52016-12-09 16:10:19 -080080 private Runnable mPendingWtf;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070081
82 protected final ContentObserver mSettingsObserver = new ContentObserver(mHandler) {
83 @Override
84 public void onChange(boolean selfChange) {
85 updateConfiguration();
86 }
87 };
88
89 private FalsingManager(Context context) {
90 mContext = context;
Adrian Roos7a8ae8a2017-08-02 16:26:50 +020091 mSensorManager = Dependency.get(AsyncSensorManager.class);
Adrian Roosca664b92016-04-18 14:40:27 -070092 mAccessibilityManager = context.getSystemService(AccessibilityManager.class);
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070093 mDataCollector = DataCollector.getInstance(mContext);
94 mHumanInteractionClassifier = HumanInteractionClassifier.getInstance(mContext);
Jorim Jaggie549a8d2017-05-15 02:40:05 +020095 mUiOffloadThread = Dependency.get(UiOffloadThread.class);
Adrian Roosc5584ce2016-02-24 14:17:19 -080096 mScreenOn = context.getSystemService(PowerManager.class).isInteractive();
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -070097
98 mContext.getContentResolver().registerContentObserver(
99 Settings.Secure.getUriFor(ENFORCE_BOUNCER), false,
100 mSettingsObserver,
101 UserHandle.USER_ALL);
102
103 updateConfiguration();
104 }
105
106 public static FalsingManager getInstance(Context context) {
107 if (sInstance == null) {
108 sInstance = new FalsingManager(context);
109 }
110 return sInstance;
111 }
112
113 private void updateConfiguration() {
114 mEnforceBouncer = 0 != Settings.Secure.getInt(mContext.getContentResolver(),
115 ENFORCE_BOUNCER, 0);
116 }
117
Adrian Roosc5584ce2016-02-24 14:17:19 -0800118 private boolean shouldSessionBeActive() {
Adrian Roos401caae2016-03-04 13:35:21 -0800119 if (FalsingLog.ENABLED && FalsingLog.VERBOSE)
120 FalsingLog.v("shouldBeActive", new StringBuilder()
121 .append("enabled=").append(isEnabled() ? 1 : 0)
122 .append(" mScreenOn=").append(mScreenOn ? 1 : 0)
123 .append(" mState=").append(StatusBarState.toShortString(mState))
124 .toString()
125 );
Adrian Roose395b5d2017-06-28 16:52:37 +0200126 return isEnabled() && mScreenOn && (mState == StatusBarState.KEYGUARD) && !mShowingAod;
Adrian Roosc5584ce2016-02-24 14:17:19 -0800127 }
128
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700129 private boolean sessionEntrypoint() {
Adrian Roosc5584ce2016-02-24 14:17:19 -0800130 if (!mSessionActive && shouldSessionBeActive()) {
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700131 onSessionStart();
132 return true;
133 }
134 return false;
135 }
136
Adrian Roosc5584ce2016-02-24 14:17:19 -0800137 private void sessionExitpoint(boolean force) {
138 if (mSessionActive && (force || !shouldSessionBeActive())) {
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700139 mSessionActive = false;
Jorim Jaggie549a8d2017-05-15 02:40:05 +0200140
141 // This can be expensive, and doesn't need to happen on the main thread.
142 mUiOffloadThread.submit(() -> {
143 mSensorManager.unregisterListener(this);
144 });
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700145 }
146 }
147
Adrian Roose395b5d2017-06-28 16:52:37 +0200148 public void updateSessionActive() {
149 if (shouldSessionBeActive()) {
150 sessionEntrypoint();
151 } else {
152 sessionExitpoint(false /* force */);
153 }
154 }
155
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700156 private void onSessionStart() {
Adrian Roos401caae2016-03-04 13:35:21 -0800157 if (FalsingLog.ENABLED) {
158 FalsingLog.i("onSessionStart", "classifierEnabled=" + isClassiferEnabled());
Adrian Roos8e291a52016-12-09 16:10:19 -0800159 clearPendingWtf();
Adrian Roos401caae2016-03-04 13:35:21 -0800160 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700161 mBouncerOn = false;
162 mSessionActive = true;
Blazej Magnowski6dc59b42015-09-22 15:14:20 -0700163
164 if (mHumanInteractionClassifier.isEnabled()) {
165 registerSensors(CLASSIFIER_SENSORS);
166 }
Adrian Roos7bb38a92016-07-21 11:44:01 -0700167 if (mDataCollector.isEnabledFull()) {
Blazej Magnowski6dc59b42015-09-22 15:14:20 -0700168 registerSensors(COLLECTOR_SENSORS);
169 }
Selim Cinek1ed50042018-01-18 17:12:32 -0800170 if (mDataCollector.isEnabled()) {
171 mDataCollector.onFalsingSessionStarted();
172 }
Blazej Magnowski6dc59b42015-09-22 15:14:20 -0700173 }
174
175 private void registerSensors(int [] sensors) {
176 for (int sensorType : sensors) {
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700177 Sensor s = mSensorManager.getDefaultSensor(sensorType);
178 if (s != null) {
Jorim Jaggie549a8d2017-05-15 02:40:05 +0200179
180 // This can be expensive, and doesn't need to happen on the main thread.
181 mUiOffloadThread.submit(() -> {
182 mSensorManager.registerListener(this, s, SensorManager.SENSOR_DELAY_GAME);
183 });
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700184 }
185 }
186 }
187
Blazej Magnowski6dc59b42015-09-22 15:14:20 -0700188 public boolean isClassiferEnabled() {
189 return mHumanInteractionClassifier.isEnabled();
190 }
191
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700192 private boolean isEnabled() {
193 return mHumanInteractionClassifier.isEnabled() || mDataCollector.isEnabled();
194 }
195
196 /**
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700197 * @return true if the classifier determined that this is not a human interacting with the phone
198 */
Blazej Magnowski9f01c5b2015-09-17 15:14:29 -0700199 public boolean isFalseTouch() {
Adrian Roos401caae2016-03-04 13:35:21 -0800200 if (FalsingLog.ENABLED) {
Adrian Roos6a04cb12016-03-14 20:21:02 -0700201 // We're getting some false wtfs from touches that happen after the device went
202 // to sleep. Only report missing sessions that happen when the device is interactive.
Adrian Roos8e291a52016-12-09 16:10:19 -0800203 if (!mSessionActive && mContext.getSystemService(PowerManager.class).isInteractive()
204 && mPendingWtf == null) {
205 int enabled = isEnabled() ? 1 : 0;
206 int screenOn = mScreenOn ? 1 : 0;
207 String state = StatusBarState.toShortString(mState);
208 Throwable here = new Throwable("here");
209 FalsingLog.wLogcat("isFalseTouch", new StringBuilder()
Adrian Roos401caae2016-03-04 13:35:21 -0800210 .append("Session is not active, yet there's a query for a false touch.")
Adrian Roos8e291a52016-12-09 16:10:19 -0800211 .append(" enabled=").append(enabled)
212 .append(" mScreenOn=").append(screenOn)
213 .append(" mState=").append(state)
214 .append(". Escalating to WTF if screen does not turn on soon.")
Adrian Roos401caae2016-03-04 13:35:21 -0800215 .toString());
Adrian Roos8e291a52016-12-09 16:10:19 -0800216
217 // Unfortunately we're also getting false positives for touches that happen right
218 // after the screen turns on, but before that notification has made it to us.
219 // Unfortunately there's no good way to catch that, except to wait and see if we get
220 // the screen on notification soon.
221 mPendingWtf = () -> FalsingLog.wtf("isFalseTouch", new StringBuilder()
222 .append("Session did not become active after query for a false touch.")
223 .append(" enabled=").append(enabled)
224 .append('/').append(isEnabled() ? 1 : 0)
225 .append(" mScreenOn=").append(screenOn)
226 .append('/').append(mScreenOn ? 1 : 0)
227 .append(" mState=").append(state)
228 .append('/').append(StatusBarState.toShortString(mState))
229 .append(". Look for warnings ~1000ms earlier to see root cause.")
230 .toString(), here);
231 mHandler.postDelayed(mPendingWtf, 1000);
Adrian Roos401caae2016-03-04 13:35:21 -0800232 }
233 }
Adrian Roosca664b92016-04-18 14:40:27 -0700234 if (mAccessibilityManager.isTouchExplorationEnabled()) {
235 // Touch exploration triggers false positives in the classifier and
236 // already sufficiently prevents false unlocks.
237 return false;
238 }
Blazej Magnowski9f01c5b2015-09-17 15:14:29 -0700239 return mHumanInteractionClassifier.isFalseTouch();
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700240 }
241
Adrian Roos8e291a52016-12-09 16:10:19 -0800242 private void clearPendingWtf() {
243 if (mPendingWtf != null) {
244 mHandler.removeCallbacks(mPendingWtf);
245 mPendingWtf = null;
246 }
247 }
248
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700249 @Override
250 public synchronized void onSensorChanged(SensorEvent event) {
251 mDataCollector.onSensorChanged(event);
252 mHumanInteractionClassifier.onSensorChanged(event);
253 }
254
255 @Override
256 public void onAccuracyChanged(Sensor sensor, int accuracy) {
257 mDataCollector.onAccuracyChanged(sensor, accuracy);
258 }
259
260 public boolean shouldEnforceBouncer() {
261 return mEnforceBouncer;
262 }
263
Adrian Roose395b5d2017-06-28 16:52:37 +0200264 public void setShowingAod(boolean showingAod) {
265 mShowingAod = showingAod;
266 updateSessionActive();
267 }
268
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700269 public void setStatusBarState(int state) {
Adrian Roos401caae2016-03-04 13:35:21 -0800270 if (FalsingLog.ENABLED) {
271 FalsingLog.i("setStatusBarState", new StringBuilder()
272 .append("from=").append(StatusBarState.toShortString(mState))
273 .append(" to=").append(StatusBarState.toShortString(state))
274 .toString());
275 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700276 mState = state;
Adrian Roose395b5d2017-06-28 16:52:37 +0200277 updateSessionActive();
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700278 }
279
280 public void onScreenTurningOn() {
Adrian Roos401caae2016-03-04 13:35:21 -0800281 if (FalsingLog.ENABLED) {
282 FalsingLog.i("onScreenTurningOn", new StringBuilder()
283 .append("from=").append(mScreenOn ? 1 : 0)
284 .toString());
Adrian Roos8e291a52016-12-09 16:10:19 -0800285 clearPendingWtf();
Adrian Roos401caae2016-03-04 13:35:21 -0800286 }
Adrian Roosc5584ce2016-02-24 14:17:19 -0800287 mScreenOn = true;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700288 if (sessionEntrypoint()) {
289 mDataCollector.onScreenTurningOn();
290 }
291 }
292
293 public void onScreenOnFromTouch() {
Adrian Roos401caae2016-03-04 13:35:21 -0800294 if (FalsingLog.ENABLED) {
295 FalsingLog.i("onScreenOnFromTouch", new StringBuilder()
296 .append("from=").append(mScreenOn ? 1 : 0)
297 .toString());
298 }
Adrian Roosc5584ce2016-02-24 14:17:19 -0800299 mScreenOn = true;
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700300 if (sessionEntrypoint()) {
301 mDataCollector.onScreenOnFromTouch();
302 }
303 }
304
305 public void onScreenOff() {
Adrian Roos401caae2016-03-04 13:35:21 -0800306 if (FalsingLog.ENABLED) {
307 FalsingLog.i("onScreenOff", new StringBuilder()
308 .append("from=").append(mScreenOn ? 1 : 0)
309 .toString());
310 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700311 mDataCollector.onScreenOff();
Adrian Roosc5584ce2016-02-24 14:17:19 -0800312 mScreenOn = false;
313 sessionExitpoint(false /* force */);
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700314 }
315
316 public void onSucccessfulUnlock() {
Adrian Roos401caae2016-03-04 13:35:21 -0800317 if (FalsingLog.ENABLED) {
318 FalsingLog.i("onSucccessfulUnlock", "");
319 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700320 mDataCollector.onSucccessfulUnlock();
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700321 }
322
323 public void onBouncerShown() {
Adrian Roos401caae2016-03-04 13:35:21 -0800324 if (FalsingLog.ENABLED) {
325 FalsingLog.i("onBouncerShown", new StringBuilder()
326 .append("from=").append(mBouncerOn ? 1 : 0)
327 .toString());
328 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700329 if (!mBouncerOn) {
330 mBouncerOn = true;
331 mDataCollector.onBouncerShown();
332 }
333 }
334
335 public void onBouncerHidden() {
Adrian Roos401caae2016-03-04 13:35:21 -0800336 if (FalsingLog.ENABLED) {
337 FalsingLog.i("onBouncerHidden", new StringBuilder()
338 .append("from=").append(mBouncerOn ? 1 : 0)
339 .toString());
340 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700341 if (mBouncerOn) {
342 mBouncerOn = false;
343 mDataCollector.onBouncerHidden();
344 }
345 }
346
347 public void onQsDown() {
Adrian Roos401caae2016-03-04 13:35:21 -0800348 if (FalsingLog.ENABLED) {
349 FalsingLog.i("onQsDown", "");
350 }
Blazej Magnowski9f01c5b2015-09-17 15:14:29 -0700351 mHumanInteractionClassifier.setType(Classifier.QUICK_SETTINGS);
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700352 mDataCollector.onQsDown();
353 }
354
355 public void setQsExpanded(boolean expanded) {
356 mDataCollector.setQsExpanded(expanded);
357 }
358
Lucas Dupinbc9aac12018-03-04 20:18:15 -0800359 public void onTrackingStarted(boolean secure) {
Adrian Roos401caae2016-03-04 13:35:21 -0800360 if (FalsingLog.ENABLED) {
361 FalsingLog.i("onTrackingStarted", "");
362 }
Lucas Dupinbc9aac12018-03-04 20:18:15 -0800363 mHumanInteractionClassifier.setType(secure ?
364 Classifier.BOUNCER_UNLOCK : Classifier.UNLOCK);
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700365 mDataCollector.onTrackingStarted();
366 }
367
368 public void onTrackingStopped() {
369 mDataCollector.onTrackingStopped();
370 }
371
372 public void onNotificationActive() {
373 mDataCollector.onNotificationActive();
374 }
375
Adrian Roos9f0b0022016-11-09 15:56:50 -0800376 public void onNotificationDoubleTap(boolean accepted, float dx, float dy) {
377 if (FalsingLog.ENABLED) {
378 FalsingLog.i("onNotificationDoubleTap", "accepted=" + accepted
379 + " dx=" + dx + " dy=" + dy + " (px)");
380 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700381 mDataCollector.onNotificationDoubleTap();
382 }
383
384 public void setNotificationExpanded() {
385 mDataCollector.setNotificationExpanded();
386 }
387
388 public void onNotificatonStartDraggingDown() {
Adrian Roos401caae2016-03-04 13:35:21 -0800389 if (FalsingLog.ENABLED) {
390 FalsingLog.i("onNotificatonStartDraggingDown", "");
391 }
Blazej Magnowski9f01c5b2015-09-17 15:14:29 -0700392 mHumanInteractionClassifier.setType(Classifier.NOTIFICATION_DRAG_DOWN);
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700393 mDataCollector.onNotificatonStartDraggingDown();
394 }
395
396 public void onNotificatonStopDraggingDown() {
397 mDataCollector.onNotificatonStopDraggingDown();
398 }
399
400 public void onNotificationDismissed() {
401 mDataCollector.onNotificationDismissed();
402 }
403
404 public void onNotificatonStartDismissing() {
Adrian Roos401caae2016-03-04 13:35:21 -0800405 if (FalsingLog.ENABLED) {
406 FalsingLog.i("onNotificatonStartDismissing", "");
407 }
Blazej Magnowski9f01c5b2015-09-17 15:14:29 -0700408 mHumanInteractionClassifier.setType(Classifier.NOTIFICATION_DISMISS);
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700409 mDataCollector.onNotificatonStartDismissing();
410 }
411
412 public void onNotificatonStopDismissing() {
413 mDataCollector.onNotificatonStopDismissing();
414 }
415
416 public void onCameraOn() {
417 mDataCollector.onCameraOn();
418 }
419
420 public void onLeftAffordanceOn() {
421 mDataCollector.onLeftAffordanceOn();
422 }
423
424 public void onAffordanceSwipingStarted(boolean rightCorner) {
Adrian Roos401caae2016-03-04 13:35:21 -0800425 if (FalsingLog.ENABLED) {
426 FalsingLog.i("onAffordanceSwipingStarted", "");
427 }
Blazej Magnowski9f01c5b2015-09-17 15:14:29 -0700428 if (rightCorner) {
429 mHumanInteractionClassifier.setType(Classifier.RIGHT_AFFORDANCE);
430 } else {
431 mHumanInteractionClassifier.setType(Classifier.LEFT_AFFORDANCE);
432 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700433 mDataCollector.onAffordanceSwipingStarted(rightCorner);
434 }
435
436 public void onAffordanceSwipingAborted() {
437 mDataCollector.onAffordanceSwipingAborted();
438 }
439
440 public void onUnlockHintStarted() {
441 mDataCollector.onUnlockHintStarted();
442 }
443
444 public void onCameraHintStarted() {
445 mDataCollector.onCameraHintStarted();
446 }
447
448 public void onLeftAffordanceHintStarted() {
449 mDataCollector.onLeftAffordanceHintStarted();
450 }
451
452 public void onTouchEvent(MotionEvent event, int width, int height) {
453 if (mSessionActive && !mBouncerOn) {
454 mDataCollector.onTouchEvent(event, width, height);
455 mHumanInteractionClassifier.onTouchEvent(event);
456 }
457 }
Adrian Roos401caae2016-03-04 13:35:21 -0800458
459 public void dump(PrintWriter pw) {
460 pw.println("FALSING MANAGER");
461 pw.print("classifierEnabled="); pw.println(isClassiferEnabled() ? 1 : 0);
462 pw.print("mSessionActive="); pw.println(mSessionActive ? 1 : 0);
463 pw.print("mBouncerOn="); pw.println(mSessionActive ? 1 : 0);
464 pw.print("mState="); pw.println(StatusBarState.toShortString(mState));
465 pw.print("mScreenOn="); pw.println(mScreenOn ? 1 : 0);
466 pw.println();
467 }
Adrian Roos7bb38a92016-07-21 11:44:01 -0700468
469 public Uri reportRejectedTouch() {
470 if (mDataCollector.isEnabled()) {
471 return mDataCollector.reportRejectedTouch();
472 }
473 return null;
474 }
475
476 public boolean isReportingEnabled() {
477 return mDataCollector.isReportingEnabled();
478 }
Blazej Magnowski0e2ffbd2015-09-10 14:37:17 -0700479}