Commit Graph

16456 Commits

Author SHA1 Message Date
Sunny Goyal 171fbdbc10 Merge "Blocking alpha animation if the initial and final state for the animation are both 0" into ub-launcher3-calgary 2016-09-02 19:14:55 +00:00
Sunny Goyal dbbb1fee90 Merge "Bug fix in Alarm where it was not getting called correctly if the new timeout was set that was smaller than the previously set timeout" into ub-launcher3-calgary 2016-09-02 19:14:39 +00:00
Sunny Goyal d9033f3ae1 Merge "Fixing broken accessibility drag" into ub-launcher3-calgary 2016-09-02 19:13:56 +00:00
Sunny Goyal 7bc4b5bcd4 Merge "Fixing overlay scroll state not getting reset properly when scrolling is was cancelled" into ub-launcher3-calgary 2016-09-02 19:13:06 +00:00
Sunny Goyal 6f2bb1ada5 Bug fix in Alarm where it was not getting called correctly if the
new timeout was set that was smaller than the previously set timeout

> Using uptimeMillis in Alarm to avoid errors due to system time
changes
> Adding an extra check in Wait in case Thread.sleep eats up
all the timeout

Change-Id: Id1fac5e8fdb81a0c3c7a6a5e50586b2a2f180d06
(cherry picked from commit a2125e1d10)
2016-09-02 18:28:20 +00:00
Sunny Goyal 9be9936653 Fixing broken accessibility drag
> Allow touch events on hotseat while in accessible drag as drag now
happens in spring loaded state.
> Allow drop target buttons to ignore thershold check when in
accessibility drag

Bug: 30900444
Change-Id: I88274367983fc027b2ddde3a719ca943f4f48587
(cherry picked from commit 4583d09c05)
2016-09-02 18:26:33 +00:00
Hyunyoung Song 6cf1e0f36b Landscape container padding update.
b/30021487

Change-Id: I179825eba09f3c4c57175e8f6da49708dae1931c
(cherry picked from commit 9d96fd5790)
2016-09-02 18:24:58 +00:00
Sunny Goyal f28e6afafd Some optimizations in blur outline generator
1) Using ALPHA_8 as the start and end bitmap. This removes one extra
   bitmap generation step
2) Using ByteBuffer on ALPHA_8 bitmap for clipAlpha. This allows us
   to use byteArray instead of intArray for representing pixels

Change-Id: I1b654c439fd491b6b91180ddc562bb97fad857aa
2016-09-02 11:23:49 -07:00
Sunny Goyal 538b54c467 Fixing overlay scroll state not getting reset properly when
scrolling is was cancelled

Bug: 30834333
Change-Id: I3605cd2dd939057905d297b5a25ce8669d578125
(cherry picked from commit 4ff424abf9)
2016-09-02 18:12:48 +00:00
Sunny Goyal 62e7518359 Blocking alpha animation if the initial and final state for the animation
are both 0

Bug: 30739854
Change-Id: I4f7c579dc3f64a4fed60d7b2f8ecd5f359e165ec
(cherry picked from commit bf206123a8)
2016-09-02 18:11:38 +00:00
Sunny Goyal c2936bcbdb Moving AppsAvailabilityCheck into a separate class
Change-Id: Ieea1b5100d63752d928049ad9b1d3b4f84234f0d
2016-09-02 11:06:18 -07:00
Sunny Goyal 52851aa3fd Fixing topView not being considered in all places when calculating accessible
and focusable views

Bug: 30563273
Change-Id: I6253ce33ee5c328efdde2ea733029975b31e5eb8
2016-09-02 10:52:07 -07:00
Sunny Goyal 94b510cc68 Some drag and drop code refactor:
1) Adding DragOptions to easily extend drap functionality
2) Changing onDragStarted signature to send more information
3) Updating states for dropTargetButton based on drag event directly
4) Removing folder item based on onDragStarted and not startDrag

Change-Id: I65b684e092ddc081d086bfe2c8c1973ed170eaeb
2016-09-01 15:55:13 -07:00
Hyunyoung Song 61bcfba335 Merge "Support user event logging for drag and drop b/30039490" into ub-launcher3-calgary-polish 2016-09-01 21:51:25 +00:00
Hyunyoung Song 59a238095e Support user event logging for drag and drop
b/30039490

Supported in this CL:
- DnD: drag from container [WORKSPACE|HOTSEAT|FOLDER|ALLAPPS|WIDGETS|DEEPSHORTCUTS]
       drag to container [HOTSEAT,WORKSPACE,FOLDER,DROPTARGETS]
- Source and target can be [FOLDER_ICON, ICON, DEEPSHORTCUT, WIDGET]
- $ adb shell setprop log.tag.UserEvent DEBUG will turn on debugging

Change-Id: I0b8b879b80e6dce85bbde6e7794f9e0677832603
2016-09-01 12:47:12 -07:00
Sunny Goyal 19ef59fdf3 Removing some reflection code
am: e2ec8a3cd5

