Commit Graph

12975 Commits

Author SHA1 Message Date
Sunny Goyal 116d34bc63 Preventing a shortcut which requires permissions from being added to
homescreen

A shortcut can be added by any app as INSTALL_SHORTCUT is a normal
level permission. But the intent is actually launched by the launcher
app which can have other permission as well.

> When adding a shortcut from the broadcast, verify that the intent does
not require any permission
> When adding a shortcut using the two-step drop process, verify that
the source app also has the permission to create such a shortcut

Bug: 30778130
Change-Id: I33a391bc0af81248aaff4459aaa79d1adc77926b
(cherry picked from commit fb5096d07b)
2016-09-21 20:12:20 +00:00
Tony Wickham 4707e2b64d Fix the build
Change-Id: Iaa38202cbb389eed179a3e7b1b6799426ae1cf39
2016-06-21 18:18:37 -07:00
Hyunyoung Song 3c0c2c4b02 Merge branch 'ub-launcher3-burnaby-nyc' into nyc-dev
b/29535844

Change-Id: I46d6f461261a4a8ba8bcea58ac82e005fca35109
2016-06-21 16:45:25 -07:00
Tony Wickham fd309fbf9f Replaced Utilities.isNycOrAbove() with version code check.
- Instead of using reflection to check if N is present, we now use
  Build.VERSION.SDK_INT >= Build.VERSION_CODES.N.
- Other places that used reflection to use N APIs have also been
  cleaned up.

Bug: 22942492
Change-Id: Ia7b981cae375e800bcc8f0c54aec48e0c8c076da
2016-06-15 19:00:12 +00:00
Adam Cohen d140f3c77a Ensure that custom actions are available to all apps items
-> When BubbleTextViews were being recycled, the RecyclerView was clearing the
   AccessibilityDelegate. Ensure that this is reset by the adapter when a
   BubbleTextView is reused.

issue 25948877

(cherry picked from commit 6e92f05314)

Change-Id: I5f0773333186e5ffe4600f49330b4390cd3fbaeb
2016-06-07 18:29:37 -07:00
Adam Cohen 26a4f6c831 Revert "Ensure that custom actions are available to all apps items"
This reverts commit 677ce21fbf.

Change-Id: I7fc13142de9946e0b482160fa4c067461e471f52
2016-06-07 22:30:30 +00:00
Adam Cohen 677ce21fbf Ensure that custom actions are available to all apps items
-> When BubbleTextViews were being recycled, the RecyclerView was clearing the
   AccessibilityDelegate. Ensure that this is reset by the adapter when a
   BubbleTextView is reused.

issue 25948877

Change-Id: I95dd21bfdcd602a67925d1b8f06e6ca92d1d7203
(cherry picked from commit 6e92f05314)
2016-06-07 22:08:19 +00:00
TreeHugger Robot 9953770ec8 Merge "Import translations. DO NOT MERGE" into ub-launcher3-burnaby-nyc 2016-06-07 20:41:50 +00:00
Bill Yi 7bf18facfc Import translations. DO NOT MERGE
Change-Id: I0722328b8acf18a1711632c6f650c1328441e4a2
Auto-generated-cl: translation import
2016-06-07 13:37:04 -07:00
Bill Yi 99404af176 Import translations. DO NOT MERGE
am: 21c2d8f244  -s ours

* commit '21c2d8f244dae711b12339cc6e643cd34ef8dcd6':
  Import translations. DO NOT MERGE

Change-Id: I20291932d55ac2f053b239cb8c0b87c3453b26e6
2016-06-07 20:22:47 +00:00
Bill Yi 21c2d8f244 Import translations. DO NOT MERGE
Change-Id: Ifcd878b149cbe2b1b2a021024039f30aef1a36a7
Auto-generated-cl: translation import
2016-06-07 13:03:19 -07:00
Winson 86e3dc4fc5 Adding null check for uninitialized CollectionItemInfo.
Bug: 28893815
Change-Id: Ib75b71fbb4d37bb818251527defcef891c7e7510
2016-06-06 11:36:58 -07:00
Sunny Goyal 65ffa15c90 Adding null check when widget provider changed is received as it can come
after the activity is destroyed.

