Fix on the failure of the 3 tests in `com.android.cts.monkey.CategoryTest` class.

**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
3 files changed