Commit Graph

541 Commits

Author SHA1 Message Date
Adam Cohen
5940042d39 Supporting custom widgets provided by launcher
-> This change provides integration for widgets provided by
   the launcher package which can run arbitrary code.

Change-Id: I6052da5c4afed7ee72e3b44d045b9c46f2d84c42
2014-12-05 16:18:41 -08:00
Sunny Goyal
2a66bbf3f0 Disabling auto addition of managed profile shortcuts
Bug: 16188104
Change-Id: Ib6464c22140df6d60112eb35f5983718b3db6288
2014-11-20 17:02:24 -08:00
Sunny Goyal
e0f58d7364 Adding shortcuts corresponding to ManagedUsers automatically.
Bug: 16188104
Change-Id: Ic07578dd187263f59f3c431cbb78dea90d0c24f4
2014-11-12 12:23:35 -08:00
Sunny Goyal
24e0fc1221 Merge "Deleting workspace items from db which have an invalid placement" into ub-now-queens 2014-10-23 16:53:44 +00:00
Sunny Goyal
1231c0743c Merge "Updating ItemInfo objects in the worker thread" into ub-now-queens 2014-10-21 18:30:20 +00:00
Sunny Goyal
fc0fe6b9be Deleting workspace items from db which have an invalid placement
Change-Id: I1d616e8cd533acd6ecd334d85e6468163f31f6a4
2014-10-16 12:29:57 -07:00
Sunny Goyal
9b4b0812fe Showing widgets in a disabled state, when running in safe mode
Bug: 15172107

Change-Id: I7209836ca4ffacde7b7b232e230e9b9f1a0e54bb
2014-10-16 11:20:41 -07:00
Sunny Goyal
2350bc9785 Adding NPE check in InstallShortcutReceiver
> Removing some unused methods

Bug: 17971165
Change-Id: I1bc5c764fd65b44c950a58371b60d2b53c221995
2014-10-14 16:43:45 -07:00
Sunny Goyal
4390acea35 Updating ItemInfo objects in the worker thread
> Launcher was making non-trivial updates to ItemInfo objects
on UI thread. These updates were getting skipped when the
Activity gets destroyed (possibly due to onConfigurationChange)
> Unregistering SessionCallback on application onTerminate,
rather than activity onDestroy

Bug: 17941096
Change-Id: Iad4a50871fe09470f26139b44a2e9886833032f1
2014-10-14 14:39:26 -07:00
Sunny Goyal
1a745e8f18 Keeping icons in disabled state when SD-card is unmounted
> changing shortcutInfo.isDisabled to be a flag based variable
> on received OnPackageUnavailable, icons are disabled from desktop
instead of being removed. Icons in all apps are removed

Bug: 15852084
Bug: 16238283
Change-Id: I126d23c709682a917d4bbb84de71032593dce8f9
2014-10-08 11:07:11 -07:00
Sunny Goyal
b50cc8c5d6 Updating icons for sortcuts when the target app updates.
Bug: 17398260
Change-Id: I055abb971d1f72245e8616ac2ce07bcdf37cdd52
2014-10-07 14:56:58 -07:00
Sunny Goyal
2fce90c38a Cleaning up icon resizing code
> For resizing icons, scaling them down instead of cropping them
> Removing duplicate methods and variables

Bug: 17663119
Change-Id: I0f270860c0edaaa939495e63e05da841a603f6e9
2014-10-07 12:04:39 -07:00
Adam Cohen
1a85c5839c Don't let old Launcher activity interfere with new one
-> Launcher uses a static instance of it's loader (across
   multiple activities) since activities can come and go
   (configuration change, eg.) but the data model and loading
   is static.
-> Currently, this is not robust to a sequence of events that
   looks like onCreate(instance A), onCreate(instance B),
   onDestroy(instance B) -- depending on the timing of those
   calls.
-> This CL addresses a symptom of the above scenario by not
   allowing an older Launcher Activity cancel the loader /
   clear the callbacks for a newer Activity.