Bug: 28791862
Change-Id: I521931b772a611e15f0757db72b441ebb937e262
2016-06-01 14:29:25 -07:00
Sunny Goyal d2a6ed36a2 Disabling stricty mode checks when launching an activity.
The default strict mode policy in NYC cause death penalty when
when sharing file URI in intent. This causes launcher to crash
for users who have shortcuts of images and documents on their
homescreen.

Bug: 28853579
Change-Id: If84cd5ff732713aaff5d3164edf428c8b4233ea2
(cherry picked from commit 85fc55a976)
2016-05-31 20:46:23 +00:00
Kenny Guy ad3ca7d1bf 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-25 19:22:14 +01:00
Sunny Goyal 42ca2fe3a8 Adding android.icu.text.AlphabeticIndex implementation for AlphabeticIndexCompat
as libcore.icu.AlphabeticIndex is no longer available in N

Bug: 28795251
Change-Id: I3b168dfb451c0eac9b64c6559a51d2b1b8c578b9
2016-05-20 14:34:41 -07:00
Christopher Tate ea4cc66cf3 Track adjustments to new wallpaper APIs
Bug 28773334

Change-Id: I4b660cf83172cfbd3640d7cf06020de766bda0bc
2016-05-18 17:33:01 -07:00
Baligh Uddin 09befd9941 Merge "Import translations. DO NOT MERGE" into ub-launcher3-burnaby-nyc 2016-05-18 19:06:23 +00:00
Baligh Uddin 03dc99c0ba Import translations. DO NOT MERGE
Change-Id: Ie23f2e6ed183ef562db099f159b11402c3a959b6
Auto-generated-cl: translation import
2016-05-17 00:21:31 -07:00
Sunny Goyal 47c86748e1 On some "non-standard" devices, load label can cause a security exception due to modified platform code
am: 0d86a8dccf

* commit '0d86a8dccf6557587eb3abae1bb3573e2c40c12c':
  On some "non-standard" devices, load label can cause a security exception due to modified platform code

Change-Id: I7d65f2f39353c50a43334709f8b3bf970969a68c
2016-05-16 19:56:13 +00:00
Sunny Goyal 0d86a8dccf On some "non-standard" devices, load label can cause a security exception
due to modified platform code

Bug: 28243147
Change-Id: Iab899d0cb233e19ebf994f8a3eacba26f840148f
2016-05-16 19:43:18 +00:00
Hyunyoung Song 8c340dff19 Merge branch 'ub-launcher3-burnaby-nyc' into launcher3merge
b/28269144
2016-05-12 19:54:34 +00:00
Sunny Goyal f2ea0cdd94 Fixing homescreen getting blank when returning from the overlay
Change-Id: Ie11b92cd59c90e71b9b58eeede742ef0c5b28380
2016-05-11 17:17:32 -07:00
Sunny Goyal 38f92cf9aa Fixing scrollTo getting called even though the gesture was handled by an overlay
Change-Id: Ia46c4ef3db8a3ae4fa615625b7b983d7e461c797
(cherry picked from commit 061380a04d)
2016-05-11 23:37:44 +00:00
Sunny Goyal d6e208b035 Adding overlay interaction support
> Sending unboundX to the overlay which is the total untranslated X and not just deltaX from last frame
> Handling overlay callback and translating workspace accordingly

Change-Id: I3bd8d9efac738e9ce131758f0e5ff1b9c1d6a8fc
2016-05-11 15:30:27 -07:00
Sunny Goyal 4ec7134a77 Cleaning up the overlay interface
Overlays are supposed to use their own UI and not interfere with the
Launcher UI. If the UI needs to be put inside the Launcher, use customContent
instead.

Removing some unnecessary and unused methods related to overlays

