39 Commits

Author SHA1 Message Date
Mathieu Chartier
5615adf824 Sleep 1s before force stop and use killBackgroundApp
Leave a bit of time before force stopping the application. This might
help prevent bad numbers.

Call killbackgroundApp after doing force-stop to make sure nothing is
still running.

Bug: 117094510
Bug: 117888316
Test: atest google/perf/app-startup/third-party-apps/cold-dropcache-stable-test
Change-Id: I47792f99b38edf2c40f61cc3f6817d82e6339d12
2018-10-18 22:03:47 +00:00
Calin Juravle
f2528b8539 Fix trial run in AppLaunch test
If the app does not exist log an error but do not fail the test.

Test: atest google/test/performance/app-install-startup -v

(cherry-picked from commit 55db8ff9a6fa383134142f65d0b1d0da9957411d)
Merged-In: Idb6f1d0ba3c5bfb6c7985cd84f5aa4e0599c6b59
Change-Id: Idb6f1d0ba3c5bfb6c7985cd84f5aa4e0599c6b59
2018-09-26 14:17:27 -07:00
gopinath
86900d817f Add 'ss' trace category in app launch test.
Bug: b/78898738

Test: atest google/perf/app-startup/hermetic-apps/cold-dropcache-stable-test -v
Change-Id: Id69edfa6903e077b2434e8474a7034f136aadecb
(cherry picked from commit a6adc072351f1ca5e29bd9ae92dce0419f9a5b56)
2018-05-01 19:19:01 +00:00
gopinath
21799f8b05 Add more trace categories.
Add tracing for additional filters as well.

Bug : b/78244687, b/78301352

Test: atest hot-nodropcache-stable-test
Change-Id: Ie6fd109b645c92dcfa414e3c41cc5f43032fe6fd
2018-04-20 00:59:12 +00:00
gopinath
63bf68d5c3 Add cycle-clean option in AppLaunch
If cycle-clean is enabled then all the apps will be
killed at the end of the cycle and cache will dropped.

Cycle time is also enabled to measure the sum of launch times
during each cycle.

Above two options will enable use to measure app launch time under
memeory pressue by not killing the app between the launches and
by killing all the apps and dropping the cache before each cycle
and measuring the cycle time.

Bug: b/73091210

Tested : Tested with nodropcache, no force stop between launches
and cycle clean option and the cycle time avg,min and max
is printed as expected.

Change-Id: I8fb22439a9fe191104ce024c8a85a2688068cd60
2018-03-16 19:08:09 +00:00
Mathieu Chartier
505511c829 Add sleep for profile saving in AppLaunch
Aim to prevent cases where the profile won't be saved when we compile.

Bug: 70734839
Test: m
Change-Id: Ib6f8740c70729914fc559f249b19adea1e7777f0
2018-03-08 18:30:06 -08:00
Anton Hansson
ab6ec61251 frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 15:13:23 +00:00
gopinath
55ca1f4c47 Add support for hot launch in App launch test.
force-stop-app option is added to control hot launch and
cold launch.

Bug: b/73091210

Test:
am instrument -w -r   -e debug false -e launch_directory /sdcard
-e apps "Calculator^Calculator|Clock^Clock" -e trial_launch true
-e log false -e timeout_msec 300000 -e force-stop-app false
-e launch_order CYCLIC -e simpleperf_cmd "simpleperf stat -a"
-e launch_iterations 10 com.android.tests.applaunch/android.test.InstrumentationTestRunner

Change-Id: I4b0f7a61c46e8091e69cad9fa65b5b34f680252d
2018-02-23 19:42:15 +00:00
gopinath
0799a5f5c5 Fix string format in App launch
Change-Id: I22676ab95d39b8b92118eb48145b0d7614d0f03f
2018-02-20 17:24:33 -08:00
Nicolas Geoffray
aacac60355 Small cleanup in AppLaunch.
closeApp is always force closing app. Just make it so.
Move the go home intent into its own method.

Test: adb shell "am instrument -w -e drop_cache true -e simpleperf_app true -e compiler_filters speed\|speed-profile\|quicken\|verify -e apps Maps^Maps -e launch_directory /data/local/tmp com.android.tests.applaunch/android.test.InstrumentationTestRunner"

Change-Id: I0d7d28a99a1ce9dfcefc4572ec3a0142482b1e48
2018-02-15 22:32:02 +00:00
Nicolas Geoffray
e7a566f2fb Add more ways to run AppLaunch.
1) Pass a list of compiler filters.
2) Pass an option to output cpu cycles and major faults from app.

