• Home
  • History
  • Annotate
  • only in /frameworks/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/
History log of /frameworks/opt/setupwizard/library/test/src/com/android/setupwizardlib/test/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7f2a6e95f20408e055bb8b965b9e2bc664eec86b 28-Apr-2016 Maurice Lam <yukl@google.com> [SuwLib] Check instance state type before casting

Bug: 28390168
Change-Id: Ic8cb9c35b29fe05f1edc6c8fa7c0bd7d23cd4fdf
059321ff28f79a2cbe630b4d814a96ff9254643a 01-Apr-2016 Maurice Lam <yukl@google.com> [SuwLib] Fix unit tests

- Use DP for LinkAccessibilityHelperTest so that it is not device
- Remove LinkSpanTest context leak test, because System.GC does not
realiably remove references.

Bug: 27953236
Change-Id: I977c08b3f4c22b074a3bfa968847735ffe5af258
ccdce77ebc3a173c5cbe59abc4ba6dda9567a432 01-Apr-2016 Maurice Lam <yukl@google.com> [SuwLib] Remove recycled icon

Remove recycled icon before setting the state and level, so it will
not unintentionally change some other drawable's state and level.

Bug: 27944413
Change-Id: Id98096638781b207234794e9e2296c0463a51daf
e1798444aa7e8bd6c81c5013c03bccb581d7f591 31-Mar-2016 Maurice Lam <yukl@google.com> Merge "[SuwLib] Upstream LinkSpan and AnnotatedTextView" into ub-setupwizard-belgarath
00358e4d12e6c7ba0f1da1fa9ad57f87da9b3b1a 25-Mar-2016 Maurice Lam <yukl@google.com> [SuwLib] Implement ButtonBarItem

Implement ButtonBarItem which can contain one or more buttons to be
displayed in a horizontal row.

Bug: 27600894
Change-Id: Id3879ee8fc0bd09c04bc8d98a0bbd301d1b410b8
d832154e333a3a45b5faecd518b664ddd297183c 25-Feb-2016 Maurice Lam <yukl@google.com> [SuwLib] Upstream LinkSpan and AnnotatedTextView

Upstream LinkSpan and AnnotatedTextView to easily create
accessibility-friendly rich text TextViews with links.

Bug: 27886391
Change-Id: I20137fb454c4b9d820263c8ce326380c1db2ef20
2def2bf2156581c6bde6d6baa4583ccd97f2f670 25-Mar-2016 Maurice Lam <yukl@google.com> Merge "[SuwLib] Cache GlifPatternDrawable in Bitmap" into ub-setupwizard-belgarath
a2f04916533b900d3661c9e8c9d98b71276fde13 24-Mar-2016 Maurice Lam <yukl@google.com> [SuwLib] Cache GlifPatternDrawable in Bitmap

Avoid rendering the path every time by caching the GlifPatternDrawable
on a Bitmap.

Bug: 27821812
Change-Id: I8eefcf662763ec05d11b53a0a02e3f39764075ae
8d5326358e2f2a48847b65223c21071647c0f7e5 24-Mar-2016 Maurice Lam <yukl@google.com> [SuwLib] Request apply window inset when attached

Bug: 25973134
Change-Id: Icaddf416e386624e9d8d4b06072a650e266ee9d6
99586481628659cd2982a0248bc0d09a6ec4590e 18-Mar-2016 Maurice Lam <yukl@google.com> [SuwLib] Improve wrong theme error message

Improve the error message in SetupWizardLayout and GlifLayout to
mention the correct themes when there is an InflateException.

Bug: 27153117
Change-Id: I0b76713b820fd26fd2c8808819887e360c3e87a3
7bc6f176937ed369b180fa89f6c311d2801f206c 23-Jan-2016 Maurice Lam <yukl@google.com> [SuwLib] Allow requiring scroll in lists

Add ListViewRequireScrollHelper and RecyclerViewRequireScrollHelper
that will require scrolling in those layouts. SetupWizardListLayout
and SetupWizardRecyclerItemsLayout are now wired properly with the
requireScrollToBottom() method to require scrolling.