Bug: 25993953
Change-Id: I4d715cdee04eb7b0ebef673d885a4258c521ff1f
2016-05-11 11:44:28 -07:00
Hyunyoung Song 0fb31cf741 Merge "Fixing bug where the widget background enters into a focused state if a child calls requestFocus in xml" into ub-launcher3-burnaby-nyc 2016-05-10 20:37:20 +00:00
Yohei Yukawa fe1de383c1 Enable selection action mode for Android M+.
Since I62963d225e6ea5d2ec9d8ebc8a6d73099f5d6c7f, we have disabled
selection action mode in the folder-name editing mode on Launcher,
mainly because it messed up the view on phones.  However that is no
longer the case in Android M and later, where floating action mode
is available.

With this CL, we start relying on the default floating action mode
in Android M and later.

Bug: 22210697
Bug: 28526978
Change-Id: Ie19e7844194acd86cdb013254a1923f0b1d78e11
(cherry picked from commit 1bd9a430ed)
2016-05-10 20:20:30 +00:00
Hyunyoung Song d419681a1c Fix home button returning to now screen issue
b/27978139

Background: onSaveInstanceState assumes that state of the launcher
is being stored after screen is all binded. However, due to ActivityStack
bug in nyc, onCreate is called twice when the device is rotated while
the Launcher is in the background. The first onCreate fails because
our AndroidManifest is setup with nosensor field and hence doesn't support
Landscape. During this first onCreate, screen is not correctly bound
and incomplete workspace state is saved. This results in the second onCreate
to load wrong screen id.

Fix: While the workspace is still being bound, mSaveState is not reset,
which has the correct values. SaveInstance should use this state
instead of incomplete workspace state.

Change-Id: I5b80f584e55769b2a8ffa292f5daa4705c20086d
2016-05-09 18:35:55 -07:00
Sunny Goyal 6b29c72249 Fixing bug where the widget background enters into a focused state
if a child calls requestFocus in xml

Bug: 28562293
Change-Id: I005e23550184de29fa15eb70ab322615920b8947
(cherry picked from commit ea98f5288b)
2016-05-09 20:54:23 +00:00
Bill Yi f510921b8f Import translations. DO NOT MERGE
Change-Id: If880a86cfb961d3c9a657a39cab72dcba77f8f53
Auto-generated-cl: translation import
2016-05-09 02:24:39 -07:00
Baligh Uddin ec997b9b6e Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 28632138
Change-Id: I8ac83686d296b781d7a9dbb0e9961990793c83cd
2016-05-06 09:34:49 -07:00
Baligh Uddin fc4faab9cb Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 28632138
Change-Id: I750d21dcd55652032c4a2fb02351accae3ceff8c
2016-05-06 09:26:23 -07:00
Tony Wickham 8dd2409923 Return 1f in Log(Ac/De)celerateInterpolators on a 1f input.
In battery saver mode, animations skip directly to the final values.
For LogDecelerateInterpolator, however, an input of 1f outputs an
interpolated 0.99999994. This meant that the FirstFrameAnimatorHelper
didn't realize that this was the last frame, and messed things up.
Since any interpolator should return 1 on an input of 1, we just
short-circuit in that case for the log interpolators.

Bug: 25666809
Change-Id: I60527e3758cea383fbcf50acb95460a7bd9ab43c
2016-05-03 17:00:20 -07:00
Sunny Goyal 0042e3a5e7 Revert "Calling start/stop listening in onStart/onStop"
This reverts commit 23ac9cb3e1.

Bug: 28421447
Change-Id: Id04e7b7827d8b897b7c7992705d36f9d83a13320
(cherry picked from commit 7e5d5fc3c6)
2016-04-28 22:43:19 +00:00
Rubin Xu 3ee9080fb4 Fix incorrect icon greying on pre-N system
The flag we check for package suspension is reused by a hidden constant
prior to N, so the flag should only be checked on N or later system.

