Commit Graph

95 Commits

Author SHA1 Message Date
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
Sunny Goyal
c268148f06 resolved conflicts for merge of 9fc953b9 to ub-launcher3-master
Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
2015-08-17 14:43:41 -07:00
Sunny Goyal
9fc953b94d Version code cleanup
> Renaming Lmp to Lollipop
  > Lollipop_MR1 instead of directly using 22
  > Using M APIs directly instead of reflection

Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
2015-08-17 13:26:01 -07:00
Sunny Goyal
106bf64f4a Some cleanup around drag and drop
> Instead of resizing the rect for dragoutline in onDrow, store the resized rect itself
 > Remove unnecessary inverse matrix calculation

Change-Id: If13c3c5aaecba5a1d3a4f5d39199ed82e9662c62
2015-08-13 16:54:58 -07:00
Vadim Tryshev
9de91278a8 Enabling framework DND in N+.
Also, making the drag shadow opaque.

Bug: 22028725
Change-Id: I2aa61d3906cb9e9c33003bc6e485b9ff1980b9f4
2015-08-04 14:23:46 -07:00
Sunny Goyal
e745f451a5 Merge "Removing boot receiver." into ub-launcher3-master 2015-07-31 22:01:16 +00:00
Sunny Goyal
25aba0aea5 Removing boot receiver.
> Registering the receiver at runtime, only when it is required
> Using system property sys.boot_completed to check if boot completion
> This prevents unnecessary process startup during system bootup

Change-Id: I68f99ecf2e1ffd2ca7b6d15a99a282451bf67aec
2015-07-16 15:17:57 -07:00
Sunny Goyal
6c56c68555 Changing the dogfood check to a static boolean to better handle proguard optimizations
Change-Id: I892b88ce1a007fafc23a73ad4193c5c4aa411d1b
2015-07-16 14:09:53 -07:00
Adam Cohen
d98fff3055 Merge "Adding custom slide up activity transition for L MR1" into ub-launcher3-burnaby 2015-07-08 01:59:57 +00:00
Adam Cohen
947e02b638 Adding custom slide up activity transition for L MR1
issue 21402755

Change-Id: Id2542c0a3c38bd71aa407a3b0fe00fdee24e2f69
2015-07-07 18:52:09 -07:00
Sunny Goyal
1dd0f8bf51 Using cellX and cellY for comparing position when rank is not available
Bug: 22059402
Change-Id: I69ec2b9b68610e171e76cd968de77aaed669672c
2015-07-06 13:04:32 -07:00
Sunny Goyal
11d4911732 Removing junit.framework.Assert
Bug: 22124692
Change-Id: Ie9c920ec6ef9631392a70b9ab2a5659ba23385b3
2015-06-26 21:04:55 +00:00
Sunny Goyal
4e5cc64eaf Fixing backup restore
> Not deleting icons from cache, which have not been restored yet
> Not checking if activity exists during DB migration. Missing
components are removed during loader anyway
> Backing up and restoring bitmaps even when iconType is resource.
This allows us to show a proper bitmap icon, until the correct
resource is available.
> Loading proper shortcutResource icon for promiseIcons
> Checking against promise intent when verifying duplicates
> A launcher App intent can contain EXTRA_PROFILE

Bug: 22094970
Change-Id: I982971338846733833ec133119393af0bea0eb08
2015-06-25 17:41:06 -07:00
Winson Chung
b1777447d9 Refactoring fast scroller.
- Fixing issue with fast scroller not fitting name width.
- Refactoring fast scrolling/scroll bar code out of base recycler view
- Adding animations to fast scroller to match design
- Smooth scrolling when jumping between app rows
- Fixing issue with fast scroller jumping when you first pick it up
- Fixing issue with wrong background paddings being used

Bug: 21874346
Bug: 22031923
Change-Id: I9f011b1f375751f437604b900e95a2942d3f4601
2015-06-23 14:24:15 -07:00
Sunny Goyal
27f03251ea Merge "Deleting empty folders based on DB state" into ub-launcher3-burnaby 2015-06-18 03:06:30 +00:00