Change-Id: I1086fe02374bfbbeb1ac3f8c4ca6981f3ced0df9
d6fe3672c84594bf53882eb5ac5c26bbd6b714e7 23-Jan-2016 Maurice Lam <yukl@google.com> [SuwLib] Fix testSetPrimaryColor

Change-Id: I2d0d1f121a5d04f17fa5c61782a08e7203efbd9c
ac40f3676511e1c7c09a948f5cb8481e5ea12d57 21-Jan-2016 Maurice Lam <yukl@google.com> [SetupWizard] Add GlifLayout.setPrimaryColor

Bug: 26458108
Change-Id: Ia7be66fcf1efd60e65a759006f72b3a0589d0401
d6708911f6f2fa7dd060536a118b5efb3c5e174f 22-Dec-2015 Maurice Lam <yukl@google.com> [SuwLib] Add dark GLIF theme (placeholder)

Add placeholder for dark GLIF theme, which is an extension of the
dark system themes with same overlay values as the light variant.
The color values of the overlays will be updated as necessary.

Change-Id: If7aa2e4b849c26300d4d8ab606be7b74cc33620f
(cherry picked from commit 0c0f30d332afd782dd107ef11f7fa76fb2fdd165)
38a3832bf55aeb5dc24904d4d1ddf391dffa7d7b 19-Dec-2015 Maurice Lam <yukl@google.com> [SuwLib] Add preference integration support

Change-Id: I2e756bcea1512886958ec70c80ae6f4616c9ed81
575ec4f0150a3607d0b6902a9b52866c170822f9 14-Dec-2015 Maurice Lam <yukl@google.com> [SuwLib] Allow setting visibility of items

Added setVisible and android:visible to Item so that it will be
hidden if not visible.

Change-Id: If8d2e3ec95c2f1aaffe8991c283f5c474e1f459a
c3eebe9f664af4b77e5948a14bf266b25dc25cc8 14-Nov-2015 Maurice Lam <yukl@google.com> [SuwLib] Implement pattern drawable background

- Implement the pattern background for GLIF using a custom drawable.
The drawable draws the paths manually as specified in the SVG, for
backwards compatibility.
- Use a FrameLayout subclass to draw the custom status bar background
in the case of phone layouts, and set draw the background directly
for tablet / clamshell layouts.

Bug: 25650709
Change-Id: I527bb47efa143ec43c1030b57087fd2414d7045b
5a4d6cdfb63240c41527ba80b7baddba8933d770 04-Dec-2015 Maurice Lam <yukl@google.com> [SuwLib] GLIF layout adjustment for headers

- Store the list item directly in the view holder and update in
onBindViewHolder, so that the click handler is not prone to adapter
position changes.
- Glif[List/Recycler]Layout now returns the wrapped adapter when
getAdapter is called.
- Disable dividers for header views

Change-Id: Ie782a4de06e2296d4996cb8b81b5d7d3fc834ccf
180360409c9e4e9163c670ff48663244b4057eaf 14-Nov-2015 Maurice Lam <yukl@google.com> [SuwLib] Add dividers to GLIF list layouts

Add dividers with inset support to GLIF list and recycler layouts.
Typical usage of this will be by specifying app:suwDividerInset to
either @dimen/suw_items_text_divider_inset or
@dimen/suw_items_icon_divider_inset (the default).

Bug: 25726515
Change-Id: I8f569680d71d1baba093b20f3d48570d53383acb
e15b8a2489610e3a6fe0a5bc2e26625b067631e0 20-Nov-2015 Maurice Lam <yukl@google.com> [SuwLib] Implement GlifListLayout

Bug: 25726515
Change-Id: I192f33635e9919c02adfdb2c9afa1652dd84aab2
fce4cf6161b2a1644ad21034f0afe4087d659ab4 19-Nov-2015 Maurice Lam <yukl@google.com> [SetupWizard] Implement GlifLayout

Bug: 25726515
Change-Id: Ib4ba64e648e52a9859fb6509a9ce41c692a20aa2
35cc29c9f307191962cd7124db14eb7b78c9407e 17-Nov-2015 Maurice Lam <yukl@google.com> [SuwLib] Add GLIF theme