Bug 17679693

Change-Id: I8ece93e288464b0d578b9669c165b67132d997ed
2014-09-30 10:23:18 -07:00
Sunny Goyal
c5fb59fb9a Fixing loadWorkspace being called multiple times
Using right intent when refreshing shortcut icons

Bug: 17662782
Bug: 17663766
Bug: 17569197
Change-Id: I8d698c5e2145b8412aff9978db4ec930d89f7f24
2014-09-26 01:07:11 +00:00
Sunny Goyal
acefecbff3 Merge "Updating promise icon's bitmap and label when onBadgingChanged is received" into ub-now-porkchop 2014-09-19 19:58:07 +00:00
Sunny Goyal
9448536b11 Adding support to delete unrestored icons and widgets
Bug: 17584719
Change-Id: If8e76fc80ea885c9004c50b7b6a9353525a50105
2014-09-19 12:19:07 -07:00
Sunny Goyal
a22666f681 Updating promise icon's bitmap and label when onBadgingChanged is received
Bug: 17583799
Change-Id: I68b4f9d4086c43bd949ad8b46b574ec78edb32db
2014-09-19 12:16:52 -07:00
Chris Wren
ee52336a9e Turn off debugging for launch.
Bug: 17483474
Change-Id: I8dd24ba08ffe0773f4d68739b30b829021d69902
2014-09-12 14:10:14 +00:00
Sunny Goyal
938a53d864 Don't remove content URI shortcuts during restore
issue: 17373897
Change-Id: I2760f779d89be76cc1ace749b0c1893da80d07e1
2014-09-05 03:40:07 -07:00
Sunny Goyal
349426234e Handling label and icon from SessionInfo.
> The ShortcutInfo stores state as bit flags and not as ints
> Intents of auto-install shortcut are automatically updated
upon installation
> Icons/titles for active sessions are cached in IconCache

Change-Id: I2047849f67d4a8aaf2bc346b58110325bb4807d4
2014-09-04 08:18:33 -07:00
Sunny Goyal
e7b8cd9e4f Improving restored widget behavior
> Clicking a broken widget install shows a dialog similar
to an app icon
> Clicking remove on the dialog removed all components
for the corresponding package
> Widget pending view shows 'Setup' text instead of icon,
if there is enough space

Change-Id: I82ec0a1ee9542c1e3b860e6e00798a80450dce3c
2014-08-27 14:07:05 -07:00
Sunny Goyal
ffe83f1331 Adding support for managed profiles in widget
issue: 16892811

Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
2014-08-20 17:09:18 -07:00
Sunny Goyal
0fc1be164e Updating the ui for widget restore flow
> Pending widget show a PreloadIconDrawable to indicate
installation progress
> Only the concerned widgets are reinflated on package
install and not the whole workspace.
> Adding support for storing default package icon in
IconCache

issue: 10779035
issue: 16737660

Change-Id: Id787ae4a5ef72d6e01aeb5a1bae5ab8840037679
2014-08-12 16:00:03 -07:00
Sunny Goyal
0fe505bf82 Autoinstalls loading xml
> Launcher checkes for an apk in the system image with a broadcast
receiver for action:
com.android.launcher3.action.LAUNCHER_CUSTOMIZATION
> Default layout is parsed from that apk, which can also contain
icons and string resources used in the layout config

Change-Id: I44fc9e7c3134f525f7b5db29f4e8bb56e17ce445
2014-08-12 14:13:18 -07:00
Sunny Goyal
ff57227711 Adding support to restore widgets even for jelly beans.
> Show 'widget-not-ready' until the widget app is installed
> Once the app is installed, bind a new widget id (not required on L if
  id-remap was received).
  **Remove the widget if bind failed
> If the widget has no configuration screen, show the widget, otherwise
  show 'setup-widget'.
> Clicking 'setup-widget' shows the config screen, and updates the
  widget on RESULT_OK.