Change-Id: I4b71a6fa63e16324c8b6c70812827db81d62b443
2016-09-01 18:55:42 +00:00
Sunny Goyal 3cc2d8b3dd Merge "Removing some reflection code" into ub-launcher3-calgary-polish 2016-09-01 18:48:28 +00:00
Sunny Goyal e2ec8a3cd5 Removing some reflection code
Change-Id: I8a0a707d69999e5f9911e7d8df7d4a659b3dfb8f
2016-09-01 11:01:05 -07:00
Sunny Goyal 1edab71d01 Unifying toString() method for various ItemInfo subclasses
Change-Id: I7cde42f0df412e2877fb93c77e74ee56a25edead
2016-09-01 10:55:45 -07:00
Sunny Goyal 35908f9e67 Splitting some methods into individual compat classes
Change-Id: Id5a2650b290367d1574eb56346beca389900596b
2016-08-31 14:33:27 -07:00
Sunny Goyal 45b9fd280a Merge "Adding isDemoUser method in userManager" into ub-launcher3-calgary-polish 2016-08-31 20:39:53 +00:00
Sunny Goyal b5bf3e6cee Adding isDemoUser method in userManager
Change-Id: I0ad2c0e7bfac5eff5e5c95c3e533840921a67dc3
2016-08-31 13:12:54 -07:00
Hyunyoung Song c8b997a21c Merge "ComponentName null check MUST proceed before creating ComponentKey." into ub-launcher3-calgary-polish 2016-08-31 18:30:00 +00:00
Tony Wickham 12624a5a17 When shortcuts close, only set text visible if not in hotseat.
Bug: 31195155
Change-Id: I3ee6f45f1dd421fcad6ed22b444efd2922b0a32b
(cherry picked from commit e53abfa993f94dea119d99221ea5bbdba87303cb)
2016-08-30 23:12:57 +00:00
Sunny Goyal dfc8b6685b Preventing unnecessary setLayout calls in workspace
Separating getSystemProperty in a separate method

Change-Id: I88716e796e29ac27ef25afa41077a8f29eb65f25
2016-08-30 14:06:51 -07:00
Sunny Goyal 0a6dde7265 Merge "Bug fix in Alarm where it was not getting called correctly if the new timeout was set that was smaller than the previously set timeout" into ub-launcher3-calgary-polish 2016-08-30 18:47:48 +00:00
Sunny Goyal a2125e1d10 Bug fix in Alarm where it was not getting called correctly if the
new timeout was set that was smaller than the previously set timeout

> Using uptimeMillis in Alarm to avoid errors due to system time
changes
> Adding an extra check in Wait in case Thread.sleep eats up
all the timeout

Change-Id: Id1fac5e8fdb81a0c3c7a6a5e50586b2a2f180d06
2016-08-30 11:04:25 -07:00
Tony Wickham def6e474da Use promisedIntent instead of intent when deep shortcuts are restored.
This ensures that the intent has the package corresponding to the
shortcut publisher, rather than a market intent. It also ensures that
the intent has the EXTRA_SHORTCUT_ID attached.

Bug: 31123204

Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1
(cherry picked from commit fc02c1b446)
2016-08-30 00:09:11 +00:00
Tony Wickham 765ff3d7c9 Merge "Use promisedIntent instead of intent when deep shortcuts are restored." into ub-launcher3-calgary-polish 2016-08-29 23:38:03 +00:00
Tony Wickham fc02c1b446 Use promisedIntent instead of intent when deep shortcuts are restored.
This ensures that the intent has the package corresponding to the
shortcut publisher, rather than a market intent. It also ensures that
the intent has the EXTRA_SHORTCUT_ID attached.

Bug: 31123204

Change-Id: I05d56396b629880322e915f52bfc0605b921b0b1
2016-08-29 15:59:28 -07:00
Hyunyoung Song d3bf9803f5 ComponentName null check MUST proceed before creating ComponentKey.
Change-Id: I2460561b62d77d3f2f17dc2a7db765785b46a8c6
2016-08-29 14:43:53 -07:00
Sunny Goyal b05a00a441 Adding a debug flag to prevent broken downlodas from getting removed during
restore

After setting this flag apps do not need to have an active settion during restore
which would simplyfy debugging backup-restore bugs.

Change-Id: I89f2d3ec677281887f8bab8559ace991709caadc
2016-08-29 11:19:26 -07:00
Sunny Goyal bb248828fc Merge "Improve handling of external deletion in LauncherProvider.delete" into ub-launcher3-calgary-polish 2016-08-26 02:45:38 +00:00
Sunny Goyal 2fb1356be6 Merge "Moving the scrim to draglayer" into ub-launcher3-calgary-polish 2016-08-25 22:49:24 +00:00
Sunny Goyal f3a09f9757 Starting the settings activity with same animation as wallpaper (and widgets tray)
Change-Id: I7744d50c9762200eb2ffea37d8435c9bc221c526
2016-08-25 09:46:39 -07:00
Hyunyoung Song c760da5688 Merge "Prevent against NPE inside ComponentKey" into ub-launcher3-calgary-polish 2016-08-24 23:30:05 +00:00
Hyunyoung Song ada6cbe4ef Prevent against NPE inside ComponentKey
b/31063280

