Commit Graph

25 Commits

Author SHA1 Message Date
Jeff Chang
193d1ded11 Adding singleInstancePerTask type activity in IntentPlayground
Bug: 187124445
Test: build
Change-Id: I684a9327267273efd7a19df0f0897e597c10543d
2021-05-04 11:38:16 +08:00
Yuntao Xu
8ce6b456d6 Merge "Convert IntentPlayground/Android.mk to Android.bp" am: e281d79cff am: c84d747f03 am: bc9b86f776
Original change: https://android-review.googlesource.com/c/platform/development/+/1691912

Change-Id: I5dd79d72b5f412f6c1b62e258520b20706342a0a
2021-04-30 17:49:47 +00:00
Yuntao Xu
414db426ae Convert IntentPlayground/Android.mk to Android.bp
Convert the Make file to a Soong one

Bug: 186778349
Test: compared the two apk files built by Make and Soong
Test: TreeHugger
Change-Id: I92d9b412fb3c0ae85dd1a76497cb6cdb359eaae3
2021-04-29 23:41:40 -07:00
Treehugger Robot
3291dd14f1 Merge "[LSC] Add LOCAL_LICENSE_KINDS to development" am: e748063d28 am: 347249060a am: dafb7fc537
Original change: https://android-review.googlesource.com/c/platform/development/+/1682225

Change-Id: I8f5e6007cd6803d4dcbfd498045366761be718a2
2021-04-21 20:01:08 +00:00
Bob Badour
40a7447daa [LSC] Add LOCAL_LICENSE_KINDS to development
Added SPDX-license-identifier-Apache-2.0 to:
  apps/Development/Android.mk
  apps/DumpViewer/app/src/main/Android.mk
  apps/OBJViewer/Android.bp
  samples/ApiDemos/Android.mk
  samples/ApiDemos/tests/Android.mk
  samples/HeavyWeight/Android.bp
  samples/IntentPlayground/Android.mk
  samples/MultiClientInputMethod/Android.mk
  samples/MultiDisplay/Android.mk
  samples/MySampleRss/Android.bp
  samples/RenderScript/HelloCompute/Android.mk
  samples/RenderScript/Levels/Android.mk
  samples/ShortcutDemo/launcher/Android.mk
  samples/ShortcutDemo/publisher/Android.mk
  samples/ShortcutSample/Android.mk
  testrunner/tests/Android_java.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I535f73ffa885f723b9dca745f199ce3a3fd409ea
2021-04-20 14:03:26 -07:00
Louis Chang
835cd2ba83 Add an exported flag in manifest
With c4e90ac, the android:exported flag has to be explicitly defined
if an intent filter is defined.

Bug: 171447284
Test: install IntentPlayground
Change-Id: I4f86ceeef70e7572707f548f0583011a0f0823ad
2020-10-22 13:01:25 +08:00
Jeff Chang
6275634b9e Fix NPE when run the testing in IntentPlayground
StartActivity with a null intent lead to the NPE when execute
the Intent testing.

This CL make sure the intent is good before run the testing

Bug: 154568140
Test: Manual to run the intent tesing.
Change-Id: I8d8bc8e1347ae5f095e01f4a718f2ab936574fcc
2020-04-21 10:34:53 +00:00
Aurimas Liutikas
a955aae5ab Migrate away from temporary androidx.design_design target.
androidx.design_design was a target created temporarily while
the com.google.android.material_material was being added.
This migrated to the final material design class packages.

Test: make -j IntentPlayground MultiDisplay
Change-Id: I0e9dabb222e19530c3a558cf4fce4d54e81f8e47
2019-01-30 22:40:04 -08:00
Liam Clark
50ddeac96f Fix radio buttons in IntentBuilderView
Intent builderview currently had a hierarchy consiting of:
RadioGroup -> LinearLayout -> RadioButton. However if the RadioButton is
not directly inside the RadioGroup, the RadioGroup has no effect on the
button.

Instead keep a list of all the RadioButtons we have and deselect all
others when a new button gets clicked.

Test: Manual
Change-Id: I65b9e1165ae3abc23b10f7eb8770a60f144aac82
2019-01-17 15:38:11 -08:00
Liam Clark
b6daa9e91a Dead code removal
Code to access the ActivityInstanceInfo api through reflection is no
longer needed, because we have the lifecycle tracking.

There were some resources for the snackbar that used to be shown during
the launching of the preset activities however that has been removed.

Finally there was a bunch of code in TestBase, that was trying to
predict the outcome of intent flags that never did anything.

Test: Build module
Change-Id: I73e0f172b605cff2433c8c386ef9b1672130f349
2019-01-17 15:38:11 -08:00
Liam Clark
ba9b6ca212 IntentPlayground start activities for result
Test: Manual
Change-Id: I3004e6dd76c026e41d2c9a28f4dd59664f99cd09
2019-01-17 15:38:11 -08:00
Liam Clark
5e9e4f94aa Order the radio buttons in the launch fragment
The radio buttons were added to thew view depending on the iteration
order of a hashmap. This the iteration order is not fixed causing the
radio buttons to be in different places all the time.