bug: 73091359

Test: adb shell "am instrument -e drop_cache true -e compiler_filters \"speed-profile|verify|quicken\" -e simpleperf_app true -e apps com.google.android.apps.maps^Maps -e launch_directory /data/local/tmp -w  com.android.tests.applaunch com.android.tests.applaunch/android.test.InstrumentationTestRunner"

Test:
adb shell "am instrument -e drop_cache true -e simpleperf_cmd \"simpleperf stat -a\" -e apps com.google.android.apps.maps^Maps -e launch_directory /data/local/tmp -w  com.android.tests.applaunch com.android.tests.applaunch/android.test.InstrumentationTestRunner"

com.android.tests.applaunch.AppLaunch:INSTRUMENTATION_STATUS: Maps=1488,1850,1973,1972,1929,1947,1968,1771,2006,1912,
INSTRUMENTATION_STATUS_CODE: 0
.
Test results for InstrumentationTestRunner=.
Time: 88.636

OK (1 test)

Change-Id: I61fea8c124107cbd7234f69358078780ab74c4b6
2018-02-15 10:44:17 +00:00
gopinath
dd305468bf Reduce initial app launch timeout.
Change-Id: Ie4b9fb99bcde445fc9868c3ed9e968a9fc7bfdda
2018-02-01 19:52:28 +00:00
gopinath
165082495d atest support for app startup test
Bug :  b/65842123

Test: App launch test config able to build and install this test
apk in the atest.

Change-Id: I040e299b1e1fdafbcc716f2b0b8b32e7b842de20
2017-12-18 16:10:28 -08:00
Paul Duffin
2710ca1e9d Flatten dependency hierarchy of legacy-android-test
Previous changes statically included legacy-android-test in preparation
for removing android.test.* and junit.* classes from the android.jar.
Unfortunately, that lead to duplicate classes between APKs and the
bootclasspath which caused build problems (Proguard) and also runtime
problems (when targeting and running on older releases).

Switching from statically including the classes to using the runtime
libraries cannot be done in one step because legacy-android-test is
statically included in libraries which are used in many APKs and so
removing it from those libraries requires that all APKs be updated at
once. Doing that atomically across dozens of projects is not practical.

This change modifies APKS that statically include the
legacy-android-test library indirectly.

* If the APK manifest uses the android.test.runner library then the APK
  is modified to stop statically including legacy-android-test and
  instead build against android.test.base/mock/runner libraries instead.

* Otherwise, the APK statically includes legacy-android-test.

Also, any libraries that statically include are modified to stop
statically including it and if it has source dependencies on the classes
is changed to build against the android.test.base/mock/runner libraries.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* cmds/uiautomator/instrumentation/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because uiautomator-instrumentation is not a package so does not
    need to statically include the classes

* cmds/uiautomator/library/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    uiautomator.core has a source dependency on its classes

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because uiautomator.core is not a package so does not need to
    statically include the classes

* core/tests/BroadcastRadioTests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    BroadcastRadioTests's source depends on its classes and because of
    these changes they are no longer present on the compilation path.
    The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    BroadcastRadioTests specifies in its manifest.

* core/tests/coretests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because FrameworksCoreTests's source depends
    on their classes and because of these changes they are no longer
    present on the compilation path. The classes do not need to be
    statically included because the classes will be provided by the
    runtime, either from the default bootclasspath or from the
    android.test.runner library that FrameworksCoreTests specifies in
    its manifest.

* core/tests/featureflagtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksCoreFeatureFlagTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that FrameworksCoreFeatureFlagTests specifies in its manifest.

* core/tests/systemproperties/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksCoreSystemPropertiesTests's source depends on its classes
    and because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that FrameworksCoreSystemPropertiesTests specifies in its manifest.

* core/tests/utillib/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because frameworks-core-util-lib is not a package so does not need
    to statically include the classes

    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    frameworks-core-util-lib has a source dependency on its classes

* core/tests/utiltests/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because FrameworksUtilTests's source depends
    on their classes and because of these changes they are no longer
    present on the compilation path. The classes do not need to be
    statically included because the classes will be provided by the
    runtime, either from the default bootclasspath or from the
    android.test.runner library that FrameworksUtilTests specifies in
    its manifest.

* location/tests/locationtests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksLocationTests's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    FrameworksLocationTests specifies in its manifest.

* lowpan/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksLowpanApiTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that FrameworksLowpanApiTests specifies in its manifest.

