Commit Graph

109 Commits

Author SHA1 Message Date
Sunny Goyal
10923b30a2 Removing shadow and badging from the icon which is shown in the menu
These are added as soon as the icon is added to the workspace

Bug: 28980830
Change-Id: I725d2ee8994324f09d9ecf7bbbb0090a7ceb5769
2016-07-26 14:18:09 -07:00
Winson
be9798b6a2 Fixing issue with shadow drawing over search bar.
- Adding notion of clip-against view for click shadow alignment.

Bug: 30255227
Change-Id: Id5716a3484051a55690025d61f709e3d96cbe024
2016-07-20 16:21:24 -07:00
Sunny Goyal
4a464794f2 Adding support for dynamically adding shadows to the icon
Change-Id: I94d98750aea1faef8879e25990aa5c41a4894708
2016-07-20 11:26:22 -07:00
Tony Wickham
1bce7fd342 Long-press on an app to reveal its shortcuts.
- Add ShortcutsContainerListener to icons on workspace, folders, and
  all apps. This handles long-press and forwards following touches to
  the DeepShortcutsContainer that is created.
- Drag over shortcut before lifting finger to launch it.
- Shortcuts are rendered in pill-shaped DeepShortcutViews,
  which are inside DeepShortcutContainer on DragLayer.
- The shortcut container orients above or below the icon, and left or
  right-aligns with it. Biases for above + left-align.
- Long press a DeepShortcutPill to drag and pin it to the workspace.

Bug: 28980830
Change-Id: I08658d13ae51fe53064644e8d8f7b42f150fdd7d
2016-06-29 17:48:46 -07:00
Sunny Goyal
0d21daace2 Merge "Making some shortcut manager calls protected by MR1 version check" into ub-launcher3-calgary 2016-06-23 21:56:25 +00:00
Sunny Goyal
9994b2b171 Making some shortcut manager calls protected by MR1 version check
Change-Id: Ifdfa95a58aa18a825c1838c61055928dbe0ea3be
2016-06-23 14:55:56 -07:00
Sunny Goyal
11cec0209c Merge "Removing unnecessary object creation and double loop during getDescendantCoordRelativeToAncestor" into ub-launcher3-calgary 2016-06-23 21:29:21 +00:00
Andrew Sapperstein
abef55a1c1 Update Launcher to use theme colors.
Instead of using hard-coded variants of colors, use the theme color
that corresponds (colorAccent, colorPrimary, etc).

Updated:
- "Search for more apps" text
- App info drop target hover color
- PageIndicatorDots
- All apps & widget scroll bar & scroll popup colors
- All apps section text color
- widget picker background color

TODO:
- widget picker header color

BUG: 28625102
Change-Id: I74b543ff71b8caef8cd950c8183ac84c759cb4d5
2016-06-20 11:46:44 -07:00
Sunny Goyal
8cf47a5121 Removing unnecessary object creation and double loop during
getDescendantCoordRelativeToAncestor

Change-Id: I034db2282a8aaf129336a425338c6a80d6a3a073
2016-06-15 10:11:56 -07:00
Sunny Goyal
e8b5d20d94 Fixing bug in getDescendantCoordRelativeToParent where it was
calculating the coordinates relative to the root's parent

The bug went unnoticed for so long, as its only used in DragLayer
which is positioned at 0,0 in its parent

Change-Id: I101cda1f1fa919c0faf9b23b1eeb05764bdf1a40
2016-06-14 16:46:03 -07:00
Sunny Goyal
da4fe1a624 Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).

Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
2016-05-27 18:23:29 -07:00
Sunny Goyal
ff4ba2d995 Refactoring out grid occupancy management in a separate class
Change-Id: I37a830c0f2eb0a0dd4f5fc78fa29127cb18cb3c2
2016-05-27 09:12:26 -07:00
Kenny Guy
367da9f422 Update wallpaper API to match NYC change.
Update check for whether setting wallpaper
is allowed for renamed API.

Bug: 28954131
Change-Id: I09ee46167d59d267ba95d136366f78f5735ea9a5
2016-05-26 11:11:06 +00:00
Sunny Goyal
3f732190cc Preventing unnecessary options update to QSB provider
by checking if the options have changed before calling update

Bug: 28586377
Change-Id: Idf263b7a32ca85f23f728fa29b9c8ac84289052e
2016-05-18 15:00:52 -07:00
Tony Wickham
f549dab31d Add PageIndicator interface and custom PageIndicatorLine view.
- The current PageIndicator has been renamed to PageIndicatorDots
  and PageIndicatorMarker has been renamed to PageIndicatorDot.
- PageIndicatorDots and PageIndicatorLine implement PageIndicator.
- PageIndicatorLine uses scroll progress and number of pages to
  draw a line of the correct size and position.
- All of these page indicator files are now in a pageindicators package.

Bug: 27227498

