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 (19338)
Showing
with 471 additions and 170 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 {
}
......
This diff is collapsed.
......@@ -97,7 +97,7 @@ filegroup {
// AIDL sources from external directories
":android.frameworks.location.altitude-V2-java-source",
":android.hardware.biometrics.common-V4-java-source",
":android.hardware.biometrics.fingerprint-V3-java-source",
":android.hardware.biometrics.fingerprint-V5-java-source",
":android.hardware.biometrics.face-V4-java-source",
":android.hardware.gnss-V2-java-source",
":android.hardware.graphics.common-V3-java-source",
......@@ -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}",
......@@ -150,7 +152,6 @@ filegroup {
":framework-javastream-protos",
":statslog-framework-java-gen", // FrameworkStatsLog.java
":audio_policy_configuration_V7_0",
":perfetto_trace_javastream_protos",
],
}
......@@ -355,8 +356,11 @@ java_defaults {
"packages/modules/Media/apex/aidl/stable",
"hardware/interfaces/biometrics/common/aidl",
"hardware/interfaces/biometrics/fingerprint/aidl",
"hardware/interfaces/common/aidl",
"hardware/interfaces/common/fmq/aidl",
"hardware/interfaces/graphics/common/aidl",
"hardware/interfaces/keymaster/aidl",
"hardware/interfaces/power/aidl",
"system/hardware/interfaces/media/aidl",
],
},
......@@ -386,7 +390,6 @@ java_defaults {
// TODO(b/120066492): remove gps_debug and protolog.conf.json when the build
// system propagates "required" properly.
"gps_debug.conf",
"core.protolog.pb",
"framework-res",
// any install dependencies should go into framework-minus-apex-install-dependencies
// rather than here to avoid bloating incremental build time
......@@ -403,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.
......@@ -423,6 +427,8 @@ java_defaults {
"audiopolicy-aidl-java",
"sounddose-aidl-java",
"modules-utils-expresslog",
"perfetto_trace_javastream_protos_jarjar",
"libaconfig_java_proto_nano",
],
}
......@@ -662,6 +668,16 @@ filegroup {
visibility: ["//frameworks/base/api"],
}
java_library {
name: "perfetto_trace_javastream_protos_jarjar",
srcs: [
":perfetto_trace_javastream_protos",
],
jarjar_rules: ":framework-jarjar-rules",
sdk_version: "core_platform",
installable: false,
}
build = [
"AconfigFlags.bp",
"ProtoLibraries.bp",
......
#
# Copyright (C) 2008 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.
#
LOCAL_PATH := $(call my-dir)
$(eval $(call declare-1p-copy-files,frameworks/base,.ogg))
$(eval $(call declare-1p-copy-files,frameworks/base,.kl))
$(eval $(call declare-1p-copy-files,frameworks/base,.kcm))
$(eval $(call declare-1p-copy-files,frameworks/base,.idc))
$(eval $(call declare-1p-copy-files,frameworks/base,dirty-image-objects))
$(eval $(call declare-1p-copy-files,frameworks/base/config,))
$(eval $(call declare-1p-copy-files,frameworks/native/data,))
# Load framework-specific path mappings used later in the build.
include $(LOCAL_PATH)/pathmap.mk
# Build the master framework library.
# The framework contains too many method references (>64K) for poor old DEX.
# So we first build the framework as a monolithic static library then split it
# up into smaller pieces.
# ============================================================
# embedded builds use nothing in frameworks/base
ifneq ($(ANDROID_BUILD_EMBEDDED),true)
# Copy AIDL files to be preprocessed and included in the SDK,
# specified relative to the root of the build tree.
# ============================================================
include $(CLEAR_VARS)
# sdk.atree needs to copy the whole dir: $(OUT_DOCS)/offline-sdk to the final zip.
# So keep offline-sdk-timestamp target here, and unzip offline-sdk-docs.zip to
# $(OUT_DOCS)/offline-sdk.
$(OUT_DOCS)/offline-sdk-timestamp: $(OUT_DOCS)/offline-sdk-docs-docs.zip
$(hide) rm -rf $(OUT_DOCS)/offline-sdk
$(hide) mkdir -p $(OUT_DOCS)/offline-sdk
( unzip -qo $< -d $(OUT_DOCS)/offline-sdk && touch -f $@ ) || exit 1
.PHONY: docs offline-sdk-docs
docs offline-sdk-docs: $(OUT_DOCS)/offline-sdk-timestamp
SDK_METADATA_DIR :=$= $(call intermediates-dir-for,PACKAGING,framework-doc-stubs-metadata,,COMMON)
SDK_METADATA_FILES :=$= $(addprefix $(SDK_METADATA_DIR)/,\
activity_actions.txt \
broadcast_actions.txt \
categories.txt \
features.txt \
service_actions.txt \
widgets.txt)
SDK_METADATA :=$= $(firstword $(SDK_METADATA_FILES))
$(SDK_METADATA): .KATI_IMPLICIT_OUTPUTS := $(filter-out $(SDK_METADATA),$(SDK_METADATA_FILES))
$(SDK_METADATA): $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/framework-doc-stubs-metadata.zip
rm -rf $(SDK_METADATA_DIR)
mkdir -p $(SDK_METADATA_DIR)
unzip -DDqo $< -d $(SDK_METADATA_DIR)
.PHONY: framework-doc-stubs
framework-doc-stubs: $(SDK_METADATA)
# Include subdirectory makefiles
# ============================================================
# If we're building with ONE_SHOT_MAKEFILE (mm, mmm), then what the framework
# team really wants is to build the stuff defined by this makefile.
ifeq (,$(ONE_SHOT_MAKEFILE))
include $(call first-makefiles-under,$(LOCAL_PATH))
endif
endif # ANDROID_BUILD_EMBEDDED
......@@ -262,6 +262,7 @@ $(call add-clean-step, rm -rf $(SOONG_OUT_DIR)/.intermediates/frameworks/base/li
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/InProcessTethering)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/OsuLogin)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system_other/system/app/OsuLogin)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/testcases/ravenwood-runtime)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************
# Bug component: 36137
# Bug template url: https://b.corp.google.com/issues/new?component=36137&template=198919
alexbuy@google.com
patb@google.com
schfan@google.com
\ No newline at end of file
[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
......@@ -31,6 +31,7 @@ gensrcs {
"&& $(location soong_zip) -jar -o $(out) -C $(genDir)/$(in) -D $(genDir)/$(in)",
srcs: [
":aconfigd_protos",
":ipconnectivity-proto-src",
":libstats_atom_enum_protos",
":libstats_atom_message_protos",
......
......@@ -30,10 +30,11 @@ java_genrule {
name: "framework-minus-apex.ravenwood-base",
tools: ["hoststubgen"],
cmd: "$(location hoststubgen) " +
"@$(location ravenwood/ravenwood-standard-options.txt) " +
"@$(location :ravenwood-standard-options) " +
"--debug-log $(location hoststubgen_framework-minus-apex.log) " +
"--stats-file $(location hoststubgen_framework-minus-apex_stats.csv) " +
"--supported-api-list-file $(location hoststubgen_framework-minus-apex_apis.csv) " +
"--out-impl-jar $(location ravenwood.jar) " +
......@@ -41,13 +42,13 @@ java_genrule {
"--gen-input-dump-file $(location hoststubgen_dump.txt) " +
"--in-jar $(location :framework-minus-apex-for-hoststubgen) " +
"--policy-override-file $(location ravenwood/framework-minus-apex-ravenwood-policies.txt) " +
"--annotation-allowed-classes-file $(location ravenwood/ravenwood-annotation-allowed-classes.txt) ",
"--policy-override-file $(location :ravenwood-framework-policies) " +
"--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ",
srcs: [
":framework-minus-apex-for-hoststubgen",
"ravenwood/framework-minus-apex-ravenwood-policies.txt",
"ravenwood/ravenwood-standard-options.txt",
"ravenwood/ravenwood-annotation-allowed-classes.txt",
":ravenwood-framework-policies",
":ravenwood-standard-options",
":ravenwood-annotation-allowed-classes",
],
out: [
"ravenwood.jar",
......@@ -58,6 +59,7 @@ java_genrule {
"hoststubgen_framework-minus-apex.log",
"hoststubgen_framework-minus-apex_stats.csv",
"hoststubgen_framework-minus-apex_apis.csv",
],
visibility: ["//visibility:private"],
}
......@@ -77,6 +79,43 @@ java_genrule {
],
}
// Extract the stats file.
genrule {
name: "framework-minus-apex.ravenwood.stats",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":framework-minus-apex.ravenwood-base{hoststubgen_framework-minus-apex_stats.csv}",
],
out: [
"hoststubgen_framework-minus-apex_stats.csv",
],
}
genrule {
name: "framework-minus-apex.ravenwood.apis",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":framework-minus-apex.ravenwood-base{hoststubgen_framework-minus-apex_apis.csv}",
],
out: [
"hoststubgen_framework-minus-apex_apis.csv",
],
}
genrule {
name: "framework-minus-apex.ravenwood.keep_all",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":framework-minus-apex.ravenwood-base{hoststubgen_keep_all.txt}",
],
out: [
"hoststubgen_framework-minus-apex_keep_all.txt",
],
}
java_library {
name: "services.core-for-hoststubgen",
installable: false, // host only jar.
......@@ -91,10 +130,11 @@ java_genrule {
name: "services.core.ravenwood-base",
tools: ["hoststubgen"],
cmd: "$(location hoststubgen) " +
"@$(location ravenwood/ravenwood-standard-options.txt) " +
"@$(location :ravenwood-standard-options) " +
"--debug-log $(location hoststubgen_services.core.log) " +
"--stats-file $(location hoststubgen_services.core_stats.csv) " +
"--supported-api-list-file $(location hoststubgen_services.core_apis.csv) " +
"--out-impl-jar $(location ravenwood.jar) " +
......@@ -102,13 +142,13 @@ java_genrule {
"--gen-input-dump-file $(location hoststubgen_dump.txt) " +
"--in-jar $(location :services.core-for-hoststubgen) " +
"--policy-override-file $(location ravenwood/services.core-ravenwood-policies.txt) " +
"--annotation-allowed-classes-file $(location ravenwood/ravenwood-annotation-allowed-classes.txt) ",
"--policy-override-file $(location :ravenwood-services-policies) " +
"--annotation-allowed-classes-file $(location :ravenwood-annotation-allowed-classes) ",
srcs: [
":services.core-for-hoststubgen",
"ravenwood/services.core-ravenwood-policies.txt",
"ravenwood/ravenwood-standard-options.txt",
"ravenwood/ravenwood-annotation-allowed-classes.txt",
":ravenwood-services-policies",
":ravenwood-standard-options",
":ravenwood-annotation-allowed-classes",
],
out: [
"ravenwood.jar",
......@@ -119,6 +159,7 @@ java_genrule {
"hoststubgen_services.core.log",
"hoststubgen_services.core_stats.csv",
"hoststubgen_services.core_apis.csv",
],
visibility: ["//visibility:private"],
}
......@@ -135,6 +176,43 @@ java_genrule {
],
}
// Extract the stats file.
genrule {
name: "services.core.ravenwood.stats",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":services.core.ravenwood-base{hoststubgen_services.core_stats.csv}",
],
out: [
"hoststubgen_services.core_stats.csv",
],
}
genrule {
name: "services.core.ravenwood.apis",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":services.core.ravenwood-base{hoststubgen_services.core_apis.csv}",
],
out: [
"hoststubgen_services.core_apis.csv",
],
}
genrule {
name: "services.core.ravenwood.keep_all",
defaults: ["ravenwood-internal-only-visibility-genrule"],
cmd: "cp $(in) $(out)",
srcs: [
":services.core.ravenwood-base{hoststubgen_keep_all.txt}",
],
out: [
"hoststubgen_services.core_keep_all.txt",
],
}
java_library {
name: "services.core.ravenwood-jarjar",
installable: false,
......@@ -142,6 +220,7 @@ java_library {
"services.core.ravenwood",
],
jarjar_rules: ":ravenwood-services-jarjar-rules",
visibility: ["//visibility:private"],
}
java_library {
......@@ -149,9 +228,11 @@ java_library {
installable: false,
srcs: [":services.fakes-sources"],
libs: [
"ravenwood-framework",
"services.core.ravenwood",
],
jarjar_rules: ":ravenwood-services-jarjar-rules",
visibility: ["//visibility:private"],
}
java_library {
......@@ -189,12 +270,22 @@ java_genrule {
visibility: ["//visibility:private"],
}
java_genrule {
name: "z00-all-updatable-modules-system-stubs",
cmd: "cp $(in) $(out)",
srcs: [":all-updatable-modules-system-stubs"],
out: ["z00-all-updatable-modules-system-stubs.jar"],
visibility: ["//visibility:private"],
}
android_ravenwood_libgroup {
name: "ravenwood-runtime",
libs: [
"100-framework-minus-apex.ravenwood",
"200-kxml2-android",
"all-updatable-modules-system-stubs",
"ravenwood-runtime-common-ravenwood",
"android.test.mock.ravenwood",
"ravenwood-helper-runtime",
"hoststubgen-helper-runtime.ravenwood",
......@@ -204,12 +295,19 @@ android_ravenwood_libgroup {
// Provide runtime versions of utils linked in below
"junit",
"truth",
"flag-junit",
"ravenwood-framework",
"ravenwood-junit-impl",
"ravenwood-junit-impl-flag",
"mockito-ravenwood-prebuilt",
"inline-mockito-ravenwood-prebuilt",
// It's a stub, so it should be towards the end.
"z00-all-updatable-modules-system-stubs",
],
jni_libs: [
"libandroid_runtime",
"libravenwood_runtime",
],
}
......@@ -218,6 +316,8 @@ android_ravenwood_libgroup {
libs: [
"junit",
"truth",
"flag-junit",
"ravenwood-framework",
"ravenwood-junit",
"mockito-ravenwood-prebuilt",
"inline-mockito-ravenwood-prebuilt",
......
......@@ -232,30 +232,5 @@
}
]
}
],
"auto-features-postsubmit": [
// Test tag for automotive feature targets. These are only running in postsubmit.
// This tag is used in targeted test features testing to limit resource use.
// TODO(b/256932212): this tag to be removed once the above is no longer in use.
{
"name": "FrameworksMockingServicesTests",
"options": [
{
"include-filter": "com.android.server.pm.UserVisibilityMediatorSUSDTest"
},
{
"include-filter": "com.android.server.pm.UserVisibilityMediatorMUMDTest"
},
{
"include-filter": "com.android.server.pm.UserVisibilityMediatorMUPANDTest"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
},
{
"exclude-annotation": "org.junit.Ignore"
}
]
}
]
}
......@@ -8,4 +8,3 @@ philipcuadra@google.com
shayba@google.com
shombert@google.com
timmurray@google.com
wessam@google.com
......@@ -61,8 +61,8 @@ print("package android.libcore;")
imports = """
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.test.suitebuilder.annotation.LargeTest;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
......@@ -118,4 +118,4 @@ for i in range(max_conflict_depth):
print(" default void f{}() {{}}".format(i*imt_size + j))
print(" }")
print("}")
\ No newline at end of file
print("}")
......@@ -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
"""
......@@ -160,8 +160,8 @@ package android.libcore.varhandles;
import android.perftests.utils.BenchmarkState;
import android.perftests.utils.PerfStatusReporter;
import android.test.suitebuilder.annotation.LargeTest;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
......
......@@ -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,
......
......@@ -22,7 +22,8 @@
<application>
<uses-library android:name="android.test.runner" />
<activity android:name="android.perftests.utils.PerfTestActivity"
android:exported="true">
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar"
android:exported="true">
<intent-filter>
<action android:name="com.android.perftests.core.PERFTEST" />
</intent-filter>
......
......@@ -366,7 +366,7 @@ public class UserLifecycleTests {
mRunner.pauseTiming();
Log.i(TAG, "Stopping timer");
stopUser(userId, /* force */true);
stopUser(userId);
mRunner.resumeTimingForNextIteration();
}
......@@ -429,7 +429,7 @@ public class UserLifecycleTests {
mRunner.pauseTiming();
Log.i(TAG, "Stopping timer");
stopUser(userId, /* force */true);
stopUser(userId);
mRunner.resumeTimingForNextIteration();
}
......@@ -545,7 +545,7 @@ public class UserLifecycleTests {
mRunner.pauseTiming();
Log.d(TAG, "Stopping timer");
switchUserNoCheck(currentUserId);
stopUserAfterWaitingForBroadcastIdle(userId, /* force */true);
stopUserAfterWaitingForBroadcastIdle(userId);
attestFalse("Failed to stop user " + userId, mAm.isUserRunning(userId));
mRunner.resumeTimingForNextIteration();
}
......@@ -571,7 +571,7 @@ public class UserLifecycleTests {
mRunner.pauseTiming();
Log.d(TAG, "Stopping timer");
switchUserNoCheck(startUser);
stopUserAfterWaitingForBroadcastIdle(testUser, true);
stopUserAfterWaitingForBroadcastIdle(testUser);
attestFalse("Failed to stop user " + testUser, mAm.isUserRunning(testUser));
mRunner.resumeTimingForNextIteration();
}
......@@ -660,7 +660,7 @@ public class UserLifecycleTests {
mRunner.resumeTiming();
Log.i(TAG, "Starting timer");
stopUser(userId, false);
stopUser(userId);
mRunner.pauseTiming();
Log.i(TAG, "Stopping timer");
......@@ -685,7 +685,7 @@ public class UserLifecycleTests {
Log.d(TAG, "Starting timer");
mRunner.resumeTiming();
stopUser(userId, false);
stopUser(userId);
mRunner.pauseTiming();
Log.d(TAG, "Stopping timer");
......@@ -883,7 +883,7 @@ public class UserLifecycleTests {
final int userId = createManagedProfile();
// Start the profile initially, then stop it. Similar to setQuietModeEnabled.
startUserInBackgroundAndWaitForUnlock(userId);
stopUserAfterWaitingForBroadcastIdle(userId, true);
stopUserAfterWaitingForBroadcastIdle(userId);
mRunner.resumeTiming();
Log.i(TAG, "Starting timer");
......@@ -905,7 +905,7 @@ public class UserLifecycleTests {
startUserInBackgroundAndWaitForUnlock(userId);
while (mRunner.keepRunning()) {
mRunner.pauseTiming();
stopUserAfterWaitingForBroadcastIdle(userId, true);
stopUserAfterWaitingForBroadcastIdle(userId);
mRunner.resumeTiming();
Log.d(TAG, "Starting timer");
......@@ -987,7 +987,7 @@ public class UserLifecycleTests {
installPreexistingApp(userId, DUMMY_PACKAGE_NAME);
startUserInBackgroundAndWaitForUnlock(userId);
startApp(userId, DUMMY_PACKAGE_NAME);
stopUserAfterWaitingForBroadcastIdle(userId, true);
stopUserAfterWaitingForBroadcastIdle(userId);
SystemClock.sleep(1_000); // 1 second cool-down before re-starting profile.
mRunner.resumeTiming();
Log.i(TAG, "Starting timer");
......@@ -1019,7 +1019,7 @@ public class UserLifecycleTests {
installPreexistingApp(userId, DUMMY_PACKAGE_NAME);
startUserInBackgroundAndWaitForUnlock(userId);
startApp(userId, DUMMY_PACKAGE_NAME);
stopUserAfterWaitingForBroadcastIdle(userId, true);
stopUserAfterWaitingForBroadcastIdle(userId);
SystemClock.sleep(1_000); // 1 second cool-down before re-starting profile.
mRunner.resumeTiming();
Log.d(TAG, "Starting timer");
......@@ -1144,7 +1144,7 @@ public class UserLifecycleTests {
mRunner.resumeTiming();
Log.i(TAG, "Starting timer");
stopUser(userId, true);
stopUser(userId);
mRunner.pauseTiming();
Log.i(TAG, "Stopping timer");
......@@ -1168,7 +1168,7 @@ public class UserLifecycleTests {
mRunner.resumeTiming();
Log.d(TAG, "Starting timer");
stopUser(userId, true);
stopUser(userId);
mRunner.pauseTiming();
Log.d(TAG, "Stopping timer");
......@@ -1294,15 +1294,15 @@ public class UserLifecycleTests {
* Do not call this method while timing is on. i.e. between mRunner.resumeTiming() and
* mRunner.pauseTiming(). Otherwise it would cause the test results to be spiky.
*/
private void stopUserAfterWaitingForBroadcastIdle(int userId, boolean force)
private void stopUserAfterWaitingForBroadcastIdle(int userId)
throws RemoteException {
waitForBroadcastIdle();
stopUser(userId, force);
stopUser(userId);
}
private void stopUser(int userId, boolean force) throws RemoteException {
private void stopUser(int userId) throws RemoteException {
final CountDownLatch latch = new CountDownLatch(1);
mIam.stopUser(userId, force /* force */, new IStopUserCallback.Stub() {
mIam.stopUserWithCallback(userId, new IStopUserCallback.Stub() {
@Override
public void userStopped(int userId) throws RemoteException {
latch.countDown();
......@@ -1352,7 +1352,7 @@ public class UserLifecycleTests {
attestTrue("Didn't switch back to user, " + origUser, origUser == mAm.getCurrentUser());
if (stopNewUser) {
stopUserAfterWaitingForBroadcastIdle(testUser, true);
stopUserAfterWaitingForBroadcastIdle(testUser);
attestFalse("Failed to stop user " + testUser, mAm.isUserRunning(testUser));
}
......@@ -1471,7 +1471,7 @@ public class UserLifecycleTests {
}
private void removeUser(int userId) throws RemoteException {
stopUserAfterWaitingForBroadcastIdle(userId, true);
stopUserAfterWaitingForBroadcastIdle(userId);
try {
ShellHelper.runShellCommandWithTimeout("pm remove-user -w " + userId,
TIMEOUT_IN_SECOND);
......@@ -1512,7 +1512,7 @@ public class UserLifecycleTests {
final boolean preStartComplete = mIam.startUserInBackgroundWithListener(userId,
preWaiter) && preWaiter.waitForFinish(TIMEOUT_IN_SECOND * 1000);
stopUserAfterWaitingForBroadcastIdle(userId, /* force */true);
stopUserAfterWaitingForBroadcastIdle(userId);
assertTrue("Pre start was not performed for user" + userId, preStartComplete);
}
......
......@@ -76,11 +76,6 @@
<option name="test-file-name" value="QueriesAll49.apk"/>
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
<option name="package" value="com.android.perftests.packagemanager"/>
<option name="hidden-api-checks" value="false"/>
</test>
<metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
<option name="directory-keys" value="/data/local/PackageManagerPerfTests"/>
<option name="collect-on-run-ended-only" value="true"/>
......