Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +2 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.SystemUIFactory; import com.android.systemui.classifier.FalsingLog; import com.android.systemui.classifier.FalsingManager; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.fragments.FragmentHostManager; import com.android.systemui.plugins.qs.QS; import com.android.systemui.qs.car.CarQSFragment; Loading Loading @@ -794,7 +794,7 @@ public class CarStatusBar extends StatusBar implements KeyguardUpdateMonitor.getInstance(mContext).dump(fd, pw, args); } FalsingManager.getInstance(mContext).dump(pw); FalsingManagerFactory.getInstance(mContext).dump(pw); FalsingLog.dump(pw); pw.println("SharedPreferences:"); Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/FalsingPlugin.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import com.android.systemui.plugins.annotations.ProvidesInterface; * Used to capture Falsing data (related to unlocking the screen). * * The intent is that the data can later be analyzed to validate the quality of the * {@link com.android.systemui.classifier.FalsingManager}. * {@link com.android.systemui.classifier.FalsingManagerFactory.FalsingManager}. */ @ProvidesInterface(action = FalsingPlugin.ACTION, version = FalsingPlugin.VERSION) public interface FalsingPlugin extends Plugin { Loading packages/SystemUI/src/com/android/systemui/SwipeHelper.java +3 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.accessibility.AccessibilityEvent; import com.android.systemui.classifier.FalsingManager; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.classifier.FalsingManagerFactory.FalsingManager; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin; import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; Loading Loading @@ -112,7 +113,7 @@ public class SwipeHelper implements Gefingerpoken { mDensityScale = res.getDisplayMetrics().density; mFalsingThreshold = res.getDimensionPixelSize(R.dimen.swipe_helper_falsing_threshold); mFadeDependingOnAmountSwiped = res.getBoolean(R.bool.config_fadeDependingOnAmountSwiped); mFalsingManager = FalsingManager.getInstance(context); mFalsingManager = FalsingManagerFactory.getInstance(context); mFlingAnimationUtils = new FlingAnimationUtils(context, getMaxEscapeAnimDuration() / 1000f); } Loading packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +4 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.ViewMediatorCallback; import com.android.systemui.assist.AssistManager; import com.android.systemui.classifier.FalsingManager; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.dock.DockManager; import com.android.systemui.fragments.FragmentService; import com.android.systemui.keyguard.DismissCallbackRegistry; Loading Loading @@ -129,8 +129,9 @@ public class SystemUIFactory { DismissCallbackRegistry dismissCallbackRegistry, KeyguardBouncer.BouncerExpansionCallback expansionCallback) { return new KeyguardBouncer(context, callback, lockPatternUtils, container, dismissCallbackRegistry, FalsingManager.getInstance(context), expansionCallback, KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); dismissCallbackRegistry, FalsingManagerFactory.getInstance(context), expansionCallback, KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); } public ScrimController createScrimController(ScrimView scrimBehind, ScrimView scrimInFront, Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerFactory.java 0 → 100644 +116 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.classifier; import android.content.Context; import android.net.Uri; import android.view.MotionEvent; import java.io.PrintWriter; /** * When the phone is locked, listens to touch, sensor and phone events and sends them to * DataCollector and HumanInteractionClassifier. * * It does not collect touch events when the bouncer shows up. */ public class FalsingManagerFactory { private static FalsingManager sInstance = null; private FalsingManagerFactory() {} public static FalsingManager getInstance(Context context) { if (sInstance == null) { sInstance = new FalsingManagerImpl(context); } return sInstance; } public interface FalsingManager { void onSucccessfulUnlock(); void onNotificationActive(); void setShowingAod(boolean showingAod); void onNotificatonStartDraggingDown(); boolean isUnlockingDisabled(); boolean isFalseTouch(); void onNotificatonStopDraggingDown(); void setNotificationExpanded(); boolean isClassiferEnabled(); void onQsDown(); void setQsExpanded(boolean expanded); boolean shouldEnforceBouncer(); void onTrackingStarted(boolean secure); void onTrackingStopped(); void onLeftAffordanceOn(); void onCameraOn(); void onAffordanceSwipingStarted(boolean rightCorner); void onAffordanceSwipingAborted(); void onStartExpandingFromPulse(); void onExpansionFromPulseStopped(); Uri reportRejectedTouch(); void onScreenOnFromTouch(); boolean isReportingEnabled(); void onUnlockHintStarted(); void onCameraHintStarted(); void onLeftAffordanceHintStarted(); void onScreenTurningOn(); void onScreenOff(); void onNotificatonStopDismissing(); void onNotificationDismissed(); void onNotificatonStartDismissing(); void onNotificationDoubleTap(boolean accepted, float dx, float dy); void onBouncerShown(); void onBouncerHidden(); void onTouchEvent(MotionEvent ev, int width, int height); void dump(PrintWriter pw); } } Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +2 −2 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ import com.android.systemui.Prefs; import com.android.systemui.R; import com.android.systemui.SystemUIFactory; import com.android.systemui.classifier.FalsingLog; import com.android.systemui.classifier.FalsingManager; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.fragments.FragmentHostManager; import com.android.systemui.plugins.qs.QS; import com.android.systemui.qs.car.CarQSFragment; Loading Loading @@ -794,7 +794,7 @@ public class CarStatusBar extends StatusBar implements KeyguardUpdateMonitor.getInstance(mContext).dump(fd, pw, args); } FalsingManager.getInstance(mContext).dump(pw); FalsingManagerFactory.getInstance(mContext).dump(pw); FalsingLog.dump(pw); pw.println("SharedPreferences:"); Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/FalsingPlugin.java +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ import com.android.systemui.plugins.annotations.ProvidesInterface; * Used to capture Falsing data (related to unlocking the screen). * * The intent is that the data can later be analyzed to validate the quality of the * {@link com.android.systemui.classifier.FalsingManager}. * {@link com.android.systemui.classifier.FalsingManagerFactory.FalsingManager}. */ @ProvidesInterface(action = FalsingPlugin.ACTION, version = FalsingPlugin.VERSION) public interface FalsingPlugin extends Plugin { Loading
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +3 −2 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.accessibility.AccessibilityEvent; import com.android.systemui.classifier.FalsingManager; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.classifier.FalsingManagerFactory.FalsingManager; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin; import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; Loading Loading @@ -112,7 +113,7 @@ public class SwipeHelper implements Gefingerpoken { mDensityScale = res.getDisplayMetrics().density; mFalsingThreshold = res.getDimensionPixelSize(R.dimen.swipe_helper_falsing_threshold); mFadeDependingOnAmountSwiped = res.getBoolean(R.bool.config_fadeDependingOnAmountSwiped); mFalsingManager = FalsingManager.getInstance(context); mFalsingManager = FalsingManagerFactory.getInstance(context); mFlingAnimationUtils = new FlingAnimationUtils(context, getMaxEscapeAnimDuration() / 1000f); } Loading
packages/SystemUI/src/com/android/systemui/SystemUIFactory.java +4 −3 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.ViewMediatorCallback; import com.android.systemui.assist.AssistManager; import com.android.systemui.classifier.FalsingManager; import com.android.systemui.classifier.FalsingManagerFactory; import com.android.systemui.dock.DockManager; import com.android.systemui.fragments.FragmentService; import com.android.systemui.keyguard.DismissCallbackRegistry; Loading Loading @@ -129,8 +129,9 @@ public class SystemUIFactory { DismissCallbackRegistry dismissCallbackRegistry, KeyguardBouncer.BouncerExpansionCallback expansionCallback) { return new KeyguardBouncer(context, callback, lockPatternUtils, container, dismissCallbackRegistry, FalsingManager.getInstance(context), expansionCallback, KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); dismissCallbackRegistry, FalsingManagerFactory.getInstance(context), expansionCallback, KeyguardUpdateMonitor.getInstance(context), new Handler(Looper.getMainLooper())); } public ScrimController createScrimController(ScrimView scrimBehind, ScrimView scrimInFront, Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingManagerFactory.java 0 → 100644 +116 −0 Original line number Diff line number Diff line /* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.classifier; import android.content.Context; import android.net.Uri; import android.view.MotionEvent; import java.io.PrintWriter; /** * When the phone is locked, listens to touch, sensor and phone events and sends them to * DataCollector and HumanInteractionClassifier. * * It does not collect touch events when the bouncer shows up. */ public class FalsingManagerFactory { private static FalsingManager sInstance = null; private FalsingManagerFactory() {} public static FalsingManager getInstance(Context context) { if (sInstance == null) { sInstance = new FalsingManagerImpl(context); } return sInstance; } public interface FalsingManager { void onSucccessfulUnlock(); void onNotificationActive(); void setShowingAod(boolean showingAod); void onNotificatonStartDraggingDown(); boolean isUnlockingDisabled(); boolean isFalseTouch(); void onNotificatonStopDraggingDown(); void setNotificationExpanded(); boolean isClassiferEnabled(); void onQsDown(); void setQsExpanded(boolean expanded); boolean shouldEnforceBouncer(); void onTrackingStarted(boolean secure); void onTrackingStopped(); void onLeftAffordanceOn(); void onCameraOn(); void onAffordanceSwipingStarted(boolean rightCorner); void onAffordanceSwipingAborted(); void onStartExpandingFromPulse(); void onExpansionFromPulseStopped(); Uri reportRejectedTouch(); void onScreenOnFromTouch(); boolean isReportingEnabled(); void onUnlockHintStarted(); void onCameraHintStarted(); void onLeftAffordanceHintStarted(); void onScreenTurningOn(); void onScreenOff(); void onNotificatonStopDismissing(); void onNotificationDismissed(); void onNotificatonStartDismissing(); void onNotificationDoubleTap(boolean accepted, float dx, float dy); void onBouncerShown(); void onBouncerHidden(); void onTouchEvent(MotionEvent ev, int width, int height); void dump(PrintWriter pw); } }