* packages/Osu2/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    OsuTests's source depends on its classes and because of these
    changes they are no longer present on the compilation path. The
    classes do not need to be statically included because the classes
    will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that OsuTests
    specifies in its manifest.

* packages/SettingsProvider/test/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' in
    LOCAL_JAVA_LIBRARIES because SettingsProviderTest's source depends
    on its classes. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that SettingsProviderTest specifies in its manifest.

* services/tests/notification/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksNotificationTests's source depends on its classes and
    because of these changes they are no longer present on the
    compilation path. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that FrameworksNotificationTests specifies in its manifest.

* services/tests/servicestests/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' and
    'android.test.runner' in LOCAL_JAVA_LIBRARIES because
    FrameworksServicesTests's source depends on their classes. The
    classes do not need to be statically included because the classes
    will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    FrameworksServicesTests specifies in its manifest.

* services/tests/shortcutmanagerutils/Android.mk
    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    ShortcutManagerTestUtils has a source dependency on its classes

* tests/AppLaunch/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' and
    'android.test.runner' in LOCAL_JAVA_LIBRARIES because AppLaunch's
    source depends on their classes. The classes do not need to be
    statically included because the classes will be provided by the
    runtime, either from the default bootclasspath or from the
    android.test.runner library that AppLaunch specifies in its
    manifest.

* tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' in
    LOCAL_JAVA_LIBRARIES because SmartCamera-tests's source depends on
    its classes. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that SmartCamera-tests specifies in its manifest.

* tests/ServiceCrashTest/Android.mk
    Replaced 'legacy-android-test' with 'android.test.base' in
    LOCAL_JAVA_LIBRARIES because ServiceCrashTest's source depends on
    its classes. The classes do not need to be statically included
    because the classes will be provided by the runtime, either from
    the default bootclasspath or from the android.test.runner library
    that ServiceCrashTest specifies in its manifest.

* tests/net/Android.mk
    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because FrameworksNetTests's source depends on
    their classes and because of these changes they are no longer
    present on the compilation path. The classes do not need to be
    statically included because the classes will be provided by the
    runtime, either from the default bootclasspath or from the
    android.test.runner library that FrameworksNetTests specifies in
    its manifest.

* tests/testables/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because testables is not a package so does not need to statically
    include the classes

    Added 'android.test.mock' to LOCAL_JAVA_LIBRARIES because testables
    has a source dependency on its classes

* tests/utils/testutils/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because frameworks-base-testutils is not a package so does not need
    to statically include the classes

    Added 'android.test.base' and 'android.test.mock' to
    LOCAL_JAVA_LIBRARIES because frameworks-base-testutils has a source
    dependency on their classes

* wifi/tests/Android.mk
    Added 'android.test.base' to LOCAL_JAVA_LIBRARIES because
    FrameworksWifiApiTests's source depends on its classes and because
    of these changes they are no longer present on the compilation
    path. The classes do not need to be statically included because the
    classes will be provided by the runtime, either from the default
    bootclasspath or from the android.test.runner library that
    FrameworksWifiApiTests specifies in its manifest.

Bug: 30188076
Test: make checkbuild
Change-Id: Ia6a48234f28e7e1789049cf4b37cd7fe0bc8251c
2017-12-07 07:38:59 +00:00
gopinath
3f04fb1bcf Avoid spaces in the trace file names.
Having spaces in the trace file names introduces slashes in the
file names and not able to pull the file names with the slashes
from the device.So avoid having spaces while constructing the
trace file names.

Bug : b/65737738

Change-Id: Ie1971566586f77d18b17722ce0e3cc9ef3ebfdd3
2017-09-15 18:09:02 -07:00
Paul Duffin
37e9a28262 Fix dependencies of packages that target earlier releases
A previous change added legacy-android-test as a static dependency to
all packages that build against the current, test_current or
system_current and failed to compile when the junit and android.test
classes were removed from the API. Unfortunately, those changes did not
take into account that some of those packages target earlier API
versions and so will always have the classes available at runtime.

This change replaces those static dependencies with dynamic dependencies
for any package that targets an earlier API version. The file changes
were made automatically by a tool that constructed and then analyzed a
full dependency graph of all the Android Java modules. The individual
changes were checked manually to ensure that the changes matched the
intent. The affected modules were built against an API with the junit
and android.test classes removed. Any issues found during this process
resulted in either the tool being updated to address the issue or a
separate change being made to fix an existing problem with the build. A
sample of the affected packages were run to ensure that they worked as
expected at runtime; no issues were found during testing.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* packages/SettingsProvider/test/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because SettingsProviderTest's manifest file (AndroidManifest.xml)
    targets API level 21 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

    Added 'legacy-android-test' to LOCAL_JAVA_LIBRARIES because module
    SettingsProviderTest uses classes from package android.test
    (possible indirectly) and needs them available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

