It's not necessary to report crash to system for monkey process,
which even causes system deadlock. So we override it.
Bug: 279527651
Test: Manual
Change-Id: I2672a372dfe445a4f2400db01ec837ec6b528303
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:
BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower
See https://errorprone.info/bugpatterns for more
information on the checks.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: Ic7e78cc74523ee09c1b4aa9969756f0cfd609e08
**This is a duplicate of ag/17623755, which is on the master branch, and this one is for tm-dev branch.**
**Reason of Failure**
This failure is caused by the missing of assigning appropriate categories to different activities in 'development/cmds/monkey/src/com/android/commands/monkey/MonkeyActivityEvent.java' file, which is reflected in the update.
The `BaboonActivity` is invoked by the Monkey test program, and therefore should be categorized as `android.intent.category.MONKEY`, which is reflected in 'cts/hostsidetests/monkey/test-apps/CtsMonkeyApp/AndroidManifest.xml' file.
However, in the `MonkeyActivityEvent` class (in 'development/cmds/monkey/src/com/android/commands/monkey/MonkeyActivityEvent.java' file), all the `Intent` (equivalent to an event) created by the Monkey test program is still categorized as `android.intent.category.LAUNCHER`. This wrong categorization will raise an error with a message in the log stating that the access to `BaboonActivity` is blocked, and some more messages after will show that the `BaboonActivity` is not actually executed.
The categorizations are defined in 'frameworks/base/core/java/android/content/Intent.java' file.
**Debugging Notes**
1. In `getMainApps()` of 'Monkey.java', the activities (including `BaboonActivity`) are added by their categories. There can be activities under different categories. However, in 'MonkeyActivityEvent.java', all the activities are started under `LAUNCHER` category, despite their original category, which is the point causing the failure.
2. This failure is detected by the intent filter in ag/15419750 and ag/15315839 (using CL Range search between builds 7618377 and 7618385), for more info about intent filter: go for <go/intents-match-intent-filters-guide>.
Fix: 196047981
Test: Use `atest CtsMonkeyTestCases` command, all 10 tests should pass.
Change-Id: Iea4bf2cac5924a193902dd337275d753e0577fa1
Push specific licenses down the tree toward the leaf directories.
Remove extra Apache 2.0 license texts--just use Android-Apache-2.0
Test: m nothing
Change-Id: Ibee25f75f5933699d6f43acdc192b2ada6823757
* cc_prebuilt_binary triggers strip and fails
* Currently it's only printing to stdout but
it may later on be a build failure
Change-Id: I6a6751a7c9abad8ef76b531f9c0dc38cb0c12689
Convert the Make file to a Soong one
Bug: 186677673
Test: compared the results built by Make and Soong
Test: TreeHugger
Change-Id: Ib850e78443e11ef4834e6567cd447e88627512d3
Because monkey doesn't have an Application, so nor Context instance.
Meanwhile adapt to framework changes that:
1. checkPermission() removed from IPermissionManager but still exists
on IPackageManager.
2. getPermissionFlags() passes package name first and permission name
later.
This reverts commit 36247dc2fb.
This reverts commit 46c62820cc.
Fixes: 177082201
Test: atest CtsMonkeyTestCases
Change-Id: I498bcd87f765e5804783dd7d753f3fe6a045c7c6
Permission is being moved into mainline and IPermissionManager can't
be an API.
Bug: 158736025
Test: presubmit
Change-Id: I08a8705d7d9be5b9ca56272e96d0a97497099143
Revert "Test featureId is correctly used in startActivity"
Revert submission 10111030-activityStarter_featureId
Reason for revert: presubmit test breakage
Reverted Changes:
Ic7056b492: Activity start: Send featureId from context->AppOp...
I8e2a07da7: Adjust monkey to changed internal APIs
I7a6af6fb1: Test featureId is correctly used in startActivity
Change-Id: I430258d9b50b3d760e408e94f9abd8b6745dd92a
The public platform version no longer can be a codename, it is
always the most recently released platform. A new build property
and API provides either the offical version or the current codename
as appropriate. This will avoid breaking apps that look at the
platform version while development is under a codename.
Bug: 143175463
Change-Id: I7570a01b322db0be86388d70b48991cf5beb4fea
Test: manual
Exempt-From-Owner-Approval: Previously approved, no new changes
Reason for revert: This causes a boot issue on Taimen (b/144480969). It wasn't caught by TreeHugger due to Taimen tests being disabled due to a different lab outage (b/144350336).
Change-Id: I97f1ba219f23b509c62c22f4a2786e4fb13b530f
The public platform version no longer can be a codename, it is
always the most recently released platform. A new build property
and API provides either the offical version or the current codename
as appropriate. This will avoid breaking apps that look at the
platform version while development is under a codename.
Bug: 143175463
Test: manual
Change-Id: I9cc55fa3d5cee2606ea634d3926d957990694908
* Sleep until file is done writing. Meanwhile appCrashed() should be called.
Bug: 68762010
Test: Run monkey + call "killall -SIGSEGV com.google.android.inputmethod.latin" in adb shell (repeated many times)
Change-Id: I4c8bd5d653fc195878275e291d927f2d87814858
Don't assume a single global trace file. /data/anr might contain
multiple files - always dump the most recent.
Test: Manual
Bug: 32064548
Change-Id: Ib24e7364cac9e3fd105dafb40d6e399d46759770
The runner is using internal constants from accessibility.
I'm moving window IDs to AccessibilityWindowInfo, so this
project needs to change as well.
Bug: 34773134
Test: Just verifying the build.
Change-Id: I64fa4ff63543deadb7aa32b3e93d3dad1d6b9439