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

Commit 4f765871 authored by Ethan Chen's avatar Ethan Chen Committed by Sam Mortimer
Browse files

Camera: Use TextUtils.isEmpty to check null + empty

Change-Id: I2e2233b834a391cc10dfca8c114e699828758c16
parent f6d7492c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4447,7 +4447,7 @@ public class Camera {
        // Example string: "(10000,26623),(10000,30000)". Return null if the
        // passing string is null or the size is 0.
        private ArrayList<int[]> splitRange(String str) {
            if (str == null || str.isEmpty() || str.charAt(0) != '('
            if (TextUtils.isEmpty(str) || str.charAt(0) != '('
                    || str.charAt(str.length() - 1) != ')') {
                Log.e(TAG, "Invalid range list string=" + str);
                return null;
@@ -4472,7 +4472,7 @@ public class Camera {
        // Example string: "(-10,-10,0,0,300),(0,0,10,10,700)". Return null if
        // the passing string is null or the size is 0 or (0,0,0,0,0).
        private ArrayList<Area> splitArea(String str) {
            if (str == null || str.isEmpty() || str.charAt(0) != '('
            if (TextUtils.isEmpty(str) || str.charAt(0) != '('
                    || str.charAt(str.length() - 1) != ')') {
                Log.e(TAG, "Invalid area string=" + str);
                return null;