* services/tests/servicestests/Android.mk
    Replaced 'android.test.runner' with 'android.test.mock' and
    'legacy-android-test' in LOCAL_JAVA_LIBRARIES because module
    FrameworksServicesTests uses classes from packages android.test and
    android.test.mock (possible indirectly) and needs them available at
    compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    They were not added to LOCAL_STATIC_JAVA_LIBRARIES because
    FrameworksServicesTests's manifest file (AndroidManifest.xml)
    targets API level 26 and uses the android.test.runner library which
    will provide the classes dynamically at runtime.

    Dependency 'android.test.mock.sdk' is used instead of
    'android.test.mock' because module FrameworksServicesTests builds
    against internal jars not the API and so should use libraries that
    build against internal jars not the API.

* tests/AppLaunch/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module AppLaunch uses classes from
    package android.test (possible indirectly) and needs them available
    at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because AppLaunch's manifest file (AndroidManifest.xml) targets API
    level 24 and dynamically includes the android.test.runner library
    at runtime so there is no point in statically including the
    classes.

* tests/Camera2Tests/SmartCamera/SimpleCamera/tests/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module SmartCamera-tests uses classes
    from package android.test (possible indirectly) and needs them
    available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because SmartCamera-tests's manifest file (AndroidManifest.xml)
    targets API level 17 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

* tests/Compatibility/Android.mk
    Replaced 'android.test.runner' with 'legacy-android-test' in
    LOCAL_JAVA_LIBRARIES because module AppCompatibilityTest uses
    classes from package android.test (possible indirectly) and needs
    them available at compile time.

    Dependency 'legacy-android-test' is used instead of
    'android.test.runner' because the latter will conflict with
    dependencies on junit.

    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because AppCompatibilityTest's manifest file (AndroidManifest.xml)
    targets API level 21 and dynamically includes the
    android.test.runner library at runtime so there is no point in
    statically including the classes.

Bug: 30188076
Test: make checkbuild and ran a sample of tests
Change-Id: I3d183a96bf87437028a2d4b774d311e40349f4d0
2017-06-15 09:10:13 +01:00
gopinath
9326f2227c Use TotalTime instead of ThisTime in app launch test
Bug: 62272543

Test: Tested with calculator and facebook messenger launch

Change-Id: Ide4e844e54428edcb7e3356cb3d0492392f6bde3
(cherry picked from commit fb9272c637f4b657d40057145e4dbce989005e67)
2017-06-14 04:33:21 +00:00
gopinath
0a2c9396a2 App launch test apk change
Support launching the app using the package name.
Remove the unused variables.

b/33226470

Change-Id: I5b3829912782a9fc0c8f09cbd6fa9ee4b5b35314
(cherry picked from commit a00259f47dc480f799a812a00f52e3c887aae4b0)
2017-06-14 00:06:01 +00:00
gopinath
d3c50019b1 Add Simulate maitanance mode in app startup test cases.
Note : Dismissing initial dialogs on the apps (maps, youtube
and camera) craetes the profile.

Bug : b/28941042

Change-Id: Ifbc2853059ca59026d0a833e6dc7e7f96bda9117
2017-02-13 15:19:48 -08:00
Paul Duffin
8aeb59ebcd Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: I13e88297731253420e4e5f5291d503f13a39a156
2017-01-18 16:39:34 +00:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
Sudheer Shanka
fc46e9b643 Move IActivityManager to aidl.
Bug: 30977067
Test: Existing tests are passing, dump commands still working.
Change-Id: I9cf81c4d381ebce14a6c701e409cbb269f2ff1fb
2016-11-04 10:43:25 -07:00
Yuanlang Song
eaf08cf7d0 Work around to get ride of NPE in app startup test
bug: 30374599
Change-Id: I9050ba6ac6283734c345e4e7f9f56f34e1477c7a
2016-08-01 12:11:57 -07:00
Gopinath
164cca0b34 App launch - Test app changes
1) Drop cache between app launches Bug 29564205
2) Trace capture while launching app Bug 26779882
3) Simple Perf while launching app Bug 29249860
4) Launch order which could be cyclic or sequential