Change-Id: I9230d2e0600ce583989bd31d0b0e252b148d15c2
2016-05-17 18:53:57 -07:00
Sunny Goyal
f48e59268b Making the 'Allow rotation' setting dependent on system state
The setting will not be available on a tablet, where rotation is
always enabled. On mobiles, it will be disabled when auto-rotate
is disabled in display settings.
Also removing content provider dependency from settings, as its in the
same process as launcher.

Bug: 28704055
Change-Id: Ibe6b1e67411fb0e4b2e36446710f463e4a3d6883
2016-05-16 12:07:41 -07:00
Tony Wickham
462b5cca7b Extract color for the hotseat.
- Only considers the bottom fourth of the wallpaper
- Is translucent black or white depending on how dark/light
  the wallpaper is
- Hotseat extends behind the nav bar

Bug: 27230217
Change-Id: Id4ea6ee91b4dd221b4c277d22d5041cab178801d
2016-05-09 15:41:38 -07:00
Sunny Goyal
713edfce26 Adding a utility class for persistant logging.
The logs are kept for at max 48 hours. It uses two log files and switches
between the two based on the day of the year.

Change-Id: I9a99499b3445a62f29f62a5cd13db20b1783bcd3
2016-05-09 12:47:42 -07:00
Sunny Goyal
745bad9da1 Chaning the behavior of settings activity.
> Making all twoState prefs backed by content provider
> Using the stadard intent defined in N for settings
> Using SharedPrefsListener instead of LauncherProvider

Change-Id: I8272f54aa780bc0436e3d0aa89096a4bd2a9194f
2016-05-02 12:00:51 -07:00
Sunny Goyal
1ed6c4adde Showing a toast when changing wallaper is disabled
Bug: 27940102
Change-Id: I373093d9b85dca356aaa8798931d5315981fd74c
(cherry picked from commit 2afb636180)
2016-04-21 23:12:50 +00:00
Sunny Goyal
6388b2c61b Adding some utility methods for thread verification
Change-Id: I3fb6a1b860bba8a6efe413dd2698f972dc3e2506
2016-04-15 18:03:50 -07:00
Sunny Goyal
b0e378000f Removing some wallpaper dependency
Change-Id: I3f88a76df40c64678e297f217d703ca296f2d5cd
2016-04-05 18:02:13 -07:00
Tony Wickham
827cef203f Added ColorExtractionService and ExtractedColors.
- Launcher has an instance of ExtractedColors, which is loaded from
  LauncherProvider in onCreate() and whenever the wallpaper changes.
  - When the wallpaper changes, the ColorExtractionService is started
    in the :wallpaper-chooser process.
  - ColorExtractionService builds an ExtractedColors instance and saves
    it as a String in LauncherProvider.
  - When the results are saved, Launcher gets a callback through
    LauncherProviderChangeListener and reloads the ExtractedColors.
- Whenever Launcher loads Extractecolors, it also re-colors items
  (currently a no-op).

Change-Id: I319e2cfe0a86abcbc6bb39ef6b9fbbcad54ad743
2016-04-01 15:40:57 -07:00
Sunny Goyal
6f866095c0 Removing dependency on wallpaper size settings from launcher
> Moving wallpaper desired width calculation to xml

Bug: 14470153
Change-Id: I8803af158861507a40e5d55e9aa6d515be47eefa
2016-03-17 17:04:37 -07:00
Sunny Goyal
531cda693d Using a negative flag for icon notmalization
Change-Id: Iaa94aea730d2b5cc3f15f3578f240127ca0eef63
2016-03-03 13:30:57 -08:00
Sunny Goyal
8f3819bc51 Preserving the homescreen rotation setting on a tablet, when the display is scaled
Bug: 27040652
Change-Id: I07f5e02443379ac5b877f72d33cedf4f2feca926
2016-02-23 14:50:27 -08:00
Sunny Goyal
e3a593a025 Merge "Fixing icon badging being done on scaled bitmap size" into ub-launcher3-burnaby-polish
am: 5255c87c6f

* commit '5255c87c6f215010aeeb690eed4eae28177b0a93':
  Fixing icon badging being done on scaled bitmap size
2016-01-12 22:39:23 +00:00
Sunny Goyal
e1483fb1cd Fixing icon badging being done on scaled bitmap size
Launcher already scales the bitmap during the icon creaiton. The
badging should be done based on the actual size

Bug: 26345646
Change-Id: I1b1f7ac736322ba10db9083d602eec221b99687a
2016-01-08 12:16:15 -08:00
Sunny Goyal
619c21e87b resolve merge conflicts of d896ee43cd to ub-launcher3-master.
Change-Id: If09db8d99e7065c08fcb81b8d97a68a2557d53d7
2015-12-17 12:32:54 -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
2d2b42ba3c resolve merge conflicts of 39b700fcc5 to ub-launcher3-master.
Change-Id: I394258be0c75289cab2f5141c0fb765504527420
2015-12-04 10:04:54 -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
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
Tony Wickham
2ef6abc091 Merge "Skip to the end of the folder open animation in battery saver mode." into ub-launcher3-burnaby-polish
am: 6e83dc4031

