summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherModel.java
Commit message (Collapse)AuthorAgeFilesLines
* Disabling auto addition of managed profile shortcutsSunny Goyal2015-09-271-3/+6
| | | | | Bug: 16188104 Change-Id: Ib6464c22140df6d60112eb35f5983718b3db6288
* Adding shortcuts corresponding to ManagedUsers automatically.Sunny Goyal2015-09-271-37/+100
| | | | | Bug: 16188104 Change-Id: Ic07578dd187263f59f3c431cbb78dea90d0c24f4
* Deleting workspace items from db which have an invalid placementSunny Goyal2015-09-271-22/+6
| | | | Change-Id: I1d616e8cd533acd6ecd334d85e6468163f31f6a4
* Showing widgets in a disabled state, when running in safe modeSunny Goyal2015-09-271-1/+1
| | | | | | Bug: 15172107 Change-Id: I7209836ca4ffacde7b7b232e230e9b9f1a0e54bb
* Updating ItemInfo objects in the worker threadSunny Goyal2015-09-271-88/+123
| | | | | | | | | | | > 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
* Keeping icons in disabled state when SD-card is unmountedSunny Goyal2015-09-271-48/+75
| | | | | | | | | | > 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
* Revert "Show apps as unavailable when on unmounted storage"Danesh M2015-09-271-46/+19
| | | | This reverts commit 53b6e9dd1a97ea59a84e4c8b7172e1773d990ee5.
* Updating icons for sortcuts when the target app updates.Sunny Goyal2015-09-271-24/+43
| | | | | Bug: 17398260 Change-Id: I055abb971d1f72245e8616ac2ce07bcdf37cdd52
* Cleaning up icon resizing codeSunny Goyal2015-09-271-2/+2
| | | | | | | | > For resizing icons, scaling them down instead of cropping them > Removing duplicate methods and variables Bug: 17663119 Change-Id: I0f270860c0edaaa939495e63e05da841a603f6e9
* Adding NPE check in InstallShortcutReceiverSunny Goyal2015-09-271-18/+3
| | | | | | | > Removing some unused methods Bug: 17971165 Change-Id: I1bc5c764fd65b44c950a58371b60d2b53c221995
* Ensure spans do not fall below minimum spans.Martin Brabham2015-09-161-0/+3
| | | | | Change-Id: I2a8546d17f8446000a75bb568c842dbae74f7e4e Ticket-Id: HAM-389
* Trebuchet: Make sure callbacks are available on user change.Adnan Begovic2015-09-111-1/+1
| | | | | | | | | When switching from Owner -> Guest profile, the callbacks for LauncherModel may not be supplied by the incoming restricted user. Change-Id: I15c49f3f30fea9397bee5ae8bde4b0c7f585ae07 TICKET: CYNGNOS-997
* Show apps as unavailable when on unmounted storaged34d2015-07-221-19/+46
| | | | | | | | | This patch allows shortcuts to apps that are currently unavailable due to being on unmounted external storage to remain on the workspace and in folders. The icons will be disabled and grayed out until the external storage is mounted. Change-Id: I971483806b27e3a75ef0d5bb89d8dfb86f97511e
* Loader: use INVALID_RESTORE_PAGE to avoid unnecessarily synchronizingRaj Yengisetty2015-07-141-1/+1
| | | | Change-Id: I55abe9e6dd58ce422270c640fdd900185422f704
* Badge: Check count on bindStephen Bird2015-07-061-1/+5
| | | | | | | | | Fixes bug where badges would not show up after changing languages and other similar situations. Also, stop registering so many receivers when one will do. Change-Id: Id85dbadbc0f99c77493b5817097567ceb365912e
* Fix unintended dynamic grid resize side effects.Matt Garnes2015-06-221-7/+43
| | | | | | | | | | | | | | | | | | | | | | - Do not attempt to resize the grid unless the dynamic grid resize has been explicitly triggered. - Workspace Ids are 1 indexed not 0, so on resize, start at 1. - After resizing the grid, persist the changes to the DB. The initial implementation only did the resize in memory and did not persist this, causing side effects later. Bugs fixed: 1. Resize the dynamic grid from large to small. Add a new icon by installing a new app or adding a shortcut from file manager. The new icon will overlap one on one of the new pages. 2. Resize the grid from large to small in a previous version of trebuchet (before the grid resize feature was added). Icons on the outer edges of the grid will be lost but persist in the DB. Upgrade to a new version of Trebuchet. The icons will return to the workspace. Change-Id: I8b0defafb3299d1f3d534526a75f9253495d739d
* Don't load title from intent if title loaded from DBd34d2015-06-181-3/+5
| | | | | | | | | | Title for shortcuts, when creating workspaces, are loaded from the intent rather than the title stored in the DB. The title from the DB is loaded in the ShortcutInfo so we will use that unless it is null, in which case we'll fallback to loading the title from the intent. Change-Id: I436c11062dbc8ff3d7e1cd9f9564321ad0476933
* Rotation: fix icons disappearingStephen Bird2015-06-111-1/+5
| | | | | | | | | | Only the dynamic grid reload should be stopping the launcher with intent to rebuild the entire workspace. This returns stopLoader to it's functionality pre-dynamic grid resize patch. Change-Id: I55861da83f9b640fd767031e0f2188c5b9b91e66
* Move icons to fit within Dynamic grid upon resize.Stephen Bird2015-06-041-42/+109
| | | | | | | | | | | | If the dynamic grid is made smaller, currently icons will simply be hidden from view. Instead, create extra screens and squeeze the icons in so that they will all be visible upon resize. In some cases, icons can end up creating screens when it's not necessary we should revisit this at a later time and look into making these icons show up in a more expected place. Change-Id: I9a46f1ac45c1a04e252ed8943afcfe952df1392d
* Trebuchet Statistics:Martin Brabham2015-05-281-3/+31
| | | | | | | | - Add plumbing for sending events. - Add aggregation service that runs on some interval - Hook send events into respective UX interactions Change-Id: I77ba0ab75daf845621d800e0adf3e658096926af
* Trebuchet: fix Protected apps issue with foldersRoman Birg2015-04-161-3/+6
| | | | | | | | | | | | | | | | When there's a folder of shortcuts where all of the items have been set to protected, the first item in the folder sometimes does not get removed from the workspace allowing access to the protected application. When the second-to-last item in a folder is being removed, it was being replaced with the shortcut automatically, and we were checking against the folder contents, which was off the workspace at this time, but still had the shortcut. We need to check whether the last shortcut we are re-adding back to the workspace is actually protected before adding it. Change-Id: I9c7dbbd8562ae3e71e198747e6cb1c10417d1f46 Signed-off-by: Roman Birg <roman@cyngn.com> (cherry picked from commit d06291251703ce19968625742438c03351203d37)
* Trebuchet: Fix Settings shortcut widget title displays wrong when changing ↵yong.zou2015-04-151-0/+19
| | | | | | | | | | | | system language 1.Add a Settings shortcut widget to workspace 2.Change the system language 3.Check the Settings shortcut widget title The Settings shortcut widget title should update when changing the language Change-Id: I5012a3e99b9734230a844ce20e856ff86fba773a
* Protected Apps: Re-add filtering in App Drawer and fixing protected foldersRaj Yengisetty2014-12-021-0/+2
| | | | Change-Id: Ia0899f79248647dbacf44cf917a27ebe62d20e4d
* Protected Apps: Delay Protected Apps changed reload till onResumeRaj Yengisetty2014-12-021-3/+13
| | | | Change-Id: I54724187c3ab168a3beb0791852a1c842bdbabf9
* Launcher: show unread notify info number at APP icon on Launcherhuiwan2014-11-211-0/+65
| | | | | | | | | | Show APP's unread info number at Launcher: - Register a receiver to receive the UNREAD_CHANGED event to update the APP icon - When the unread number changed, recreate the icon bitmap of icon cache Change-Id: I7dd0fb2c29959f1584682965fb1476e3f3c77739
* Customizeable Dynamic Grid:Raj Yengisetty2014-11-191-0/+2
| | | | | | | | | | | | | | | | | | | - Presets - Comfortable (+0) - Cozy (+1) - Condensed (+2) - Custom option with min, max Reordering items in the settings pane for better organization Modifying Settings Layout for readability Conflicts: res/layout/settings_pane_list_item.xml res/values/cm_strings.xml src/com/android/launcher3/DeviceProfile.java src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java Change-Id: I5c926b6ca4b2ed73c263ef34eeb368caeb7af9b5
* Protected App [3/3] Trebuchet - Protected Apps - Build fixed to work with ↵Raj Yengisetty2014-11-191-0/+107
| | | | | | | | | | | | | | | | | LOCAL_SDK_VERSION - Fixed adding components to protected folders and adding protected folders to other folders - Fixed issues with EditText for FolderName - Adding support for Settings hooks - Uses Setting's LockPattern for Protected Apps - Add Read from Settings Secure DB (DO NOT WRITE!) - Protecting a folder updates Launcher without restart - Batch send component visibility Conflicts: AndroidManifest.xml res/values/preferences_defaults.xml src/com/android/launcher3/AppsCustomizePagedView.java src/com/android/launcher3/Folder.java src/com/android/launcher3/FolderIcon.java src/com/android/launcher3/Launcher.java src/com/android/launcher3/LauncherModel.java src/com/android/launcher3/LauncherProvider.java src/com/android/launcher3/OverviewSettingsPanel.java Change-Id: I41c295e7f2c9abc9b2e77e6e3d39b7ca60d47139
* PagedView: Transition EffectsNebojsa Cvetkovic2014-11-191-0/+16
| | | | | | | | | | | | | | | | Conflicts: res/layout/overview_panel.xml res/values/cm_arrays.xml res/values/cm_strings.xml res/values/dimens.xml res/values/preferences_defaults.xml src/com/android/launcher3/AppsCustomizePagedView.java src/com/android/launcher3/Launcher.java src/com/android/launcher3/PagedView.java src/com/android/launcher3/Workspace.java src/com/android/launcher3/settings/SettingsProvider.java Change-Id: Ib134705952877165c334181548d577b3dceece68
* DO NOT MERGESunny Goyal2014-10-141-0/+59
| | | | | | | Rechecking unrestored items when launcher gets created Bug: 17941096 Change-Id: Ic54464a9c64442d6784cda44ef22fa3d08e22f1f
* Don't let old Launcher activity interfere with new oneAdam Cohen2014-09-301-0/+4
| | | | | | | | | | | | | | | | | | -> 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
* Fixing loadWorkspace being called multiple timesSunny Goyal2014-09-261-4/+4
| | | | | | | | Using right intent when refreshing shortcut icons Bug: 17662782 Bug: 17663766 Bug: 17569197 Change-Id: I8d698c5e2145b8412aff9978db4ec930d89f7f24
* Merge "Updating promise icon's bitmap and label when onBadgingChanged is ↵Sunny Goyal2014-09-191-0/+14
|\ | | | | | | received" into ub-now-porkchop
| * Updating promise icon's bitmap and label when onBadgingChanged is receivedSunny Goyal2014-09-191-0/+14
| | | | | | | | | | Bug: 17583799 Change-Id: I68b4f9d4086c43bd949ad8b46b574ec78edb32db
* | Adding support to delete unrestored icons and widgetsSunny Goyal2014-09-191-14/+46
|/ | | | | Bug: 17584719 Change-Id: If8e76fc80ea885c9004c50b7b6a9353525a50105
* Turn off debugging for launch.Chris Wren2014-09-121-1/+1
| | | | Bug: 17483474 Change-Id: I8dd24ba08ffe0773f4d68739b30b829021d69902
* Don't remove content URI shortcuts during restoreSunny Goyal2014-09-051-0/+4
| | | | | issue: 17373897 Change-Id: I2760f779d89be76cc1ace749b0c1893da80d07e1
* Handling label and icon from SessionInfo.Sunny Goyal2014-09-041-58/+73
| | | | | | | | | > 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
* Improving restored widget behaviorSunny Goyal2014-08-271-52/+64
| | | | | | | | | | | > 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
* Adding support for managed profiles in widgetSunny Goyal2014-08-201-62/+18
| | | | | | issue: 16892811 Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
* Updating the ui for widget restore flowSunny Goyal2014-08-121-2/+2
| | | | | | | | | | | | | | > 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
* Autoinstalls loading xmlSunny Goyal2014-08-121-1/+1
| | | | | | | | | | > 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
* Adding support to restore widgets even for jelly beans.Sunny Goyal2014-08-081-25/+37
| | | | | | | | | | | | | | | > 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
* Implementing a package install progress listener for LSunny Goyal2014-08-011-3/+4
| | | | | | issue: 15835307 Change-Id: I71aaea087963f2e0e1206447190cbe23c174057d
* Modify code so it compiles on google3Sameer Padala2014-07-291-3/+4
| | | | | | The diamond operator isn't supported on google3 Android projects. Change-Id: Ie7298b051330bb2cd32426d4c537882faa2f8ebd
* Fixing spell correctonSunny Goyal2014-07-291-2/+2
| | | | Change-Id: I29d980d8073680fafa8fcc01bc2ec81258919da2
* Merge "Merging motorola's patch to fix ClassCastException" into ub-now-masterSunny Goyal2014-07-221-3/+3
|\
| * Merging motorola's patch to fix ClassCastExceptionSunny Goyal2014-07-221-3/+3
| | | | | | | | | | issue: 15518616 Change-Id: I7d707f12cb20be9aa24d7ea86051f3712b3534af
* | Adding app widget restore support in Launcher3 for android LSunny Goyal2014-07-211-21/+55
|/ | | | | | | | | | | 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
* Merging Motorola's patch to disable apps when is safe mode.Sunny Goyal2014-07-181-0/+2
| | | | | | issue: 16044192 Change-Id: I10069dcdf459ecc71361271e883eabb743d77822
* Adding a circular progress bar for preloader iconsSunny Goyal2014-07-161-0/+1
| | | | Change-Id: I1b5ba61c01a16a8cb5d3f9e31f827f8c99a1ffc9