Commit Graph

10187 Commits

Author SHA1 Message Date
Sunny Goyal ffa1237698 Merge "Using SharedPrefenrece.apply instead of commit to prevent disk IO on main thread" into ub-launcher3-burnaby-polish 2015-12-18 22:38:52 +00:00
Sunny Goyal 60acb943c6 Merge "Preventing launcher crashes due to low disk space." into ub-launcher3-burnaby-polish 2015-12-18 22:29:47 +00:00
Tony Wickham ca656e3c69 Fix item count check in Folder#replaceFolderWithFinalItem()
Instead of checking the item count (number of views), check the number
of items in the model, since that is where the item is being removed.
This way, mInfo.contents.remove(0) will never be out of bounds.

Bug: 25666490
Change-Id: I0eb880b366157bddb5a8c342d538737722b7f0cd
2015-12-18 13:13:48 -08:00
Sunny Goyal b740f59c7d Fixing some invalid checks and cleaning some redundant conditions
Change-Id: I770ce2cc2eccbee105958634e81bbc9bc2e4cc48
2015-12-18 11:00:14 -08:00
Sunny Goyal 6f70936f7f Preventing launcher crashes due to low disk space.
In case of low disk space, all write operations to the IconCache are
silently ignored. This will not affect the Launcher behavior and
user will still see the latest icons, but in some cases, icon loading
would appear slow

Bug: 24585352
Change-Id: I85ccc519046fc3708403388bba89e019a3f2ce3d
2015-12-18 10:20:52 -08:00
Sunny Goyal d804398755 Using SharedPrefenrece.apply instead of commit to prevent disk IO on main thread
Bug: 25903149
Change-Id: Ib1ee3fd27cca14f147f704aec768a330c4f03b33
2015-12-17 22:24:51 -08:00
Sunny Goyal d896ee43cd Protecting Icon normalization behind a feature flag
Change-Id: I91b7126765049372a3ffec3ad6f661715dc83bab
2015-12-17 11:24:46 -08:00
Sunny Goyal 2b84b652b3 Reverting the cache version change, so that users on release version do not get the cache reset
Change-Id: I61b06ca001e6ae47693e8d6f467565314d66f1b4
2015-12-15 17:12:22 -08:00
Sunny Goyal a50a419b82 Restarting launcher when on font scale change
Chaning the font scale affects the static device profile and may
affect various background threads and static constants. Killing
the process ensures that these states get invalidated properly.

Bug: 26131935
Change-Id: Idc262ee5d158019e7a2505f8fb9a6413c06bfdeb
2015-12-11 10:55:20 -08:00
Sunny Goyal 49750ce75e Merge "Fixing All apps not respecting scaled icon size" into ub-launcher3-burnaby-polish 2015-12-11 01:49:02 +00:00
Sunny Goyal e5ef3d2e9b Merge "Clearing DB instead of deleting the DB file." into ub-launcher3-burnaby-polish 2015-12-11 01:37:56 +00:00
Sunny Goyal 383e0a29ec Fixing All apps not respecting scaled icon size
Change-Id: I3d05c713939fd69d04f5896cdc5db91480b0d4d1
2015-12-10 13:02:01 -08:00
Sunny Goyal 06538a7784 Merge "Verifying the install shortcut intent before casting the extras to various object types" into ub-launcher3-burnaby-polish 2015-12-08 21:43:10 +00:00
Sunny Goyal 655daaed3e Recreating QSB when the widget host gets reset
Bug: 25073414
Change-Id: Ibdaa2b330ef7989cb7c93d64a05c8f6e5b26594a
2015-12-08 09:29:03 -08:00
Tony Wickham d42f97ee07 Merge "Added an instrumentation test case for quickly adding a widget." into ub-launcher3-burnaby-polish 2015-12-08 02:36:54 +00:00
Sunny Goyal f3b13b55df Merge "Adding FeatureFlags.java file to aggregate various feature definitions" into ub-launcher3-burnaby-polish 2015-12-08 01:44:40 +00:00
Sunny Goyal bdcabf0515 Adding FeatureFlags.java file to aggregate various feature definitions
Change-Id: I52d04ab979329d1afd42fd74ec0a533dd819fd23
2015-12-07 15:04:13 -08:00
Sunny Goyal 7606a412c5 Verifying the install shortcut intent before casting the extras to various object types
Bug: 26043109
Change-Id: I95f127d62a6a508a850e11d6728afc7509fb07d1
2015-12-07 14:52:07 -08:00
Tony Wickham 8db5d7ca60 Merge "Add appropriate (tiny) offset to widget drops so they land correctly." into ub-launcher3-burnaby-polish 2015-12-04 22:14:36 +00:00
Tony 2f04430fa4 Added an instrumentation test case for quickly adding a widget.
This would have caught the race condition bugs that caused the "specified child
already has a parent" IllegalStateException (bug 23896857).