Change-Id: I0c883e7feb7e07474b045835fd56a97d8a126552
2016-07-07 17:42:08 -07:00
Guang Zhu
8f4fd67e7c allow optionally skipping of initial launch
Current harness performs one round of app launch as a "warm up", and
does not include that into final app launch time calculation. This
change skips this process so that it can speed up local test run
investigation.

Change-Id: I0b1948b2247d9f7e442e799d537508fba6dfa508
2016-05-05 19:45:22 -07:00
Gopinath Elanchezhian
48a4275bf6 Merge "Increase post launch idle timeout to 60 secs" into nyc-dev 2016-04-01 18:37:23 +00:00
Gopinath
5aa567a869 Increase post launch idle timeout to 60 secs
Bug 27944664

Change-Id: Ibc57923f1b49414b27b0738e005c278749c3f17a
2016-04-01 10:24:10 -07:00
Hyungtae Tim Kim
6fc955071a Add TV apps to AppLaunch test
TV apps declare a launcher activity using a
CATEGORY_LEANBACK_LAUNCHER intent filter.

Bug: 27444470
Change-Id: I0d3e412dc0abf65f6eeed4e5d2c0784d08773620
2016-03-08 14:00:44 +09:00
Joshua Schwarz
349537b737 Add Google Now intent so that it is discoverable to AppLaunch metrics.
Change-Id: I65ddce1499c3fa2ca54b815709270610a273e571
2016-02-24 22:26:38 -08:00
Jeff Hao
1b012d302b Add sample profiling option to am.
Also bundles all profiling options into a class.

Bug: 17040932
Change-Id: I85d675ee1494bdc7308caffdf94145d27c996e9d
2014-08-26 15:54:25 -07:00
Guang Zhu
e2a03fe43d freeze screen rotation during memory and app launch test
Change-Id: I2a039be383562019a0af9470c5053cd3cb1e6142
2014-08-08 11:30:21 -07:00
Guang Zhu
2861a89bed use min app launch time in AppLaunch perf test
Change-Id: Id3a5872ff29fba5daeff058f0842fd011e50a0a1
2014-02-19 18:59:00 -08:00
Guang Zhu
6266a436f3 add account checks to app launch test
This optional parameter ensures that, before test starts, device
has the listed account types configured already.

e.g. to test app launch time of Gmail, a valid Google account
must present on device

Change-Id: Idba11beff754fd1d201a9c44a562809d4a9495e2
2013-03-22 11:36:30 -07:00
Guang Zhu
32abd66ebd change how app launch is tested
new approach:
  * for each app
    * initial launch
    * sleep 7.5s
    * do 10 iterations: launch app with force stop + sleep in between
    * report average of 10 launches

Change-Id: I9e68975325aa83af35620d727823f5c072aac488
2013-03-13 23:24:31 -07:00
Dianne Hackborn
f265ea9d83 App ops: vibration, neighboring cells, dialing, etc.
Improve handling of vibration op, so that apps are
better blamed (there is now a hidden vibrator API that
supplies the app to blame, and the system now uses this
when vibrating on behalf of an app).

Add operation for retrieving neighboring cell information.

Add a new op for calling a phone number.  This required
plumbing information about the launching package name through
the activity manager, which required changing the internal
startActivity class, which required hitting a ton of code that
uses those internal APIs.

Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
2013-02-01 15:14:29 -08:00
Svetoslav
3a34d17412 Fixing the build
Change-Id: Ief7654775307c829a60e65217ae821aa6801303c
2013-01-28 19:55:35 -08:00
Guang Zhu
13f7734977 more app launch test tweaks
to get closer to the previous harness:
* sleep 750ms after launch then press HOME
* force close app after launch
* sleep 2s then move to next app

Change-Id: I70fefa7f3e87c637ed8b4cb2981c26d665c94319
2012-12-04 14:40:30 -08:00
Guang Zhu
c28a062ffd app launch test fixes and improvements
* fixed NPE when specified app name does not exist
* force stop package before starting, because some names may
  resolve into the same package
* ensure app is launched in the order as sepcified in command
  line
* fixed time recording: it should have been 'thisTime' as
  reported by ActivityManager, to be consistent with previous
  harness

Change-Id: I411a568580feef21821dcbe6ec15884f697af6fd
2012-12-01 23:40:10 -08:00
Maxim Siniavine
f58e5b6cdc Added app launch test.
The test will start each app and report the time it takes for
the app to start in milliseconds.

Change-Id: I974ac36f70f0d982aa01e46824fe138eb641d680
2012-11-20 18:01:55 -08:00