Bug: 28390176
Change-Id: Ia28f62991cc2cd1b5d2cc27a5f11f7edca0ba02b
2016-04-27 20:33:53 +01:00
Sunny Goyal e81ba18a03 Setting stable layout flags on the launcher, so that the instets do not
change for launcher when going in/out of another app

Bug: 27600678
Change-Id: Ic873faba99c539025769d911bc7b0a4fed629cd7
(cherry picked from commit 784f9c3996)
2016-04-27 17:20:24 +00:00
Sunny Goyal 2afb636180 Showing a toast when changing wallaper is disabled
Bug: 27940102
Change-Id: I373093d9b85dca356aaa8798931d5315981fd74c
2016-04-21 15:16:42 -07:00
Hyunyoung Song 7520e492e7 merged ub-launcher3-burnaby-nyc, and resolved conflicts
b/28269144
Change-Id: Ie884be65901b8d9c6a912944094b8c45796162ee
2016-04-20 11:41:00 -07:00
Hyunyoung Song bcc53286c2 Fix recyclerview res path
Manually cherry picking ag/943086

Change-Id: I37b75a04e3fff61b4bd42625a060c41e0fe7e85d
2016-04-19 22:24:40 -07:00
Ed Tam 43d015643b Fix RecyclerView resource path
Bug: 28245713

Change-Id: I37b75a04e3fff61b4bd42625a060c41e0fe7e85d
Signed-off-by: Ed Tam <etam@google.com>
2016-04-18 19:15:44 -07:00
Sunny Goyal fceb9ff0f5 Passing the full image and crop hint when setting the wallpaper
Bug: 25454157
Change-Id: Ia0ae7dd4963b72cd7902622847deedfcb5a0eca2
2016-04-18 16:36:37 -07:00
Tony Wickham 0a197dbbf6 Prompt to set URI wallpapers on lock screen (missed before).
Change-Id: I5328a9861ce2843aba36ecad172eb0e364a816a0
2016-04-13 15:04:30 -07:00
Sunny Goyal ddd6d96d5f Fixing wrong grid size definitions
Bug: 27958565
Change-Id: Icabc651552bbf6483fedbaeb52745c48d418f9ea
(cherry picked from commit 1ab22630a0)
2016-04-13 17:36:45 +00:00
Sunny Goyal 4e04695cde Merge "Giving proper workspace description when the launcher is not loaded." into ub-launcher3-burnaby-nyc 2016-04-13 00:44:18 +00:00
Adam Cohen f47e5ceafd [DO NOT MERGE] Address some spacing issues in all apps related to new support library
am: d797327  -s ours

* commit 'd797327b79c5ded53f698201af5abb7d779ddfa9':
  [DO NOT MERGE] Address some spacing issues in all apps related to new support library

Change-Id: I8c38d1c542f1143dd7c9f330795229b4a03c7ac8
2016-04-12 23:55:03 +00:00
Adam Cohen 9c6f32c2aa [DO NOT MERGE] Address some spacing issues in all apps related to new support library
issue 27581978

Change-Id: If7a1ea19aa586bb3de6bde960b16e59f86061227
(cherry picked from commit d797327b79)
2016-04-12 23:46:16 +00:00
Sunny Goyal 850a943133 Giving proper workspace description when the launcher is not loaded.
Bug: 27326504
Change-Id: Ifc30221f756d75064a4baf5f3bfc71b8f590b4b1

Conflicts:
	src/com/android/launcher3/Workspace.java
2016-04-12 16:39:10 -07:00
Hyunyoung Song 1124f2017a Merge "Talkback: return correct row index inside AllApps b/27108673 b/26546781" into ub-launcher3-burnaby-nyc 2016-04-12 23:17:31 +00:00
Adam Cohen d797327b79 [DO NOT MERGE] Address some spacing issues in all apps related to new support library
issue 27581978

Change-Id: If7a1ea19aa586bb3de6bde960b16e59f86061227
2016-04-12 14:22:11 -07:00