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

Commit cfe3745a authored by Nick Kovacs's avatar Nick Kovacs
Browse files

Add tests for min installable target sdk block

Added tests that cover the behavior of blocking installs
when the minimum installable target sdk value is not met.

These tests override the feature flags to test the
eventual behavior when the features are fully ramped up.

Bug: 237321649
Test: atest PackageManagerTests
Change-Id: I475c4b917aa7693bae7f843e9d56d21593532b8f
parent ffafed1e
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

android_test_helper_app {
    name: "FrameworksServicesTests_install_target_sdk_22",
    defaults: ["FrameworksServicesTests_apks_defaults"],

    srcs: ["**/*.java"],
}
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.frameworks.coretests.install_target_sdk_22">
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="22">
    </uses-sdk>

    <application android:hasCode="false">
    </application>
</manifest>
+6 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!-- Just need this placeholder file to have something to build. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
  <string name="placeholder">placeholder</string>
</resources>
+15 −0
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

android_test_helper_app {
    name: "FrameworksServicesTests_install_target_sdk_23",
    defaults: ["FrameworksServicesTests_apks_defaults"],

    srcs: ["**/*.java"],
}
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.frameworks.coretests.install_target_sdk_23">
    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="23">
    </uses-sdk>

    <application android:hasCode="false">
    </application>
</manifest>
Loading