Add a GLIF theme declaration to setup wizard library, which is just
a direct copy of SuwThemeMaterial.Light for now, and will be updated
as more of the new visual design is implemented.

Bug: 25726515
Change-Id: I3f55662192c05012b9a93d77f7b1303f4a792fe5
647dc702649512dc47f88eaf5e9058f8452537c7 14-Nov-2015 Maurice Lam <yukl@google.com> Revert "[SuwLib] Remove material_blue theme values"

This reverts commit 7df47886e1d74fb2a5a25b129133f4dd9f1986bc.

Change-Id: Id21b1b89476612efd6cae04eb67b22a6dfbfe964
7df47886e1d74fb2a5a25b129133f4dd9f1986bc 13-Nov-2015 Maurice Lam <yukl@google.com> [SuwLib] Remove material_blue theme values

The values are part of a plan that hasn't panned out, so cleaning up
the constants to avoid confusion.

Change-Id: I1501ffb59a0dad9145d8c20d16999bceda15dcfd
c3a4e07feacd7e9cff6d0fc6ddbe86c90d6f7087 12-Nov-2015 Maurice Lam <yukl@google.com> [SuwLib] Add isLightTheme for strings

Add isLightTheme method to be able to directly tell whether a string
represents a light or dark theme.

Change-Id: Ib49cdcbb9047e235189a451b42f20b5cba5eb42a
fd95620a24f1938a24036e8fb4150710e8a2ae90 30-Oct-2015 Maurice Lam <yukl@google.com> [SuwLib] Un-plural test names

Rename -Tests to -Test for consistency.

Change-Id: Ie903ef8e7cc35367968599be9ba55bc3f3b80eb2
960c0ea0b1d36904beef0f01715dd43a211e88ca 09-Oct-2015 Maurice Lam <yukl@google.com> [SuwLib] Add nested items support

Add nested items support to items framework, which allows ItemGroups
to be placed inside another ItemGroup. Handling of children elements
are at discretion of the parent, but for the case of ItemGroup it
will provide a flattened view of the items.

Change-Id: I17bfd8ee276bf47d388873e68e67324c755425b3
48dd827be07471f59aae71eb026253cc1ab7ef97 12-Oct-2015 Maurice Lam <yukl@google.com> [SuwLib] Support icons in items framework

Change-Id: Idd6ce39a9d4be2914ae3f8747c86b173d578f468
b922482e73fc63840d86b78898d0165ffcad1c72 09-Oct-2015 Maurice Lam <yukl@google.com> [SuwLib] Make Items editable

Add setters to the properties of items to make them editable.

Change-Id: I04ab8a0fd31f52e60a699198fe1422bed5163e61
c5bf1cb9cb52f95f862eedb8d4f2c71c1ff1a79f 09-Oct-2015 Maurice Lam <yukl@google.com> [SuwLib] Single-line item

Hide the summary TextView if summary is not set, so that the title
will be centered vertically.

Change-Id: Idbc5f35f7ce48a7338eb0b7061ef5d02b74b7b65
5bf291fde3dfd64f264d525534730514a279c8fc 06-Oct-2015 Maurice Lam <yukl@google.com> [SuwLib] Implement Items framework

Items framework is a framework modeled after preferences, which uses
XML to inflate a collection of items. Instead of using activity or
fragment directly like preferences, a ListAdapter is created and you
can use that with any existing ListViews.

SetupWizardItemsLayout is a convenient wrapper around
SetupWizardListLayout which will automatically inflates
android:entries in its attributes to populate the list.

Note: A recycler view adapter is under consideration

Change-Id: I5eb8853c160cf86fa5b6f21a01dfa4b0030643f6
99231ff98b97a82811f889636ad6dae6d371275b 10-Jun-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add showSystemBars method

Added showSystemBars method that will undo the visbility flags added
by hideSystemBars.

Change-Id: Iaaa2f2e96089ebf3696f747f51d9174dc0d2bb09
91051468dbc273da8d7e7608640e833a71d011e2 07-Aug-2015 Maurice Lam <yukl@google.com> [SuwLib] Tint navigation button icons