issue: 10779035

Change-Id: I2f8b06d09dd6acbc498cdd93edc59c26e5ce17af
2014-08-08 14:29:02 -07:00
Sunny Goyal
e755d469d4 Implementing a package install progress listener for L
issue: 15835307

Change-Id: I71aaea087963f2e0e1206447190cbe23c174057d
2014-08-01 14:45:39 -07:00
Sameer Padala
513edaebce Modify code so it compiles on google3
The diamond operator isn't supported on google3 Android projects.

Change-Id: Ie7298b051330bb2cd32426d4c537882faa2f8ebd
2014-07-29 16:17:08 -07:00
Sunny Goyal
05e318d8f7 Fixing spell correcton
Change-Id: I29d980d8073680fafa8fcc01bc2ec81258919da2
2014-07-29 11:49:35 -07:00
Sunny Goyal
87bee403ed Merge "Merging motorola's patch to fix ClassCastException" into ub-now-master 2014-07-22 16:21:19 +00:00
Sunny Goyal
0c4a64451e Merging motorola's patch to fix ClassCastException
issue: 15518616
Change-Id: I7d707f12cb20be9aa24d7ea86051f3712b3534af
2014-07-22 13:56:13 -07:00
Sunny Goyal
651077bdd6 Adding app widget restore support in Launcher3 for android L
When the app is restored, it displays placeholders for all pending widgets.
These placeholders can be moved and removed similar to a widget (size is fixed
to what defined in backup). Once the system notifies the launcher of the new
widget ids, the place holders are replaced with actual widgets.

issue: 10779035

Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055
2014-07-21 10:34:21 -07:00
Sunny Goyal
c5c60ad359 Merging Motorola's patch to disable apps when is safe mode.
issue: 16044192

Change-Id: I10069dcdf459ecc71361271e883eabb743d77822
2014-07-18 16:10:34 -07:00
Sunny Goyal
3484638cad Adding a circular progress bar for preloader icons
Change-Id: I1b5ba61c01a16a8cb5d3f9e31f827f8c99a1ffc9
2014-07-16 13:37:56 -07:00
Sunny Goyal
f599ccfe96 Showing icons for apps on sdcard which are not available during system boot.
issue 15852084

Change-Id: I1e6f59a413581ae3af4219ab32cb5af3d726d382
2014-07-16 18:59:50 +00:00
Kenny Guy
c2bd8101b8 Revert "Revert Cls stopping now-master running on googlefood"
This reverts commit 7bc272a11b.

Conflicts:
	src/com/android/launcher3/BubbleTextView.java

Change-Id: Id1fb2e1249e72658ce5477165c9bcacba9de2b04
2014-06-30 12:30:31 +01:00
Chris Wren
40c5ed3039 Offer to delete broken promise icons.
Track state of promise in the info, not the view.
Fix bugs around moving promises to folders.
Fix bugs around filterign and removing promises.

Bug: 12764789
Change-Id: If5e8b6d315e463154b5bafe8aef7ef4f9889bb95
2014-06-27 15:17:56 -04:00
Sunny Goyal
2a6cf09be9 Fix issue where sometimes duplicate icons are added on homescreen when
installing a package

Shortcuts placed by the user have no package in their intent.
Ensure that this is accounted for when searching for duplicates.

issue: 12888844

Change-Id: I2fb8b7c2b8f7cb74926904bf49a96aeb59a5a9f8
2014-06-27 08:20:23 -07:00
Kenny Guy
7bc272a11b Revert Cls stopping now-master running on googlefood
This reverts commits 01453e855f.
and 242bbe1b72.
"Add content description to bagded icons."
"Remove reflection now we are building against L"

Bug: 15833449
Change-Id: I81a5316f5619a9cd3b6ab9fd03b2ba96657b7f68
2014-06-24 11:43:19 +01:00
Kenny Guy
01453e855f Add content description to bagded icons.
Enabled accesibility so that icons badged by the
managed profile have a content description
that is different to the non-bagdged version.

