summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
Commit message (Collapse)AuthorAgeFilesLines
* Trebuchet: Move allow rotation pref to overlay panelcretin452017-03-261-8/+6
| | | | Change-Id: I83feccbf5aac5de53ca578c4d62a25561d72b3ee
* Trebuchet: Add DB migrationcretin452017-03-261-0/+10
| | | | Change-Id: Ic470848380ede33ba52e71d453d5328a23160b48
* Reimplement CM Settings Overview Panel in the new Launcher Part 2Yvonne Wong2017-03-261-0/+8
| | | | | | | - Enables hiding the search bar from the workspace - Adds a reload launcher flag to reload only during onResume or newIntent if needed Change-Id: I0feb279f9003b268b5a129cef40d3665787ee451
* Version code cleanupSunny Goyal2015-08-171-20/+21
| | | | | | | | > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
* Merge "Adding custom slide up activity transition for L MR1" into ↵Adam Cohen2015-07-081-0/+5
|\ | | | | | | ub-launcher3-burnaby
| * Adding custom slide up activity transition for L MR1Adam Cohen2015-07-071-0/+5
| | | | | | | | | | | | issue 21402755 Change-Id: Id2542c0a3c38bd71aa407a3b0fe00fdee24e2f69
* | Using cellX and cellY for comparing position when rank is not availableSunny Goyal2015-07-061-8/+0
|/ | | | | Bug: 22059402 Change-Id: I69ec2b9b68610e171e76cd968de77aaed669672c
* Removing junit.framework.AssertSunny Goyal2015-06-261-4/+3
| | | | | Bug: 22124692 Change-Id: Ie9c920ec6ef9631392a70b9ab2a5659ba23385b3
* Fixing backup restoreSunny Goyal2015-06-251-3/+14
| | | | | | | | | | | | | | | > 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
* Refactoring fast scroller.Winson Chung2015-06-231-0/+19
| | | | | | | | | | | | | - 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
* Merge "Deleting empty folders based on DB state" into ub-launcher3-burnabySunny Goyal2015-06-181-0/+6
|\
| * Deleting empty folders based on DB stateSunny Goyal2015-06-121-0/+6
| | | | | | | | | | | | | | | | | | > Previously folders were getting deleted based on in-memory loader state. If for some reason, an item failed to load, we would delete the folder from DB as well. Bug: 21354058 Change-Id: I5318ee8a99afa9cafd93ed2b9ef0e155f502a41b
* | Read rotation setting correctly from the wallpaper picker.Rahul Chaturvedi2015-06-151-2/+3
|/ | | | | | | | | If reading the rotation setting without the multi-process flag, the WallpaperPickerActivity usually picks up a cached value. Specifying the multi-process flag during the read fixes this and the wallpaper picker always has the correct rotation setting. Change-Id: Ic3639f8cd694674e92c8940b753c6bc30486076d
* Using content provider to update launcher settingsSunny Goyal2015-06-121-5/+2
| | | | | | | | > Removing cross process preference file > Removed broadcast listener management for settings changes > Defining content provider method to get/set laucnehr preferences Change-Id: Ida36eac0ab17c1d48fedc9404817a53a89b36c4f
* Merge "Ensuring that we use the screen width more optimally in AllApps." ↵Winson Chung2015-06-051-1/+10
|\ | | | | | | into ub-launcher3-burnaby
| * Ensuring that we use the screen width more optimally in AllApps.Winson Chung2015-06-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | - Fixing issue with prediction bar height being calculated incorrectly - Fixing issue where the prediction bar divider was not drawn exactly between the bar and the first row of apps - Removing padding to allow scrollbars to reach full height Bug: 20222023 Bug: 21335377 Change-Id: I2c0614a36e2294d0d6184a6bff4847876ffe971e
* | Use a broadcast receiver instead of a settings observer.Rahul Chaturvedi2015-06-041-0/+3
|/ | | | | | | | Settings observer doesn't work if a setting is modified in another process, hence we instead register a receiver which listens for a signal from the settings process that the rotation preference has changed. Change-Id: I570e3c67bb64a32347e84ca00a8ac31d9010eac3
* Fixing different bitmap sizes in different orientationsSunny Goyal2015-06-031-51/+21
| | | | | | | | | > Using a single bitmap icon size > Picking up appropriate density for satisfy the required icon size > Fixing some icon size assumptions during icon animations Bug: 19514688 Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
* Add the Allow Rotation setting to Launcher3.Rahul Chaturvedi2015-06-011-4/+13
| | | | | | | | | | | | This CL adds a Settings activity along with the code needed to provide a "Allow Rotation" setting to all phones and tablets. This setting is set to false for phones and true for tablets. On changing the setting from unlocked to locked, the launcher (and the Settings activity) will get locked to the orientation the user was in when he disabled "Allow Rotation". This is consistent with how the natural rotation feature of Android works. Change-Id: I8a1c59d1fa0bb9262530cad96e0a9bdbab0d9344
* Make sure all transition components run on the same threadAdam Cohen2015-05-271-1/+5
| | | | | | | | | | | -> The framework circular reveal transition runs on the render thread which can cause problems when mixed in an AnimatorSet with transitions that don't run on the render thread -> See issue 17556455 issue 21445293 Change-Id: Ie19c184c55060651e817d426ec83049b06af56ba
* Refactoring DeviceProfileAdam Cohen2015-05-211-0/+15
| | | | | | | | | | | | | | | | | | | | -> Pulling out the parts of device profile which can (and need to be) initialized and accessed without access to an Activity context, ie. the invariant bits. -> The invariant bits are stored in InvariantDeviceProfile which is initialized statically from LauncherAppState. -> The DeviceProfile contains the Activity context-dependent bits, and we will create one of these for each Activity instance, and this instance is accessed through the Launcher activity. -> It's possible that we can continue to refactor this such that all appropriate dimensions can be computed without an Activity context (by only specifying orientation). This would be an extension of this CL and allow us to know exactly how launcher will look in both orientations from any context. Sets the stage for some improvements around b/19514688 Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
* Icons are not updated to TYPE_APPLICATION during restoreSunny Goyal2015-05-211-2/+21
| | | | | | | | | | > Use low res only for app shortcuts > Running icon migration after restore > Running icon migration again for all users > Deduping shortcuts added from widget tray Bug: 20945600 Change-Id: I3bb47545fdd9832510069026fbae8966d2311cc1
* Load PackageItemInfo in background thread to prevent ANRHyunyoung Song2015-05-211-0/+9
| | | | | | | | | | | - Decoupled widget model from widget view, and placed the creation to LauncherModel. - As a result packagemanager operation, iconcache retrieval is all done inside LauncherModel on background thread b/21311085 b/21325319 Change-Id: I294698527db58b89f3da558090a367530c058776
* Don't try and trim null strings.Winson Chung2015-05-151-0/+4
| | | Bug: 21161481
* Various lint error fixes.Sunny Goyal2015-05-141-0/+6
| | | | | | | | > Fixing some RTL errors by specifying both marginStart and marginLeft > Moving all layout direction checks to Utilities > Explicitely adding @TargetApi before every method Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
* Trim all whitespace from titles and labels.Winson Chung2015-05-081-0/+15
| | | | | | Bug: 20953160 Change-Id: I1610df5e445a4139522226f68fa6439926bc70c6
* Removing some unused method params from CellLayoutSunny Goyal2015-04-241-0/+33
| | | | | | | > Replacing various distance calculations with Math.hypot > Moving findVacantCell to Utilities Change-Id: I0cb194b603e52b3bb2b29a095bb4da2bb408ab13
* Rewrite: Widget preview loader logicSunny Goyal2015-03-201-0/+21
| | | | | | | | | > Widget previews are saved in data dir instead of cache dir > Expiring widget previews similar to IconCache > Removed support for setting thread priorities Bug: 19865031 Change-Id: Ib6033c2b1ff8ae61bba8762ca994ccd8217d3c75
* Updating IconCache to maintain a persistent of iconsSunny Goyal2015-02-261-0/+11
| | | | | | | | | | > IconDB maintains a DB of icons keyed on ComponentName + User > During loader, icons & labels are loaded first from the DB, and if the entry doesn't exist, loaded using packageManager > After the loader completes, IconDB updates any entry which might have changed, while the launcher was dead. Change-Id: I7a6021cb6d1ca1e66fa5a0bdd21e1543e0cf66fc
* Adding a rank column for itemInfoSunny Goyal2015-01-131-0/+9
| | | | | | | | > Rank is used to determine position of an item in a folder. Bug: 18590192 Change-Id: I2826a7c570b4cc58e719d685f17a24ec6133804f
* Updating version codes from L to LOLLIPOPBrian Parfett2014-12-121-1/+1
| | | | | | | This is required so Launcher3 can compile within IntelliJ. Change-Id: I99a98a6d2326a8f8b0f0320430de9b555ea430c6 Bugs: b/18720914
* Merge "Using the default search widget in Launcher3" into ub-now-queensSunny Goyal2014-11-121-2/+36
|\
| * Using the default search widget in Launcher3Sunny Goyal2014-11-111-2/+36
| | | | | | | | | | | | | | | | | | | | > Removing all logic related to search and voice overlays from Launcher3 > Using the widget provided by global search provider on the homescreen > Removing VoiceButtonProxy, as it is not being used anymore Change-Id: Ie8b09b44f7213c8fa11bce685914442e4884295d
* | Removing some duplicate methodsSunny Goyal2014-11-111-1/+1
|/ | | | Change-Id: I8a1295ab74890984e8d8508aaa18fd79ac2a032d
* Using a proxy call for isAttachedToWindow for pre 19 devicesSunny Goyal2014-11-051-0/+13
| | | | | Bug: 17423114 Change-Id: I6f0cc306b7fcc8087b4e4fc92bb8796d51a989d6
* Updating icons for sortcuts when the target app updates.Sunny Goyal2014-10-071-0/+21
| | | | | Bug: 17398260 Change-Id: I055abb971d1f72245e8616ac2ce07bcdf37cdd52
* Cleaning up icon resizing codeSunny Goyal2014-10-071-50/+11
| | | | | | | | > For resizing icons, scaling them down instead of cropping them > Removing duplicate methods and variables Bug: 17663119 Change-Id: I0f270860c0edaaa939495e63e05da841a603f6e9
* Update calls now we have an L API version.Kenny Guy2014-09-181-4/+3
| | | | | Bug: 17543647 Change-Id: I92c652a4ced5a5e783b24e42f9da4d9dfe1118ba
* Adding support for managed profiles in widgetSunny Goyal2014-08-201-1/+1
| | | | | | issue: 16892811 Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
* Further refinement of all apps / widgets transitionAdam Cohen2014-08-131-0/+21
| | | | Change-Id: Id107a9aff74f014c07f8cbea6e74951a02dbddab
* Autoinstalls loading xmlSunny Goyal2014-08-121-4/+23
| | | | | | | | | | > 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
* Updating the virtual preloader UX.Sunny Goyal2014-08-111-0/+81
| | | | | | | | | | | | > No click feedback when in preloader mode > No preloader UI when drawn in drag layer > The preloader consists of a background 9 patch image and a circular progress is drawn in the content region of the background. > The preloader is drawn in a slightly larget area than the actual bounds to make the circular progress more prominent compared to the icon. issue: 15835307 Change-Id: Ifec3d93ecf1fac994d1128b517da3797247e7ed6
* Merging Motorola's patch to disable apps when is safe mode.Sunny Goyal2014-07-181-17/+32
| | | | | | issue: 16044192 Change-Id: I10069dcdf459ecc71361271e883eabb743d77822
* Use transparent system bars on LSandeep Siddhartha2014-05-161-0/+9
| | | | Change-Id: I1e8921fa0e8a5bdf34495f9d88ba9f3b1f1e9c89
* Fix long press after already moving off iconJason Monk2014-04-221-0/+11
| | | | | | | | | | | | | When an icon is in the Hotseat and a user drags off from the icon, but continues holding down, the icon gets a long press triggered by the CheckLongPressHelper. To fix this a check has been added on move events to see if the point has moved outside the view and to cancel the long press check callback if it has. Bug: 13569451 Change-Id: Id175cdc220d70b5e9f8e492ed5a3cc7c3f11db10
* Create separate project for Wallpaper PickerMichael Jurka2013-12-131-0/+16
| | | Change-Id: Id9e855780b9fb68c63eb6e9f6c19bcbce28a6fd5
* Add support for initiating a drag from an overlay.Mathew Inwood2013-11-201-2/+2
| | | | | | This allows an overlay to create apps and shortcuts on the home screen. Change-Id: I63ee4ef02db3f4bc89726c394fd55ad26f50452c
* Ensuring that we are calling setCompoundDrawable() instead of using ↵Winson Chung2013-10-141-0/+1
| | | | | | intrinsic bounds. (Bug 11203738) Change-Id: Ic2100e4008d7fc95d2670aab9d3b46a96a927599
* Workaround for small icons. Draw icon drawables at the expected icon size. ↵Winson Chung2013-10-131-0/+16
| | | | | | (Bug 11203738) Change-Id: If976ae8b3603e8bf42e8e857ce0b178d977b0a43
* Initial changes for new clings. (Bug 11142616)Winson Chung2013-10-091-0/+17
| | | Change-Id: Id66ebceb99449941921d9e617dfe0cc05a2e3b65