Change-Id: I3b408d21113237b0c89a0a7161f504596212bd58
2015-12-04 12:06:13 -08:00
Tony Wickham bcec69525d Merge "Increase spacing between icons in All Apps on tablets." into ub-launcher3-burnaby-polish 2015-12-04 18:30:09 +00:00
Sunny Goyal 39b700fcc5 Merge "Normalizing app icons based on the standard icon guidelines" into ub-launcher3-burnaby-polish 2015-12-04 17:56:04 +00:00
Tony Wickham b88d0bccbe Merge "Cleanup keyboard code." into ub-launcher3-burnaby-polish 2015-12-04 17:55:33 +00:00
Tony Wickham 329d8bfa04 Cleanup keyboard code.
This should be the last keyboard CL.
- Fix bug: couldn't focus All Apps button in some cases when the All
Apps column was skipped over. Also added test case for this.
- Stop explicitly passing countX and countY to handleKeyEvent, as
these had to match the matrix dimensions anyways.
- Rename createSparseMatrix() - there were 3 methods of the same name,
but all had different purposes. This is confusing both from a
readability standpoint and also when looking at stack traces.

Change-Id: I08ba8411674fcea43a608856c114dee8dbd22398
2015-12-04 09:48:17 -08:00
Tony Wickham 62b9b6054e Hide the focus indicator view when going to a fullscreen page.
Bug: 25649853
Change-Id: I9f2f221020548b48d816924a1803a1a70d11c412
2015-12-03 14:47:52 -08:00
Tony Wickham 0fa5ada226 Fullscreen pages (e.g. Now) are focusable via keyboard.
Change-Id: I962551651aeb9ac7b57bb51b195adc3140db30d8
2015-12-03 14:27:55 -08:00
Tony Wickham af78b59af1 Make sure pages are always accessible via left/right arrow keys.
- Handle NextPageFirstItem as first focusable item in reading order
- Handle PreviousPageLastItem as last focusable item in reading order
- Check the hotseat after the workspace in both cases above
- Dpad horizontal navigation (left/right) uses these as a last
  resort (Rule3) to guarantee an item takes focus if a page exists

Note that it is necessary to search for a focusable item because
widgets are not yet focusable.

Bug: 25591057
Change-Id: I953648bd76c657d660a38427fdd4108bf9963c23
2015-12-03 14:18:06 -08:00
Tony Wickham b879abd274 Merge "Add special column for All Apps button in FocusLogic's sparse matrix." into ub-launcher3-burnaby-polish 2015-12-03 20:41:28 +00:00
Tony Wickham a501d49a6a Add appropriate (tiny) offset to widget drops so they land correctly.
Also removed some unused parameters I found on the way.

Bug: 25191623
Change-Id: Ib9a30db106467c114cc8b54a5b13ed3e88162d56
2015-12-03 11:54:13 -08:00
Sunny Goyal fc21830e6b Normalizing app icons based on the standard icon guidelines
Bug: 18245189
Change-Id: Iaadcddbe3f966733a13b2e1fb60ba09a8b3aef9a
2015-12-02 19:46:36 -08:00
Sunny Goyal aa4011e63e Merge "Scaling down the icon before applying the user badge > This also saves memory only create one new bitmap while loading instead of two" into ub-launcher3-burnaby-polish 2015-12-03 03:25:21 +00:00
Tony Wickham ac929f4ad8 Merge "Disallow scrolling if workspace is in transition." into ub-launcher3-burnaby-polish 2015-12-02 23:11:09 +00:00
Tony Wickham a7844dd4b1 Increase spacing between icons in All Apps on tablets.
Change-Id: If90332098f749295da07f4faca707a7a6965666b
2015-12-02 13:37:07 -08:00
Sunny Goyal 093a58cc77 Merge "Keeping the focus indicator on the widget view, while a child is focused" into ub-launcher3-burnaby-polish 2015-12-01 23:19:11 +00:00
Sunny Goyal 9326461652 Adding margin to Drag layer instead of checking for right insets at every place
Bug: 25692432
Change-Id: I853f41a17c54b30b7772b9fd8556d9465de84752
2015-12-01 14:43:32 -08:00
Sunny Goyal 0c4e37223f Keeping the focus indicator on the widget view, while a child is focused
Bug: 25199581
Change-Id: Ie08d1438ae0c1b5d4fcaa4d642508c1b9db0f5d4
2015-12-01 14:38:14 -08:00
Sunny Goyal 33f90e7b55 Clearing DB instead of deleting the DB file.
> Deleting a file/reinitializing the openHelper variable is not thread safe
and can cause the sqlite instance ot go in an invalid state

