Logging activity starts to TRON, but only if the caller app
doesn't have any foreground activity present.
Example event:
08-03 15:21:30.813 1231 3220 I sysui_multi_action: [757,1513,758,4,805,1533306090812,1514,10147,1515,com.google.android.talk,1516,1018,1517,0,1518,1000,1519,1000,1520,0,1521,10147,1522,com.google.android.talk,1523,1018,1524,0,1525,pendingintent:u0a12:com.google.android.talk/com.google.android.apps.hangouts.phone.ConversationActivity,1526,com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity,1527,1,1528,com.google.android.apps.hangouts.phone.conversationlist,1540,1,1541,com.google.android.apps.hangouts.phone.BabelHomeActivity,1542,3146240,1543,{com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity},1544,com.google.android.talk/com.google.android.apps.hangouts.phone.BabelHomeActivity,1545,com.google.android.talk,1546,1,1547,0,1551,0,1552,0]
(cherry-picked from 201bc0c14e)
Bug: b/111866309
Context: go/activity-starts-logging-tron
Test: 1) enable logging with: adb shell settings put global activity_starts_logging_enabled 1
2) open some activities and observe: adb logcat -b events | grep "sysui_multi_action: \[757,1513"
Test: atest FrameworksServicesTests:ActivityStarterTests
Change-Id: Ie7dee51c574e544d12e83d279afda46b336f2013
* Copyright (C) 2016 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.
INTRODUCTION
The Android platform core tests (APCT) consist of unit tests for core platform
functionality. These differ from CTS in that they are not necessarily testing
public APIs and are not guaranteed to work outside of AOSP builds.
INSTRUCTIONS
To run a test or set of tests, first build the FrameworksCoreTests package:
make FrameworksCoreTests
Next, install the resulting APK and run tests as you would normal JUnit tests:
adb install -r ${ANDROID_PRODUCT_OUT}/data/app/FrameworksCoreTests/FrameworksCoreTests.apk
adb shell am instrument -w \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
To run a tests within a specific package, add the following argument AFTER -w:
-e package android.content.pm
To run a specific test or method within a test:
-e class android.content.pm.PackageParserTest
-e class android.content.pm.PackageParserTest#testComputeMinSdkVersion
To run tests in debug mode:
-e debug true
To uninstall the package:
adb shell pm uninstall -k com.android.frameworks.coretests
For more arguments, see the guide to command=line testing:
https://developer.android.com/studio/test/command-line.html