* commit '6e83dc4031b78ac6e65102b2d936e9e769686fec':
  Skip to the end of the folder open animation in battery saver mode.
2015-11-25 00:06:14 +00:00
Tony Wickham
112ac95571 Skip to the end of the folder open animation in battery saver mode.
Bug: 25666809
Change-Id: I867d56a34fc5e0ad6aaabd8b6df47be05ec31966
2015-11-12 12:51:06 -08:00
Sunny Goyal
f912beb2ee resolve merge conflicts of fe3db428ab to ub-launcher3-master.
Change-Id: Icc60a61f621fefe9db67b178921e62f7d72d7e5a
2015-10-20 10:37:15 -07:00
Sunny Goyal
f725824fa2 Refactoring getPreferenceKey method
This method was returnning a constant and getting inlined by proguard.

Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
2015-10-20 09:41:04 -07:00
Sunny Goyal
b84046dacf 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-10-19 14:05:25 -07:00
Winson
722e85678a resolved conflicts for 1845049c to ub-launcher3-master
Change-Id: I25a01a0735be754f4c8daef5a4a04eaec651b95c
2015-10-07 13:04:30 -07:00
Winson
12fb9fc3c3 Replace Long.compare() with implementation.
- Long.compare() was added in API level 19.

Change-Id: Ic7020c941403c10daa6feacdc737c6a82676ada0
2015-10-01 15:34:08 -07:00
Sunny Goyal
6cdc6b9f05 am 81284287: am de9590be: Adding null check when creating icon bitmap
* commit '81284287a761a9ee512bd7d4857995fdd8d8dcbc':
  Adding null check when creating icon bitmap
2015-09-28 18:49:19 +00:00
Sunny Goyal
81284287a7 am de9590be: Adding null check when creating icon bitmap
* commit 'de9590be4ca2779ae0f7f64a48ac8b90472484f8':
  Adding null check when creating icon bitmap
2015-09-28 18:46:18 +00:00
Sunny Goyal
de9590be4c Adding null check when creating icon bitmap
Bug: 24299267
Change-Id: I596e4a8dbd4e45cffff75e6cf7bbbf7ec45c8ec9
2015-09-27 19:05:04 +00:00
Sunny Goyal
9d4380856f resolved conflicts for e78e3d73 to ub-launcher3-master
Change-Id: Idc119a57e21cf6016ee0fd91866839301db072d6
2015-09-25 11:50:16 -07:00
Sunny Goyal
e78e3d734b Accessibility fixes
1) Use a different content description for temporary new page
2) Use different accessibility description for add widget toast
3) Announce when an item is deleted
4) Announce when hovering over a drop target
5) Announce state during drag-n-drop and widget resize (similar to seekbar)

Bug: 23573321, 24057944
Change-Id: Icabb317625e70c78e11c0b4f99b9339172d93594
2015-09-25 10:22:47 -07:00
Sunny Goyal
1bf14ff6b7 am f27cb0e6: resolved conflicts for 8ac727b2 to ub-launcher3-burnaby-polish
* commit 'f27cb0e6b1edb2a53de64fdd12d25f400a3acdd9':
  Using custom threadpool executor instead of the one defined in AsyncTask
2015-09-23 23:14:51 +00:00
Sunny Goyal
8ac727b2c6 Using custom threadpool executor instead of the one defined in AsyncTask
Change-Id: I8fe95d932c5de14c74f0576bfc3d1f641d12b448
2015-09-23 15:39:14 -07:00
Tony Wickham
29d853c2dd Make sure all overlay panels are visible as user free scrolls.
Previously there was a workaround to ensure that adjacent panels were visible
while in the overview or spring-loaded states, but it incorrectly kept only
those original pages visible even while the user scrolled to other pages. So now
we only use the workaround when first entering the overview or spring-loaded
states, and then fall back to the default getVisiblePages() implementation in
PageView when in free scoll mode.

Bug: 23766408
Change-Id: I692ec00b9cd6d7889c374aee41b85abd0a5d8d3c
2015-09-09 09:25:51 -07:00
Sunny Goyal
21bf531499 Removing multi_process access to shared preferences
Change-Id: If802245632c30d4f383013203fb2e0349ebc14fe
2015-08-21 11:08:24 -07:00
Sunny Goyal
756cd26592 General code refactoring
> Removing utility method for isAttachedToWindow
  > Moving logic to calculate cell size from workspace to DeviceProfile
  > Replacing some constants with xml resource variables
  > Saving the item info using content values for better compatibility with other methods

Change-Id: Idd612633d97a6241cb31148df9466031374bd5a0
2015-08-20 12:56:58 -07:00