Change-Id: I54d992c7e3daee82e6dad38d6bfbfcbf8ede506c
2015-11-30 11:48:16 -08:00
Sunny Goyal 0c2f0700a5 Only fetching firstInstallTime for an activity when required
Change-Id: Ia16c05718938849f4250802d8770ddfe6dbef055
2015-11-30 09:51:39 -08:00
Sunny Goyal 0b621156f3 Scaling down the icon before applying the user badge
> This also saves memory only create one new bitmap while loading instead of two

Bug: 25027252
Change-Id: Ia594dd65a30f32e99404190f649b334615c9e17f
2015-11-25 11:25:25 -08:00
Sunny Goyal d007d0722c Merge "Allowing widgets to be focusable" into ub-launcher3-burnaby-polish 2015-11-25 18:10:56 +00:00
Tony Wickham 6e83dc4031 Merge "Skip to the end of the folder open animation in battery saver mode." into ub-launcher3-burnaby-polish 2015-11-25 00:02:12 +00:00
Tony Wickham 1a690cb785 Don't let folder be replaced with final item twice.
Bug: 25732317
Change-Id: I77b3ddc8951583bebfb908fda934c9b80ddebce0
2015-11-24 15:34:53 -08:00
Sunny Goyal 7bce5f7988 Tying LauncherAppState lifecycle with LauncherProvider
The content provider is the first component started with the main process,
which makes it ideal for initiating LauncherAppState

Change-Id: I03db82a8949ad1376af53a0033592f421dbf0b15
2015-11-24 12:06:42 -08:00
Sunny Goyal 4ee66259eb Merge "Setting statusbar and nav bar colors in theme instead of code" into ub-launcher3-burnaby-polish 2015-11-23 18:45:41 +00:00
Tony Wickham 298f1c4578 Merge "Focus doesn't leave folders without also closing them." into ub-launcher3-burnaby-polish 2015-11-23 18:43:21 +00:00
Tony Wickham feec2171f8 Focus doesn't leave folders without also closing them.
- Pressing Tab wraps around to the first item from the folder name,
  and vice versa when pressing Shift+Tab.
- When tapping off the folder while editing the text, the folder
  requests focus. We handle the following cases from that state:
    - Pressing an arrow key or Tab gives focus to the first item.
    - Pressing Shift+Tab gives focus to the last item.
- Fix slight corner case where moving from folder name to an item
  didn't update mIsEditingName to false. So when clicking off of
  the folder, it gave focus to the folder (as mentioned above)
  instead of closing the folder like it usually does when icons are
  focused. Not a huge deal, but still worth fixing.
Bug: 25687579
Change-Id: I1bec844c8ccd09529a11b9e3a1d92b3bdf7b2eb3
2015-11-20 15:08:55 -08:00
Tony Wickham a5209e33fc Disallow scrolling if workspace is in transition.
Because going to overview mode scales down the workspace, it was
thinking the touch was moving even though your finger was still. If
the "movement" was large enough, it was treated as a scroll, causing
jank. This was especially prevalent on tablets due to their size.

Bug: 25779718
Change-Id: Idb7833e0087bd24ca840f6afc451bf221f6bc047
2015-11-19 12:45:30 -08:00
Tony Wickham 55bd16bfdc Merge "Stop requesting focus on folder if it was closed without animating." into ub-launcher3-burnaby-polish 2015-11-19 00:36:20 +00:00
Tony Wickham 0151ff1683 Merge "Handle errors gracefully in WallpaperCropActivity." into ub-launcher3-burnaby-polish 2015-11-18 19:51:55 +00:00
Tony Wickham f2bd93c7e0 Handle errors gracefully in WallpaperCropActivity.
(cherry picked from commit c984cde008)
Now instead of crashing, it says "Couldn't load image."

Bug: 25326319
Bug: 25656670
Change-Id: I71471f4b26f7c23dee40b60772ddd798f67b409e
2015-11-18 11:31:26 -08:00