- Remove the dark variant of button icons, since it is now tinted
to the desired color
- Use DrawableCompat.setTintList to tint the drawables to the same
color used as text
- Use textColorPrimary as the navigation text color, since the spec
now matches the default textColorPrimary implementation of material
theme (This changes the disabled color from 20% alpha to 26% alpha)
- Configured the build to take two different implementations of
NavigationBarButton. The platform build is the same as Button,
since drawable tinting is natively supported. The comapt build
uses DrawableCompat in the support library to tint any compound
- Removed all xxxhdpi assets since that was introduced in L, but
vector assets are used in L instead.
- For the vector drawables, use tint instead of fillColor so that the
state in the ColorStateList will be taken into account.

Bug: 22129308
Change-Id: Id0c7b40ad3e71c2c66a0e89df4522865a61e923e
bdfc0132ff90a333de202adfbf204cdc8139e632 13-Aug-2015 Maurice Lam <yukl@google.com> [SuwLib] Refactor out TemplateLayout

Refactor TemplateLayout as a base class for SetupWizardLayout, which
is a generic layout that takes the "android:layout", inflates that as
a template and put its children in the "container".

Change-Id: Id7977787ffa6cdb5df7a4cb8172ce1fa6a52ed45
899caf2cf473e512567832d283e9750679f0bf4d 08-Aug-2015 Maurice Lam <yukl@google.com> [SuwLib] Fix unit tests

hideSystemBars is no-op in versions < lollipop.

Change-Id: I2eaab0f044c4fe69511d09e6f0622c6c20979fe6
803f8b1dc47a4adebfab7434b6d8e410f80de14f 01-Aug-2015 Maurice Lam <yukl@google.com> [SuwLib] Avoid infinite loop in SystemBarHelper

Set the maximum number of retries allowed by SystemBarHelper to
peek for the decor view to 3.

Bug: 22846994
Change-Id: Ia69cb28deb8c182a7f31890d20cc687218b93200
2d77e072fed129b34e473c7f77246a2b064fab7d 29-May-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add support for require scrolling

Add SetupWizardLayout.requireScrollToBottom method that will register
a RequireScrollHelper on the layout. When the helper is registered
and the content view can scroll, the next button will be hidden and a
down-arrow button is shown, which will scroll the page down when

Change-Id: Ib9ddcbeec24169cc00265fe107deb1b5099cba8d
b5c78954c32ef124b5df7ab539d6579cb4506f50 21-May-2015 Maurice Lam <yukl@google.com> Merge "[SetupWizardLib] Fix illustration test" into ub-setupwizard-alatar
39619ac964ffe6b8737f2a128122bd3f84e75998 21-May-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Fix illustration test

Fix illustration test by fixing the context's density to 3 px per dp.

Change-Id: I7ea296f5750d828f8254caa05011f4786c143d06
578dd1c111c2461620777b315eab3a95bee9ecd1 21-May-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add tests for BottomScrollView

Test that BottomScrollView callbacks are called correctly.

Change-Id: Ia2e9e4149057b06794cdf85ba07c44efc0aec579
1e8fd1229a592e094929aa279482c7415954eedc 27-Apr-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Test aspect ratio for illustration

Add tests for Illustration's aspect ratio attribute

Change-Id: Ibd9d212cee2bb81cc32de635bfecafc34f76bd68
56a19113d248d9ffdb462a0af6ba8a967635be66 08-Apr-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add isLightTheme method

Add WizardManagerHelper.isLightTheme method to tell whether an
activity should use light theme or not.

Bug: 20110002
Change-Id: I41fc142489c9f1c1b9b91cd825f54447b856f58b
0d6c44afe2731446e2b96c17ae0fd52e62ea1e54 07-Apr-2015 Maurice Lam <yukl@google.com> Merge "[SetupWizardLib] Adjust immersive flags for dialogs" into ub-setupwizard-alatar
64158e33c3ad618ed0eecef71fd20dd8e3c02568 07-Apr-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Fix Partner class and tests

