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

Commit 55265bc6 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Don't show show unsupported sdk warning for platform in development

Change-Id: I1526551bee804b76e8ca3ca0684d48b2be3d872f
Bug: 75318890
Test: atest CtsActivityManagerDeviceTestCases:PrereleaseSdkTest
parent 88836ce6
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -122,12 +122,16 @@ class AppWarnings {
            return;
        }

        final int platformSdk = Build.VERSION.SDK_INT;

        if (ActivityManager.isRunningInTestHarness()
                && !mAlwaysShowUnsupportedCompileSdkWarningActivities.contains(r.realActivity)) {
            // Don't show warning if we are running in a test harness and we don't have to always
            // show for this activity.
                || platformSdk == Build.VERSION_CODES.CUR_DEVELOPMENT) {
            // Don't show warning if we are running in a test harness or the platform is currently
            // in development, expect if we were requested to always show it for this activity.
            if (!mAlwaysShowUnsupportedCompileSdkWarningActivities.contains(r.realActivity)) {
                return;
            }
        }

        // If the application was built against an pre-release SDK that's older than the current
        // platform OR if the current platform is pre-release and older than the SDK against which
@@ -135,7 +139,6 @@ class AppWarnings {
        // codenames (e.g. simultaneous pre-release development), then we're likely to run into
        // compatibility issues. Warn the user and offer to check for an update.
        final int compileSdk = r.appInfo.compileSdkVersion;
        final int platformSdk = Build.VERSION.SDK_INT;
        final boolean isCompileSdkPreview = !"REL".equals(r.appInfo.compileSdkVersionCodename);
        final boolean isPlatformSdkPreview = !"REL".equals(Build.VERSION.CODENAME);
        if ((isCompileSdkPreview && compileSdk < platformSdk)