1 /* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.appsecurity.cts 18 19 // Placed in CtsPkgInstallerPermRequestApp sources as its manifest declares what permissions to test 20 object PackageSetInstallerConstants { 21 22 // The app that will be attempting to take over as installer and grant itself permissions 23 const val TARGET_APK = "CtsPkgInstallerPermRequestApp.apk" 24 const val TARGET_PKG = "com.android.cts.packageinstallerpermissionrequestapp" 25 26 // The app acting as the original installer who can restrict permissions 27 const val WHITELIST_APK = "CtsPkgInstallerPermWhitelistApp.apk" 28 const val WHITELIST_PKG = "com.android.cts.packageinstallerpermissionwhitelistapp" 29 30 const val PERMISSION_HARD_RESTRICTED = "android.permission.SEND_SMS" 31 const val PERMISSION_NOT_RESTRICTED = "android.permission.ACCESS_COARSE_LOCATION" 32 const val PERMISSION_IMMUTABLY_SOFT_RESTRICTED = "android.permission.READ_EXTERNAL_STORAGE" 33 const val PERMISSION_KEY = "permission" 34 35 // Whether setInstallerPackageName should throw 36 const val SHOULD_THROW_EXCEPTION_KEY = "shouldThrowException" 37 38 // Whether or not some boolean return method call should succeed 39 const val SHOULD_SUCCEED_KEY = "shouldSucceed" 40 41 // PackageManagerService.THROW_EXCEPTION_ON_REQUIRE_INSTALL_PACKAGES_TO_ADD_INSTALLER_PACKAGE 42 const val CHANGE_ID = 150857253 43 } 44