Test: Manual
Change-Id: Id0ed0fcc97d7f79474f266d5ea3a8a1df1ed15bb
2019-01-17 15:38:11 -08:00
Liam Clark
e9b4b84dae Replace ActivityInstanceInfo api with in app lifecycle event tracking
Since adding a public api for the playground app was problematic,
we now keep track of onResume and onDestroy calls globally inside the
app. This fixes a few bugs in cases where tasks would be hidden from the
ActivityManger#.getAppTasks() method and allows us to listen for changes
allowing us to do without a periodic refresh of the UI.

Test: Manual

Change-Id: Idb834cbdc7aad6442dd962c95b5321e1d75695fe
2019-01-17 15:38:10 -08:00
Liam Clark
fb526d038f Rebind task navigation buttons
Test: Manual
Change-Id: Ia83cd9074152be8f5a1e2f6e00cac30c5109ada6
2019-01-16 13:16:21 -08:00
Liam Clark
64a9fe4304 Move the launch activity button to the toolbar
Test: Manual
Change-Id: I81155492b39d6c72b0976a738a90ed00226bc1e8
2019-01-16 13:12:10 -08:00
Liam Clark
1ca6b6ec7d Put the launch form behind a FAB
This greatly reduces the amount of scrolling needed to switch between
the overview-view and the launch-view. When launching the next activity
the launch view is dismissed and the user return to the overview-view
if they press back.

Test: Manual
Change-Id: I051ba98b29d666cf56753feebfaa87d2e181a3ab
2018-12-03 13:41:53 -08:00
Liam Clark
a2f0b5d456 Move launch default activity prompt to the menu
Instead of asking at startup, the prompt now launches from a menu item.
This also get's rid of the snackbar because it was causing bugs with
rotation.

Furthermore now the android.permission.SYSTEM_ALERT_WINDOW permission is
no longer needed.

Test: Manual
Change-Id: I566e58d4844aecf127b5198c050ff115de7e4919
2018-12-03 13:41:48 -08:00
Liam Clark
a0365534d3 Replace current activity fragment with highlight
Test: Manual
Change-Id: Id85a26f56ea4a721791d481ca9a1ff130f090df7
2018-12-03 11:56:05 -08:00
Liam Clark
f63bc32ae7 Make tree fragment's expandable current view expand by default
This gives the user a clearer overview of the current state of the
application, without having to expand all the tasks.

Padding has been reduced to better utilize available screen space.

The bring to front and remove buttons are currently always hidden.

Test: Manual
Change-Id: Ifcda0ff31fd5adb89a12ff6a024842c0e7a7ab29
2018-12-03 11:48:48 -08:00
Liam Clark
612e3d549a Update IntentFlags to include MATCH_EXTERNAL
MATCH_EXTERNAL was introduced in api level 28, which was after the
initial version of this application.

This caused a bug for suggestions which assumed the enumeration was
total. This also includes a defensive check + log warning for unkown
flags.

Test: Build and Run
Change-Id: I153985b5fd576baf80545b4737648745b421f11e
2018-11-27 14:09:35 -08:00
Liam Clark
53ee6bc2bf Move from support appcompat to androidx appcompat
Test: Manual
Change-Id: Id9af2504b557d3dd6a2d84786316497cff53d9a3
2018-11-27 09:16:50 -08:00
Liam Clark
bd43fbe931 Intent Playground sample application
The app allows a user to explore the behaviour of different
launch modes, task affinities and intent flags.

It displays the current state of all tasks in the application
and their corresponding flags.

It allows the user to launch a set amount of activities on launch.
This bring the user directly into a state where many options for
exploration are available, rather than having to go through a
complicated setup first.

Access the activity field of RecentTaskInfo using reflection and mirror
the ActivityInstanceInfo into our own value object. This breaks
the compile time dependency on the ActivityInstanceInfo api and turns
it into a runtime dependency.

If the api is missing on the device we can still show the task structure
and log an error with the missing activity instance info.

Known bug: The enable suggestion button crashes the application.
Test: Build and Run

Change-Id: Id0274bae159c16aee6dccd805deb53851ffcf21d
2018-11-26 11:37:35 -08:00
KOUSHIK PANUGANTI
09824249c4 Migrated various apps under development/samples/IntentPlayground to androidx
Bug: 76692459
Test: make IntentPlayground
Change-Id: I9bb3f3492e41d48968caa023861d1552cf0278bd
2018-05-24 20:12:03 +00:00
Alan Viverette
a3d037382d Migrate to AAPT2
Bug: 73250914
Test: make checkbuild
Change-Id: I64ad5cb08aeb1e1c5cd2594dc0be1bbb105610f6
2018-02-27 20:30:57 +00:00
Willie Koomson
2bf50179b3 The base files for the project & activities and XML resources
Test: build and run manually
Change-Id: I6eb7f1a444703e99f592ac9106261f9c6bd90127
2017-07-12 12:08:15 -07:00