Bug: 15106236
Change-Id: Id483273173d9539916eebd59111d179087526be3
2014-06-23 16:42:37 +01:00
Kenny Guy
242bbe1b72 Remove reflection now we are building against L
Remove reflection and update changed renamed L APIs
now that branch has L sdk.

Change-Id: I223c6528487110eb328e2e229bbcbefb701e0c20
2014-06-23 13:56:05 +01:00
Adam Cohen
a28b78e838 Fix issue where shortcuts were still being added even if corresponding app is uninstalled
issue 14410162

Change-Id: I7857aace069c4eb4c1ee504088f4526d61e1f30e
2014-05-20 17:04:13 -07:00
Jason Monk
bbe1e24c5f Fix issue where always trying to migrate
Rather than check if the ContentProviderClient is null (which fails
in when using the Redirector), check the PackageManager directly
for the authority we are looking for.

Bug: 14466459

Change-Id: I7420352a15dcea5037196670f18705e7a34f0672
2014-05-16 18:02:21 -04:00
Adam Cohen
71483f417b Removing antiquated migration path logic
-> also added some extra debugging for issue 14466459

Change-Id: I1ac9352c52c15d3e37f945cffabbca49343d2b8f
2014-05-16 12:26:36 -07:00
Chris Wren
0e584b5802 check for long and short component names.
Bug: 14650346
Change-Id: Ic2195a4f60b63f8ec85c42284e0fd58d6f473a9f
2014-05-12 16:10:46 -04:00
Kenny Guy
1317e2dd4a Fix bug with user of shortcut not being remembered over restart.
Intent extra was being set as int rather than long so being
missed.
Also use LauncherApps if neccessary in case where launching
without launch animation.
Unregister for package notifications when terminating.

Bug: 14636181
Change-Id: I1575f6eed806446782092dffe8c01afe7b6507fe
2014-05-08 19:01:16 +01:00
Amith Yamasani
6cc806d678 Watch for profile events and reload
Reload the workspace and all-apps list when a managed profile
is added or removed.

Bug: 14484845
Change-Id: I69210c22e568f2a561266ef2846ddf8f6d659070
2014-05-02 13:47:11 -07:00
Kenny Guy
ed13187a74 Launcher3 multi-profile support
Use LauncherApps API and badging APIs instead of PackageManager.
With compatability layer that uses PackageManager pre L.

Adds support to show apps from current user and any managed profiles.

Background: Managed profiles are user sandboxes that are visible from
the primary user and can be launched as if they are a part of this user.
A launcher should now be capable of listing apps from this user as well
as related profiles of this user.

Launching of activities is now via the LauncherApps interface, to allow
for cross-profile app launching. Only activities with category LAUNCHER
can be added as a shortcut on the workspace for a managed profile.

Widgets and non-application shortcuts are only supported for the
current profile. Widgets from the managed profile are not available.

Change-Id: I5f396b1bf7f91ad91a5710ea4a0fd14573972eb9
2014-04-30 23:43:00 +01:00
Jason Monk
050eaf2a87 Merge "Add synchronization to DeferredBindRunnables" into ub-now-nova 2014-04-23 16:39:12 +00:00
Jason Monk
a0a7a7440e Add synchronization to DeferredBindRunnables
Seems that on occasion the list is being iterated on while being
modified.  To fix this added synchronization to all modifications
to the list as well as iterating on a copy of the list to cut
down on time holding the lock.

Bug: 12885709
Change-Id: I4287bdedbeb8e438b49c1f79b44819a752c28a69
2014-04-22 10:33:33 -04:00
Adam Cohen
a8171169ff am 76ac344c: Merge "Allow the old launcher content URI to be overrided" into ub-now-mister-ugly
* commit '76ac344cb61a74267c04249c9e9feec41a82c504':
  Allow the old launcher content URI to be overrided
2014-04-18 21:32:23 +00:00