Loading Android.bp +42 −5 Original line number Diff line number Diff line Loading @@ -721,6 +721,7 @@ java_defaults { "frameworks/av/camera/aidl", "frameworks/av/media/libaudioclient/aidl", "frameworks/native/aidl/gui", "frameworks/native/libs/incidentcompanion/binder", "system/core/storaged/binder", "system/vold/binder", "system/gsid/aidl", Loading Loading @@ -968,7 +969,10 @@ java_library { output_params: ["store_unknown_fields=true"], include_dirs: ["external/protobuf/src"], }, exclude_srcs: [ "core/proto/android/privacy.proto", "core/proto/android/section.proto", ], sdk_version: "current", srcs: [ "core/proto/**/*.proto", Loading @@ -988,6 +992,10 @@ java_library { "core/proto/**/*.proto", "libs/incident/proto/android/os/**/*.proto", ], exclude_srcs: [ "core/proto/android/privacy.proto", "core/proto/android/section.proto", ], // Protos have lots of MissingOverride and similar. errorprone: { javacflags: ["-XepDisableAllChecks"], Loading @@ -995,9 +1003,9 @@ java_library { } // ==== c++ proto device library ============================== cc_library { name: "libplatformprotos", host_supported: true, cc_defaults { name: "libplatformprotos-defaults", proto: { export_proto_headers: true, include_dirs: ["external/protobuf/src"], Loading @@ -1011,8 +1019,13 @@ cc_library { srcs: [ "core/proto/**/*.proto", "libs/incident/**/*.proto", ], } cc_library { name: "libplatformprotos", defaults: ["libplatformprotos-defaults"], host_supported: true, target: { host: { Loading @@ -1024,6 +1037,9 @@ cc_library { proto: { type: "lite", }, shared_libs: [ "libprotobuf-cpp-lite", ], shared: { enabled: false, }, Loading @@ -1031,6 +1047,26 @@ cc_library { }, } // This is the full proto version of libplatformprotos. It may only // be used by test code that is not shipped on the device. cc_library { name: "libplatformprotos-test", defaults: ["libplatformprotos-defaults"], host_supported: false, target: { android: { proto: { type: "full", }, shared: { enabled: false, }, }, }, } gensrcs { name: "gen-platform-proto-constants", depfile: true, Loading Loading @@ -1068,6 +1104,7 @@ gensrcs { output_extension: "proto.h", } subdirs = [ "cmds/*", "core/*", Loading apct-tests/perftests/core/src/android/os/KernelCpuThreadReaderPerfTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class KernelCpuThreadReaderPerfTest { final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); assertNotNull(mKernelCpuThreadReader); while (state.keepRunning()) { this.mKernelCpuThreadReader.getCurrentProcessCpuUsage(); this.mKernelCpuThreadReader.getProcessCpuUsage(); } } } apct-tests/perftests/textclassifier/Android.bp 0 → 100644 +25 −0 Original line number Diff line number Diff line // Copyright (C) 2019 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. android_test { name: "TextClassifierPerfTests", srcs: ["src/**/*.java"], static_libs: [ "androidx.test.rules", "androidx.annotation_annotation", "apct-perftests-utils", ], platform_apis: true, test_suites: ["device-tests"], } packages/SystemUI/res/drawable/ic_qs_brightness_auto_off.xml→apct-tests/perftests/textclassifier/AndroidManifest.xml +10 −5 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2017 The Android Open Source Project <!-- Copyright (C) 2018 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. Loading @@ -14,7 +13,13 @@ 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.perftests.textclassifier"> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_qs_brightness_auto_off_alpha" android:tint="?android:attr/colorControlNormal" /> <application> <uses-library android:name="android.test.runner" /> </application> <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" android:targetPackage="com.android.perftests.textclassifier"/> </manifest> packages/SystemUI/res/anim/ic_signal_workmode_enable_animation_ic_signal_briefcase.xml→apct-tests/perftests/textclassifier/AndroidTest.xml +28 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2015 The Android Open Source Project <!-- Copyright (C) 2018 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. Loading @@ -14,20 +13,16 @@ See the License for the specific language governing permissions and limitations under the License. --> <set xmlns:android="http://schemas.android.com/apk/res/android" > <set android:ordering="sequentially" > <objectAnimator android:duration="200" android:propertyName="alpha" android:valueFrom="0.5" android:valueTo="0.5" android:interpolator="@android:interpolator/fast_out_slow_in" /> <objectAnimator android:duration="350" android:propertyName="alpha" android:valueFrom="0.5" android:valueTo="1" android:interpolator="@android:interpolator/fast_out_slow_in" /> </set> </set> <configuration description="Runs TextClassifierPerfTests metric instrumentation."> <option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct-metric-instrumentation" /> <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> <option name="cleanup-apks" value="true" /> <option name="test-file-name" value="TextClassifierPerfTests.apk" /> </target_preparer> <test class="com.android.tradefed.testtype.AndroidJUnitTest" > <option name="package" value="com.android.perftests.textclassifier" /> <option name="hidden-api-checks" value="false"/> </test> </configuration> Loading
Android.bp +42 −5 Original line number Diff line number Diff line Loading @@ -721,6 +721,7 @@ java_defaults { "frameworks/av/camera/aidl", "frameworks/av/media/libaudioclient/aidl", "frameworks/native/aidl/gui", "frameworks/native/libs/incidentcompanion/binder", "system/core/storaged/binder", "system/vold/binder", "system/gsid/aidl", Loading Loading @@ -968,7 +969,10 @@ java_library { output_params: ["store_unknown_fields=true"], include_dirs: ["external/protobuf/src"], }, exclude_srcs: [ "core/proto/android/privacy.proto", "core/proto/android/section.proto", ], sdk_version: "current", srcs: [ "core/proto/**/*.proto", Loading @@ -988,6 +992,10 @@ java_library { "core/proto/**/*.proto", "libs/incident/proto/android/os/**/*.proto", ], exclude_srcs: [ "core/proto/android/privacy.proto", "core/proto/android/section.proto", ], // Protos have lots of MissingOverride and similar. errorprone: { javacflags: ["-XepDisableAllChecks"], Loading @@ -995,9 +1003,9 @@ java_library { } // ==== c++ proto device library ============================== cc_library { name: "libplatformprotos", host_supported: true, cc_defaults { name: "libplatformprotos-defaults", proto: { export_proto_headers: true, include_dirs: ["external/protobuf/src"], Loading @@ -1011,8 +1019,13 @@ cc_library { srcs: [ "core/proto/**/*.proto", "libs/incident/**/*.proto", ], } cc_library { name: "libplatformprotos", defaults: ["libplatformprotos-defaults"], host_supported: true, target: { host: { Loading @@ -1024,6 +1037,9 @@ cc_library { proto: { type: "lite", }, shared_libs: [ "libprotobuf-cpp-lite", ], shared: { enabled: false, }, Loading @@ -1031,6 +1047,26 @@ cc_library { }, } // This is the full proto version of libplatformprotos. It may only // be used by test code that is not shipped on the device. cc_library { name: "libplatformprotos-test", defaults: ["libplatformprotos-defaults"], host_supported: false, target: { android: { proto: { type: "full", }, shared: { enabled: false, }, }, }, } gensrcs { name: "gen-platform-proto-constants", depfile: true, Loading Loading @@ -1068,6 +1104,7 @@ gensrcs { output_extension: "proto.h", } subdirs = [ "cmds/*", "core/*", Loading
apct-tests/perftests/core/src/android/os/KernelCpuThreadReaderPerfTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class KernelCpuThreadReaderPerfTest { final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); assertNotNull(mKernelCpuThreadReader); while (state.keepRunning()) { this.mKernelCpuThreadReader.getCurrentProcessCpuUsage(); this.mKernelCpuThreadReader.getProcessCpuUsage(); } } }
apct-tests/perftests/textclassifier/Android.bp 0 → 100644 +25 −0 Original line number Diff line number Diff line // Copyright (C) 2019 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. android_test { name: "TextClassifierPerfTests", srcs: ["src/**/*.java"], static_libs: [ "androidx.test.rules", "androidx.annotation_annotation", "apct-perftests-utils", ], platform_apis: true, test_suites: ["device-tests"], }
packages/SystemUI/res/drawable/ic_qs_brightness_auto_off.xml→apct-tests/perftests/textclassifier/AndroidManifest.xml +10 −5 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2017 The Android Open Source Project <!-- Copyright (C) 2018 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. Loading @@ -14,7 +13,13 @@ 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.perftests.textclassifier"> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_qs_brightness_auto_off_alpha" android:tint="?android:attr/colorControlNormal" /> <application> <uses-library android:name="android.test.runner" /> </application> <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" android:targetPackage="com.android.perftests.textclassifier"/> </manifest>
packages/SystemUI/res/anim/ic_signal_workmode_enable_animation_ic_signal_briefcase.xml→apct-tests/perftests/textclassifier/AndroidTest.xml +28 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2015 The Android Open Source Project <!-- Copyright (C) 2018 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. Loading @@ -14,20 +13,16 @@ See the License for the specific language governing permissions and limitations under the License. --> <set xmlns:android="http://schemas.android.com/apk/res/android" > <set android:ordering="sequentially" > <objectAnimator android:duration="200" android:propertyName="alpha" android:valueFrom="0.5" android:valueTo="0.5" android:interpolator="@android:interpolator/fast_out_slow_in" /> <objectAnimator android:duration="350" android:propertyName="alpha" android:valueFrom="0.5" android:valueTo="1" android:interpolator="@android:interpolator/fast_out_slow_in" /> </set> </set> <configuration description="Runs TextClassifierPerfTests metric instrumentation."> <option name="test-suite-tag" value="apct" /> <option name="test-suite-tag" value="apct-metric-instrumentation" /> <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> <option name="cleanup-apks" value="true" /> <option name="test-file-name" value="TextClassifierPerfTests.apk" /> </target_preparer> <test class="com.android.tradefed.testtype.AndroidJUnitTest" > <option name="package" value="com.android.perftests.textclassifier" /> <option name="hidden-api-checks" value="false"/> </test> </configuration>