Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +29 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Point; import android.graphics.RectF; import android.hardware.biometrics.SensorLocationInternal; import android.hardware.display.DisplayManager; Loading @@ -45,6 +46,7 @@ import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.Surface; import android.view.VelocityTracker; import android.view.View; import android.view.WindowManager; Loading Loading @@ -414,8 +416,33 @@ public class UdfpsController implements DozeReceiver { final long sinceLastLog = mSystemClock.elapsedRealtime() - mTouchLogTime; if (!isIlluminationRequested && !mGoodCaptureReceived && !exceedsVelocityThreshold) { onFingerDown((int) event.getRawX(), (int) event.getRawY(), minor, major); final int rawX = (int) event.getRawX(); final int rawY = (int) event.getRawY(); // Default coordinates assume portrait mode. int x = rawX; int y = rawY; // Gets the size based on the current rotation of the display. Point p = new Point(); mContext.getDisplay().getRealSize(p); // Transform x, y to portrait mode if the device is in landscape mode. switch (mContext.getDisplay().getRotation()) { case Surface.ROTATION_90: x = p.y - rawY; y = rawX; break; case Surface.ROTATION_270: x = rawY; y = p.x - rawX; break; default: // Do nothing to stay in portrait mode. } onFingerDown(x, y, minor, major); Log.v(TAG, "onTouch | finger down: " + touchInfo); mTouchLogTime = mSystemClock.elapsedRealtime(); mPowerManager.userActivity(mSystemClock.uptimeMillis(), Loading Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +29 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.graphics.Point; import android.graphics.RectF; import android.hardware.biometrics.SensorLocationInternal; import android.hardware.display.DisplayManager; Loading @@ -45,6 +46,7 @@ import android.os.Vibrator; import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.Surface; import android.view.VelocityTracker; import android.view.View; import android.view.WindowManager; Loading Loading @@ -414,8 +416,33 @@ public class UdfpsController implements DozeReceiver { final long sinceLastLog = mSystemClock.elapsedRealtime() - mTouchLogTime; if (!isIlluminationRequested && !mGoodCaptureReceived && !exceedsVelocityThreshold) { onFingerDown((int) event.getRawX(), (int) event.getRawY(), minor, major); final int rawX = (int) event.getRawX(); final int rawY = (int) event.getRawY(); // Default coordinates assume portrait mode. int x = rawX; int y = rawY; // Gets the size based on the current rotation of the display. Point p = new Point(); mContext.getDisplay().getRealSize(p); // Transform x, y to portrait mode if the device is in landscape mode. switch (mContext.getDisplay().getRotation()) { case Surface.ROTATION_90: x = p.y - rawY; y = rawX; break; case Surface.ROTATION_270: x = rawY; y = p.x - rawX; break; default: // Do nothing to stay in portrait mode. } onFingerDown(x, y, minor, major); Log.v(TAG, "onTouch | finger down: " + touchInfo); mTouchLogTime = mSystemClock.elapsedRealtime(); mPowerManager.userActivity(mSystemClock.uptimeMillis(), Loading