From a30bf371e47e1f8aff1cfd5ac22c2662d5a26d93 Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Wed, 9 May 2018 12:12:34 -0700 Subject: [PATCH] Use device api level if first_api_level is not set. Bug: 79429532 Change-Id: I2fddad81fb1cd23d4023d7f3f5124f14a8c994f7 --- .../com/android/quickstep/OverviewInteractionState.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/OverviewInteractionState.java b/quickstep/src/com/android/quickstep/OverviewInteractionState.java index 9416a2976a..ad4af62043 100644 --- a/quickstep/src/com/android/quickstep/OverviewInteractionState.java +++ b/quickstep/src/com/android/quickstep/OverviewInteractionState.java @@ -203,7 +203,12 @@ public class OverviewInteractionState { } private boolean shouldIgnoreSwipeUpEnabledSettings() { - String sdkInt = getSystemProperty("ro.product.first_api_level", "0"); + int deviceApiLevel = Build.VERSION.SDK_INT; + + // Note: on factory ROM devices, this first_api_level property is intentionally not set. + // deviceApiLevel is used in these case. + String sdkInt = getSystemProperty("ro.product.first_api_level", + Integer.toString(deviceApiLevel)); try { return Integer.parseInt(sdkInt) >= Build.VERSION_CODES.P; } catch (Exception e) {