Fix operator precedence bug causing a crash.

This fixes a bug where string expression was being evaluated
and then compared to null.  The result is a constant expression
which always passes, resulting in inadvertently accessing the
null variable.

Fixes bug 28237450

Change-Id: I755b4466fd1985bd7f8984c17e06839ac4a30642
This commit is contained in:
Jim Miller
2016-04-18 13:00:40 -07:00
parent 8dd32a56f7
commit c1e61b83c2

View File

@@ -222,7 +222,7 @@ public class FingerprintService extends SystemService implements IBinder.DeathRe
removeClient(client);
}
if (DEBUG) Slog.v(TAG, "handleError(client="
+ client != null ? client.getOwnerString() : "null" + ", error = " + error + ")");
+ (client != null ? client.getOwnerString() : "null") + ", error = " + error + ")");
// This is the magic code that starts the next client when the old client finishes.
if (error == FingerprintManager.FINGERPRINT_ERROR_CANCELED) {
mHandler.removeCallbacks(mResetClientState);