Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Dhina17/platform_frameworks_base
  • itisFarzin/platform_frameworks_base-old
2 results
Show changes
Commits on Source (6075)
Showing
with 220 additions and 23 deletions
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_arm64/CtsShimPriv.apk"
}
......@@ -8,7 +8,7 @@ drops {
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
......
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_arm64/CtsShim.apk"
}
......@@ -8,7 +8,7 @@ drops {
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
......
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_x86_64/CtsShimPriv.apk"
}
......@@ -8,7 +8,7 @@ drops {
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
......
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_x86_64/CtsShim.apk"
}
......@@ -8,7 +8,7 @@ drops {
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
......
......@@ -307,6 +307,11 @@ java_aconfig_library {
defaults: ["framework-minus-apex-aconfig-java-defaults"],
}
cc_aconfig_library {
name: "android_security_flags_aconfig_c_lib",
aconfig_declarations: "android.security.flags-aconfig",
}
// UsageStats
aconfig_declarations {
name: "android.app.usage.flags-aconfig",
......@@ -685,15 +690,17 @@ java_aconfig_library {
// Permissions
aconfig_declarations {
name: "android.permission.flags-aconfig",
package: "android.permission.flags",
container: "system",
package: "android.permission.flags",
exportable: true,
srcs: ["core/java/android/permission/flags.aconfig"],
}
java_aconfig_library {
name: "android.permission.flags-aconfig-java",
name: "android.permission.flags-aconfig-java-export",
aconfig_declarations: "android.permission.flags-aconfig",
defaults: ["framework-minus-apex-aconfig-java-defaults"],
mode: "exported",
min_sdk_version: "30",
apex_available: [
"//apex_available:platform",
......@@ -708,9 +715,15 @@ java_aconfig_library {
host_supported: true,
defaults: ["framework-minus-apex-aconfig-java-defaults"],
min_sdk_version: "30",
}
java_aconfig_library {
name: "android.permission.flags-aconfig-java",
aconfig_declarations: "android.permission.flags-aconfig",
defaults: ["framework-minus-apex-aconfig-java-defaults"],
min_sdk_version: "30",
apex_available: [
"//apex_available:platform",
"com.android.permission",
"com.android.nfcservices",
],
}
......
......@@ -115,7 +115,7 @@ filegroup {
":android.security.legacykeystore-java-source",
":android.security.maintenance-java-source",
":android.security.metrics-java-source",
":android.system.keystore2-V3-java-source",
":android.system.keystore2-V4-java-source",
":android.hardware.cas-V1-java-source",
":credstore_aidl",
":dumpstate_aidl",
......@@ -140,6 +140,8 @@ filegroup {
":vold_aidl",
":deviceproductinfoconstants_aidl",
":adbrootservice_aidl",
// For the generated R.java and Manifest.java
":framework-res{.aapt.srcjar}",
......@@ -404,6 +406,7 @@ java_defaults {
"android.hardware.common.fmq-V1-java",
"bouncycastle-repackaged-unbundled",
"com.android.sysprop.foldlockbehavior",
"com.android.sysprop.view",
"framework-internal-utils",
// If MimeMap ever becomes its own APEX, then this dependency would need to be removed
// in favor of an API stubs dependency in java_library "framework" below.
......@@ -425,6 +428,7 @@ java_defaults {
"sounddose-aidl-java",
"modules-utils-expresslog",
"perfetto_trace_javastream_protos_jarjar",
"libaconfig_java_proto_nano",
],
}
......
brycelee@google.com
[Builtin Hooks]
clang_format = true
bpfmt = true
ktfmt = true
[Builtin Hooks Options]
# Only turn on clang-format check for the following subfolders.
......@@ -17,6 +18,7 @@ clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
tests/
tools/
bpfmt = -d
ktfmt = --kotlinlang-style --include-dirs=services/permission,packages/SystemUI
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
......@@ -25,9 +27,10 @@ hidden_api_txt_checksorted_hook = ${REPO_ROOT}/tools/platform-compat/hiddenapi/c
hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclude.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}
ktfmt_hook = ${REPO_ROOT}/external/ktfmt/ktfmt.py --check -i ${REPO_ROOT}/frameworks/base/ktfmt_includes.txt ${PREUPLOAD_FILES}
ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py --no-verify-format -f ${PREUPLOAD_FILES}
# This flag check hook runs only for "packages/SystemUI" subdirectory. If you want to include this check for other subdirectories, please modify flag_check.py.
flag_hook = ${REPO_ROOT}/frameworks/base/packages/SystemUI/flag_check.py --msg=${PREUPLOAD_COMMIT_MESSAGE} --files=${PREUPLOAD_FILES} --project=${REPO_PATH}
flag_hook = ${REPO_ROOT}/frameworks/base/packages/SystemUI/flag_check.py --msg=${PREUPLOAD_COMMIT_MESSAGE} --files=${PREUPLOAD_FILES} --project=${REPO_PROJECT}
[Tool Paths]
ktfmt = ${REPO_ROOT}/external/ktfmt/ktfmt.sh
......@@ -284,6 +284,8 @@ android_ravenwood_libgroup {
"100-framework-minus-apex.ravenwood",
"200-kxml2-android",
"ravenwood-runtime-common-ravenwood",
"android.test.mock.ravenwood",
"ravenwood-helper-runtime",
"hoststubgen-helper-runtime.ravenwood",
......
......@@ -8,4 +8,3 @@ philipcuadra@google.com
shayba@google.com
shombert@google.com
timmurray@google.com
wessam@google.com
......@@ -21,7 +21,7 @@ Adapted to use CrystalBall from art/test/2239-varhandle-perf/util-src/generate_j
To run use: python generate_java.py <destination_directory>
And then to correct lint errors (from frameworks/base):
../../tools/repohooks/tools/google-java-format.py --fix --sort-imports --google-java-format-diff ../../external/google-java-format/scripts/google-java-format-diff.py
../../tools/repohooks/tools/google-java-format.py --fix --google-java-format-diff ../../external/google-java-format/scripts/google-java-format-diff.py
"""
......
......@@ -17,8 +17,7 @@ package android.permission
import android.app.AppOpsManager
import android.content.Context
import androidx.benchmark.BenchmarkState
import androidx.benchmark.junit4.BenchmarkRule
import android.perftests.utils.PerfStatusReporter
import androidx.test.core.app.ApplicationProvider
import androidx.test.filters.LargeTest
import org.junit.Before
......@@ -34,7 +33,7 @@ import org.junit.Test
* these APIs should be monitored closely for performance.
*/
class AppOpsPerfTest {
@get:Rule val mBenchmarkRule: BenchmarkRule = BenchmarkRule()
@get:Rule val perfStatusReporter = PerfStatusReporter()
private lateinit var appOpsManager: AppOpsManager
private lateinit var opPackageName: String
private var opPackageUid: Int = 0
......@@ -49,7 +48,7 @@ class AppOpsPerfTest {
@Test
fun testNoteOp() {
val state: BenchmarkState = mBenchmarkRule.getState()
val state = perfStatusReporter.benchmarkState
while (state.keepRunning()) {
appOpsManager.noteOp(
AppOpsManager.OPSTR_FINE_LOCATION,
......@@ -63,7 +62,7 @@ class AppOpsPerfTest {
@Test
fun testUnsafeCheckOp() {
val state: BenchmarkState = mBenchmarkRule.getState()
val state = perfStatusReporter.benchmarkState
while (state.keepRunning()) {
appOpsManager.unsafeCheckOp(
AppOpsManager.OPSTR_FINE_LOCATION,
......
/*
* Copyright (C) 2024 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.
*/
package android.perftests.permission
import android.app.AppOpsManager
import android.content.Context
import android.perftests.utils.PerfStatusReporter
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class AppOpsPerfTest {
@get:Rule val perfStatusReporter = PerfStatusReporter()
private lateinit var appOpsManager: AppOpsManager
private lateinit var opPackageName: String
private var opPackageUid: Int = 0
@Before
fun setUp() {
val context: Context = ApplicationProvider.getApplicationContext()
appOpsManager = context.getSystemService(AppOpsManager::class.java)!!
opPackageName = context.opPackageName
opPackageUid = context.getPackageManager().getPackageUid(opPackageName, 0)
}
@Test
fun testNoteOp() {
val state = perfStatusReporter.benchmarkState
while (state.keepRunning()) {
appOpsManager.noteOp(
AppOpsManager.OPSTR_FINE_LOCATION,
opPackageUid,
opPackageName,
null,
null
)
}
}
@Test
fun testUnsafeCheckOp() {
val state = perfStatusReporter.benchmarkState
while (state.keepRunning()) {
appOpsManager.unsafeCheckOp(
AppOpsManager.OPSTR_FINE_LOCATION,
opPackageUid,
opPackageName
)
}
}
}
/*
* Copyright (C) 2024 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.
*/
package android.perftests.permission
import android.Manifest
import android.companion.virtual.VirtualDeviceManager.PERSISTENT_DEVICE_ID_DEFAULT
import android.content.Context
import android.perftests.utils.PerfStatusReporter
import android.permission.PermissionManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.android.compatibility.common.util.AdoptShellPermissionsRule
import com.android.compatibility.common.util.SystemUtil.runShellCommand
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class PermissionManagerPerfTest {
@get:Rule var perfStatusReporter = PerfStatusReporter()
@get:Rule
val mAdoptShellPermissionsRule =
AdoptShellPermissionsRule(
InstrumentationRegistry.getInstrumentation().getUiAutomation(),
Manifest.permission.INSTALL_PACKAGES,
Manifest.permission.DELETE_PACKAGES,
Manifest.permission.GRANT_RUNTIME_PERMISSIONS,
Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS,
Manifest.permission.REVOKE_RUNTIME_PERMISSIONS,
)
val context: Context = InstrumentationRegistry.getInstrumentation().targetContext
val permissionManager = context.getSystemService(PermissionManager::class.java)!!
@Before
fun setup() {
val apkPath = "$APK_DIR${APK_NAME}.apk"
runShellCommand("pm install -tg $apkPath")
}
@After
fun cleanup() {
runShellCommand("pm uninstall $PKG_NAME")
}
@Test
fun testGetAllPermissionStates() {
val benchmarkState = perfStatusReporter.benchmarkState
while (benchmarkState.keepRunning()) {
permissionManager.getAllPermissionStates(PKG_NAME, PERSISTENT_DEVICE_ID_DEFAULT)
}
}
companion object {
private const val APK_DIR = "/data/local/tmp/perftests/"
private const val APK_NAME = "UsePermissionApp0"
private const val PKG_NAME = "android.perftests.appenumeration0"
}
}
......@@ -36,6 +36,7 @@ import java.io.IOException
import java.io.InputStreamReader
import java.util.concurrent.TimeUnit
import java.util.function.BiConsumer
import org.junit.Ignore
@RunWith(AndroidJUnit4::class)
class PermissionServicePerfTest {
......@@ -48,6 +49,7 @@ class PermissionServicePerfTest {
val mUiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation()
@Test
@Ignore("Fails to capture duration, results in infinite loop and execution timeout")
fun testInstallPackages() {
mUiAutomation.executeShellCommand(COMMAND_TRACE_START)
eventually { assertThat(Trace.isTagEnabled(TRACE_TAG)).isTrue() }
......
......@@ -31,6 +31,7 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresPermission;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.compat.Compatibility;
import android.compat.annotation.ChangeId;
......@@ -1366,6 +1367,7 @@ public class JobInfo implements Parcelable {
* @return This object for method chaining
*/
@FlaggedApi(Flags.FLAG_JOB_DEBUG_INFO_APIS)
@SuppressLint("BuilderSetStyle")
@NonNull
public Builder removeDebugTag(@NonNull String tag) {
mDebugTags.remove(tag);
......
......@@ -74,6 +74,8 @@ public interface DeviceIdleInternal {
boolean isAppOnWhitelist(int appid);
int[] getPowerSaveWhitelistSystemAppIds();
int[] getPowerSaveWhitelistUserAppIds();
int[] getPowerSaveTempWhitelistAppIds();
......
......@@ -33,6 +33,7 @@ java_library {
"modules-utils-fastxmlserializer",
"service-jobscheduler-alarm.flags-aconfig-java",
"service-jobscheduler-job.flags-aconfig-java",
"service-jobscheduler-appidle.flags-aconfig-java",
],
// Rename classes shared with the framework
......
......@@ -42,3 +42,16 @@ java_aconfig_library {
name: "service-jobscheduler-alarm.flags-aconfig-java",
aconfig_declarations: "alarm_flags",
}
// App Idle
aconfig_declarations {
name: "app_idle_flags",
package: "com.android.server.usage",
container: "system",
srcs: ["app_idle.aconfig"],
}
java_aconfig_library {
name: "service-jobscheduler-appidle.flags-aconfig-java",
aconfig_declarations: "app_idle_flags",
}
package: "com.android.server.usage"
container: "system"
flag {
name: "avoid_idle_check"
namespace: "backstage_power"
description: "Postpone app idle check after boot completed"
is_fixed_read_only: true
bug: "337864590"
metadata {
purpose: PURPOSE_BUGFIX
}
}