Partner.java had a bug preventing it from fetching the default value
from the original package if the resource is not found in the
overlay. There is a corresponding issue in the test, which is using
its own resources for testing. Since the test package builds against
the source of the library, all resources in the library is also
available in the test package, and therefore the behavior of resource
not found in overlay package could not be tested. This CL fixes that
by using a MockResources object instead.

In addition, the attribute isOverlay was added to ResourceEntry so
clients can tell if the ResourceEntry came from the overlay or from
the fallback.

Change-Id: Ib0490277db502ea563171d79ab8491934dc43d01
6be36beb1bdcd9211c504bbb1647d1f610ba2185 04-Apr-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Adjust immersive flags for dialogs

Remove the LAYOUT_ immersive flags and apply only HIDE_NAVIGATION and
IMMERSIVE_STICKY. This is because LAYOUT_ flags causes dialogs to not
resize for keyboard, and dialogs don't have to draw under the status
or navigation bars anyway.

Bug: 20091077
Change-Id: I96dc650a1d31046b30c6337b32c1bb91ee4548d2
d61674efcfaa9f591a44fc75d59566cdd5b409eb 03-Apr-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add progress bar support

Added methods showProgressBar, hideProgressBar and isProgressBarShown
to SetupWizardLayout, that will show the bar if the corresponding
ViewStub exists.

This implementation has an improvement over existing Setup Wizard
implementations in that it supports ListViews as well as ScrollViews,
and the progress bar will be sticky together with the header instead
of being scrolled away.

Change-Id: Ifd7acae36a9b244d759b6528bb5dfdc3e1d15091
bc60ae4e0ee0116facc9bdc21d6da8a470303ce3 27-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add isSetupWizard

Add WizardManagerHelper.isSetupWizard for clients to tell whether an
intent came from Setup Wizard. Also added WizardManagerHelperTest.

Bug: 19964066
Change-Id: I71166571814be356c1bf34f37692795f99f4b592
9f9367672191190f903955d09a4314d40869acc6 27-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Eclair compat build

Bug: 19929602
Change-Id: I0e3ed9024461ec50efe2258031c1d2648f0d333f
e96ec75d23e82b352ab1393dbac8d6372ceb62d7 26-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Fix back button bug

Fix bug in SystemBarHelper.setBackButtonVisible and added unit tests
to the class.

Bug: 19936103
Change-Id: I252e0069ee7b21d25422859a51f51dcbe4c6a7d5
7e5f0f0ea3b3075258cac9d26f90fd97c1a71dca 23-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Add getNavigationBar

Add getNavigationBar method to SetupWizardLayout

Change-Id: I49eeb5cfee2917d5b4e3f552f9c3b68747dcd79a
16a7a7a87ca9db68b1889b37ef46d65055195e7d 13-Mar-2015 Maurice Lam <yukl@google.com> Merge "[SetupWizardLib] Implement Partner" into ub-setupwizard-alatar
d617ee5e12914b052682ee6f1bdf3ece28392f54 11-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Implement Partner

Implement Partner.java which helps to get resolve resources from an
overlay package provided by Partners.

Bug: 19680333
Change-Id: I11d3826398741fb48fb6cf40b1d66b18c42ea085
24ab59ef4f9726316743d94d31c93bf9420e7717 12-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Fix tests for tablets

The layout requires SuwThemeMaterial to be the theme, and the tablet
layout will crash without the theme. In the tests, we don't create
activities so use a ContextThemeWrapper to apply the themes.

Change-Id: I70d9252ed3c44a341dc10076d15aafc7c75c7209
66cb0ccabafc74069539fead8d10330635f31ff2 11-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Test ListLayout

Tests for SetupWizardListLayout

Change-Id: I210e7b989503a7fd247ebc916f46763d1be8ae87
170a720fe110de6cc1a8c1cd660e591295562cfa 10-Mar-2015 Maurice Lam <yukl@google.com> [SetupWizardLib] Tests

Set up the structure for tests in setup wizard library.
To run the tests, cd to the root of the tree and run
./gradlew connectedAndroidTest

Currently the tests fail for version lower than SDK 21, even for
IcsCompat because the resources aren't available yet.

Change-Id: I62106f531d99d7861be9474af8100fbc63ea8684