1150 Commits

Author SHA1 Message Date
Steve McKay
aa15dae22d Automatically open roots pane if default dir is empty.
Move drawer fiddling out of DirectoryFragment into respective
    FragmentTuner instance.

Bug: 27084308
Change-Id: Ia13fc2be1442e1a7164c2d67ea6ce4bcfda68bcc
2016-02-09 16:25:44 -08:00
Aga Wronska
3b5a29cb5d Merge "Go to root from child directory when root tapped. Bug: 27060001" into nyc-dev 2016-02-09 23:58:42 +00:00
Steve McKay
9146ac608c Don't apply fancy back logic when drawer is not present.
Add test coverage. Booya!

Bug: 27078649
Change-Id: Id2ce53009ee212b3af8d143091859d30e2bc76b1
2016-02-09 14:47:50 -08:00
Ben Kwa
1e2fa5e79f Implement PgUp/PgDn support. (cherry-pick DO NOT MERGE)
- Clean up our LayoutManager code.  We actually only need a single
  layout manager, since a GridLayoutManager is a LinearLayoutManager,
  and list layout is simply grid layout with one column.  Make it so.

- Use the layout manager to compute item offsets for one page's worth of
  items.  Use that to implement page up/page down.

BUG=25195770

Change-Id: I23ddd5fd38532682e7f099b44e188d8c3fec02be
(cherry picked from commit 4d4bf9a21a16bae3497f94dbb558a2ede9d989ee)
2016-02-09 18:06:11 +00:00
Tomasz Mikolajewski
eb33c0a53f Cleanup sliding animation between directories.
The shadow is restored + redundant fade removed.

Bug: 26986946
Change-Id: I31dde7d03f60be470e1c5e06dcdce828d3e4eaa0
(cherry picked from commit 3134ddf99d4215041ed749f3b4e682a1910d208e)
2016-02-09 09:20:53 +00:00
Tomasz Mikolajewski
3d911ea095 Fix animation for the empty cabinet, also make other animations less jarring.
Setting android:animateLayoutChanges=true was causing flickering and problems
with sliding the cabinet while a fragment transition was already in progress.

Bug: 27060052
Bug: 26952361
Change-Id: I17e5f8b57d63cd9a586fc70ae43e030c4f232e8d
(cherry picked from commit ed82fd784301c645cb665517edc3006888d6f237)
2016-02-09 09:16:53 +00:00
Tomasz Mikolajewski
df3abce378 Remove temporary test fixes.
The tests should fail, as the features are broken.

Change-Id: Ib760ba5469164b8ca0d08c57f24273268ae2436f
(cherry picked from commit 94eca73fec7aa1857f5847df355877d523d0c8a6)
2016-02-09 09:14:49 +00:00
Tomasz Mikolajewski
c7b832202a Migrate all tests to ActivityTest.
ActivityInstrumentationTestCase2 takes care of starting and closing
the activity, which prevents flakyness.

Change-Id: I2d3908f6605a67a3c2d11e18a9c4799443828df9
(cherry picked from commit e366886c7d91b62fe1478a057fc4c0a104d12b02)
2016-02-09 01:42:50 +00:00
Aga Wronska
4041680967 Improve document rename experience
- Initially select the name of the file without extension
    - Trigger renaming action when software keyboard Done button pressed
    - Trigger creating new directory when software kayboard Done button pressed

Bug: 26954407
Change-Id: I700d5beacdb98eb0699bbdd4f4bbcafcc1a67e83
(cherry picked from commit 953498df13ff05f189a6de750093e322250a6659)
2016-02-08 23:48:03 +00:00
Aga Wronska
e436f94f0e Go to root from child directory when root tapped.
Bug: 27060001

Change-Id: Iabe1f9f2c986904a4d827e74cf29b3de55e74f90
(cherry picked from commit 5652d175fedc87c796de3cfd354a9de961450690)
2016-02-08 23:38:07 +00:00
Geoff Mendal
5f346b6123 Import translations. DO NOT MERGE
Change-Id: I2fd0cda2b14b49646e59253e874cef28e84a5c2f
Auto-generated-cl: translation import
2016-02-08 22:16:31 +05:30
Jeff Sharkey
ba9a4b397f Use the right ClassLoader when restoring.
If we're restoring after a background process death, the Parcelable
creator cache is cold, and since we're handing in a null ClassLoader
the best the platform can do is try the default ClassLoader which
knows nothing about the running app.

That's why ClassLoaderCreator exists, so use it to snag the relevant
ClassLoader and pass it along.

