Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bcd875fd authored by Vijay kumar Tumati's avatar Vijay kumar Tumati Committed by Steve Kondik
Browse files

Camera: Draw smile indicator based on display orientation

Without this, smile indicator is always drawn horizontally
which is a vertical line in 90 and 270 degree cases

CRs-Fixed: 539887

Change-Id: I320b90a7a8981075565171e69b64e7d3dc832a6f
parent 59b887e9
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -300,10 +300,18 @@ public class FaceView extends View
                 if (face.mouth != null) {
                   Log.e(TAG, "smile: " + face.getSmileDegree() + "," + face.getSmileScore());
                   if (face.getSmileDegree() < smile_threashold_no_smile) {
                     if ((mDisplayOrientation == 90) || (mDisplayOrientation == 270)) {
                       point[0] = face.mouth.x;
                       point[1] = face.mouth.y - delta_y + dy;
                       point[2] = face.mouth.x;
                       point[3] = face.mouth.y + delta_y + dy;
                     }
                     else {
                       point[0] = face.mouth.x + dx - delta_x;
                       point[1] = face.mouth.y;
                       point[2] = face.mouth.x + dx + delta_x ;
                       point[3] = face.mouth.y;
                     }
                     mMatrix.mapPoints (point);
                     canvas.drawLine(point[0] + dx, point[1] + dy, point[2] +
                                     dx, point[3] + dy, mPaint);