Change-Id: I71254fc1a3244fd6834ebf65923d194f17afc1ba
2016-08-24 16:23:09 -07:00
Sunny Goyal d56b157004 Fixing the hotseat import logic
am: d70ef24233

Change-Id: I1be426419d7a7f044dfd81207c3ee3b1df43b404
2016-08-24 23:02:08 +00:00
Sunny Goyal d70ef24233 Fixing the hotseat import logic
The import logic following the behavior: Improt everything and force
run GridMigrationTask to automatically remove broken icons.
This logic would fail for hotseat as the replacement happens before
the GridMigrationTask, which will not replace the broken targets
appropriately

The cl changes some logic only for hotseat import
> After import remove any broken icons/empty folders
> When adding default icons, only add as much icons as required. Since
GridMigrationTask uses weights, it sometimes removes imported icon, if
the hotseat size becomes too large.

Bug: 30909630
Change-Id: I6ca1f25dac81649794d81aaf82c3c38d1c918d91
2016-08-24 11:31:13 -07:00
Sunny Goyal b68f959992 Merge "Comparing widget sizes when sorting if the labels are same" into ub-launcher3-calgary-polish 2016-08-24 02:16:48 +00:00
Sunny Goyal 65ceb5aa55 Moving the scrim to draglayer
> This causes the scrim to animate with the content on first launch
> Also removing the logic to disable scrim based on state. That
logic was only executing onResume which could lead to an invalid state

Bug: 30972956
Bug: 30576826

Change-Id: Ia8386b303ce260f69e3b3b93041226f409301a01
2016-08-23 19:04:23 -07:00
Sunny Goyal 92cb84d4e5 Checking for duplicate intent with proper source bounds.
Since we are doing a equality check on the intent, items which already have
the bounds attached to the intent will not get matched, causing duplicate
icons

Bug: 27176189
Change-Id: Ia9ed9120b04e9c234304995aed13777a5773119e
(cherry picked from commit cbfe71dba3)
2016-08-24 00:46:01 +00:00
Sunny Goyal cbfe71dba3 Checking for duplicate intent with proper source bounds.
Since we are doing a equality check on the intent, items which already have
the bounds attached to the intent will not get matched, causing duplicate
icons

Bug: 27176189
Change-Id: Ia9ed9120b04e9c234304995aed13777a5773119e
2016-08-23 13:27:38 -07:00
Sunny Goyal 527c27c04e Merge "Adding a resource pointer to the app name so that derived projects can easily modify app name" into ub-launcher3-calgary-polish 2016-08-23 20:04:53 +00:00
Hyunyoung Song 6b5e60d0e4 Merge "Landscape container padding update. b/30021487" into ub-launcher3-calgary-polish 2016-08-23 18:11:25 +00:00
Hyunyoung Song 9d96fd5790 Landscape container padding update.
b/30021487

Change-Id: I179825eba09f3c4c57175e8f6da49708dae1931c
2016-08-23 11:06:24 -07:00
Sunny Goyal 112ce42926 Adding a resource pointer to the app name so that derived projects can
easily modify app name

Change-Id: I3f301e1b2ba38d0a45d220bb628dcfdf3906246c
2016-08-22 16:45:58 -07:00
Tony Wickham 5f2ea1e9ce Cancel hotseat color animator before setting a new color.
am: ef0c537925

Change-Id: I1aea3e288d7e54e788ad95b8599e6d909458b220
2016-08-22 23:23:09 +00:00
Tony Wickham ef0c537925 Cancel hotseat color animator before setting a new color.
There was a race condition that caused the new color to not be
applied. For example, here's how the hotseat would become transparent:
1 Launcher is loaded for the first time; as such, there is not yet a
  color defined for the hotseat, so we start animating to the provided
  default (Color.TRANSPARENT). Meanwhile we start the color extraction.
2 When the color extraction finishes, we set the hotseat to the new
  color. However, if launcher is paused at the time (perhaps some
  retail mode content is showing), then we don't animate the change.
3 If 2 happens before the animation in 1 is complete, the color from
  2 will be overriden by subsequent animation frames and thus the
  hotseat remains transparent until the wallpaper changes.

Bug: 30956221
Change-Id: Iddf72379b0162f1b32883ad26ce267473e172849
2016-08-22 15:23:01 -07:00
Sunny Goyal a1503f47aa Comparing widget sizes when sorting if the labels are same
Bug: 21441837
Change-Id: Ib0e6d3b84389f900264a0d696d22057426973719
2016-08-18 19:09:46 -07:00