Bug: 26075620
Change-Id: I6fd977d6178dd0f5f9c465597f5806a08097ac7c
2016-02-05 17:13:21 -07:00
Steve McKay
f873769fba Move create folder and sort to overflow menu, cleanup back behavior.
Improved drawer management in reponse to back button presses:
- if drawer is open (and we didn't just open it), close it.
- if at top of root (and we didn't close root) open it.
- there's a timeout on this behavior such that pressing back
  a second time within a 1.5 second perior will NOT initiate
  the behaviors described above.

Change-Id: I5990848cd3047d9dc985ec10e57ab3a0f99ce79c
2016-02-05 08:46:10 -08:00
Ben Kwa
a65d61a889 Merge "Update apostophes to material spec." 2016-02-05 16:19:13 +00:00
Ben Kwa
fd53fdeed3 Update apostophes to material spec.
TLDR: use \u2019 instead of ' for apostrophes.

See
https://spec.googleplex.com/quantum/style/writing.html#writing-capitalization-punctuation.

Change-Id: Idc3bee55dc65a1ebd5bf12483fced85d36c1614f
2016-02-05 08:02:21 -08:00
Ben Kwa
a4761f0b8b Fix an NPE in RestoreStackTask.
BUG=27007822

Change-Id: I166dc89bfe94f2a07a1fe3769cbce763b7472ec0
2016-02-05 06:44:15 -08:00
Steve McKay
8ac5bfddd2 Merge "Simplify State initialization w/ better semantics + improved Task security." 2016-02-05 04:16:37 +00:00
Tomasz Mikolajewski
8c7007085e Merge "Remove DirectoryContainerView class from DocumentsUI." 2016-02-05 03:22:51 +00:00
Ben Kwa
1c3966a389 Merge "Tweak the query error message per UX." 2016-02-05 03:09:44 +00:00
Ben Kwa
c9b3bde667 Tweak the query error message per UX.
BUG=24949214

Change-Id: I207b55ebfff47cc561a536dc1827431545bf0030
2016-02-04 19:06:56 -08:00
Steve McKay
95cd85ad38 Simplify State initialization w/ better semantics + improved Task security.
Also, reveal the illusion that we're restoring state in Files and Downloads.
Also, define a "PairedTask" class that guards calls to task methods
    with checks against isDestroyed. This also let us make all of the tasks
    static, so we get much narrower scope and tasks can even be moved to
    their own files.

Change-Id: I6a9e8706e1ab1d1f43301e73dd9858a115a6baaf
2016-02-04 18:30:29 -08:00
Ben Kwa
13bbcdda48 Merge "Add vector art for empty and error screens." 2016-02-05 02:16:24 +00:00
Tomasz Mikolajewski
5bfdf2b39a Remove DirectoryContainerView class from DocumentsUI.
Removed and it works as before, I guess it was some workaround for a bug
in the past.

Change-Id: I859c995940ad04ac028aea1727a81358ca7fda1b
2016-02-05 09:50:02 +09:00
Ben Kwa
0e9aae4549 Add vector art for empty and error screens.
BUG=24949214,26143312

Change-Id: I24abe9743763d868ab6d1247aec594abec267c29
2016-02-04 16:35:27 -08:00
Steve McKay
f8d898590b Honor javadocs, call super first in DocumentsProvider.call handling.
Change-Id: Ic7d8d629c4c7df39ce3e2524670169752bab899b
2016-02-04 10:05:52 -08:00
Tomasz Mikolajewski
e21d23515f Merge "Migrate *ActivityUiTest to use ActivityInstrumentationTestCase2." 2016-02-04 06:07:43 +00:00
Tomasz Mikolajewski
24586893ba Migrate *ActivityUiTest to use ActivityInstrumentationTestCase2.
Change-Id: I24f2846c551e0123ad87b3db8a1f5c7dbf628c0c
2016-02-04 15:06:35 +09:00
Tomasz Mikolajewski
30f0fc7f38 Merge "Fix flaky testLoadsHomebyDefault." 2016-02-04 04:38:29 +00:00
Steve McKay
c67aacc76f Merge "Normalize toolbar management." 2016-02-04 04:20:55 +00:00
Tomasz Mikolajewski
1c0b2326b8 Fix flaky testLoadsHomebyDefault.
The test was resuming a previously opened activity, so naturally the
redirect to Home didn't happen.

This CL fixes the issue by closing the activity in TearDown().

Change-Id: I43e78a83c2b53c52745bc7eef515a8f759559e46
2016-02-04 11:50:45 +09:00
Steve McKay
1f264a8a1a Normalize toolbar management.
Since it was almost all redundant (especially the stack stuff).
Ensure "Files" title present on drawer title in Files app.
DocumentsToolBar > DocumentsToolbar to match toolkit naming.

Bug: 26193264
Change-Id: I92c82c66d936aae3ce0f792581daa12898dfadee
2016-02-03 17:59:06 -08:00
Aga Wronska
d8c25f8908 Merge "Stop current root reloading when it is clicked again" 2016-02-03 22:55:14 +00:00
Aga Wronska
45f75e2a81 Stop current root reloading when it is clicked again
Bug: 25079217
Change-Id: I5d32be06d9eda4e5aced965030cce863e8a1965d
2016-02-03 10:09:35 -08:00
Ben Kwa
501fde65b5 Merge "Lint fixes and config tweaks." 2016-02-03 17:12:53 +00:00
Ben Kwa
e3aee18dc9 Lint fixes and config tweaks.
- Add recommended ignore properties to lint.xml.
- Make Fragment subclasses public.
- Truncate log tags at 23 chars.
- Fix one instance of passing a color ID instead of a color.
- Misc xml property fixes.

Change-Id: Ie8d6a8932cda72b7a239f6dfab56bd854f909820
2016-02-03 09:09:40 -08:00
Geoff Mendal
7f12433559 Import translations. DO NOT MERGE
Change-Id: Ifb2402466432bdd2e6ea28882ee595063ae48056
Auto-generated-cl: translation import
2016-02-03 05:29:03 -08:00
Tomasz Mikolajewski
e3fe9d79c0 Rename confusing animation naming.
The naming was ANIM_UP, ANIM_DOWN, but the animations were from right and
left. Since right and left are flipped for RTL, this CL renames them
with direction agnostic ANIM_ENTER and ANIM_LEAVE.

Change-Id: I8de1603b1baaef3d4ba8fbd593f5e53143698dff
2016-02-03 17:18:04 +09:00
Tomasz Mikolajewski
04c85c98f2 Merge "Fix directory/root opening animations when launching DocumentsUI." 2016-02-03 08:05:18 +00:00
Tomasz Mikolajewski
42bd98f426 Fix directory/root opening animations when launching DocumentsUI.
We should only show an opening animation, when back button would get us
back.

Change-Id: I9b3f43592a87c1c13944d382b7201b5727fd08ee
2016-02-03 16:41:37 +09:00
Tomasz Mikolajewski
df676dc015 Do not load Download roots multiple times.
Change-Id: I26685db7fc7a4fb98db695ba6e0e351974eadd6c
2016-02-03 15:21:20 +09:00
Tomasz Mikolajewski
ba7753c941 Merge "Open zip files nicely from the Download app with Files app." 2016-02-03 03:20:11 +00:00
Tomasz Mikolajewski
a6120da1e3 Open zip files nicely from the Download app with Files app.
Bug: 26321218
Change-Id: I8a7a7e914d290ea1b6f424ee5fbd38a4b09c362d
2016-02-03 11:56:54 +09:00
Tomasz Mikolajewski
ccda74f5ec Merge "Fix flaky testFilesList_LiveUpdate()." 2016-02-03 02:08:15 +00:00
Tomasz Mikolajewski
12f11c55e6 Merge "Fix tapping on more than one failure notification." 2016-02-03 02:05:23 +00:00
Tomasz Mikolajewski
cd270153ff Fix tapping on more than one failure notification.
Bug: 26809248
Change-Id: I4e52b7e7a9e09d57b8a2231a09c9121b5fd19e51
2016-02-03 11:03:47 +09:00
Aga Wronska
18e191c1a8 Merge "Fix root selection after search" 2016-02-03 01:23:41 +00:00
Steve McKay
d87277d37f Merge "Show view mode button in action bar on Downloads." 2016-02-03 00:48:15 +00:00
Aga Wronska
7592987761 Merge "Add tests for action bar's search icon behavior - Icon hidden when root doesn't support search - Icon visible whan root supports search" 2016-02-02 23:46:12 +00:00
Aga Wronska
8e1c9637ec Fix root selection after search
Bug: 26160443
Change-Id: Ib05719c8219565db7ef88ce41227079537d1fac4
2016-02-02 15:04:52 -08:00
Steve McKay
3ce95951bd Show view mode button in action bar on Downloads.
A grab bag also with:
Report Roots while loading (in DEBUG).
Null check DirectoryFragment before calling methods on it.

Bug:26936660,26143397
Change-Id: Ief2c943eb24fb14349bbd9cc4a5fbd670f57d567
2016-02-02 14:51:04 -08:00