summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fixing icon badging being done on scaled bitmap size" into ↵Sunny Goyal2016-01-121-1/+23
|\ | | | | | | | | | | | | | | | | ub-launcher3-burnaby-polish am: 5255c87c6f * commit '5255c87c6f215010aeeb690eed4eae28177b0a93': Fixing icon badging being done on scaled bitmap size
| * Fixing icon badging being done on scaled bitmap sizeSunny Goyal2016-01-081-1/+23
| | | | | | | | | | | | | | | | Launcher already scales the bitmap during the icon creaiton. The badging should be done based on the actual size Bug: 26345646 Change-Id: I1b1f7ac736322ba10db9083d602eec221b99687a
* | resolve merge conflicts of d896ee43cd to ub-launcher3-master.Sunny Goyal2015-12-171-1/+2
|\| | | | | | | Change-Id: If09db8d99e7065c08fcb81b8d97a68a2557d53d7
| * Protecting Icon normalization behind a feature flagSunny Goyal2015-12-171-1/+2
| | | | | | | | Change-Id: I91b7126765049372a3ffec3ad6f661715dc83bab
* | resolve merge conflicts of 39b700fcc5 to ub-launcher3-master.Sunny Goyal2015-12-041-3/+17
|\| | | | | | | Change-Id: I394258be0c75289cab2f5141c0fb765504527420
| * Normalizing app icons based on the standard icon guidelinesSunny Goyal2015-12-021-3/+17
| | | | | | | | | | Bug: 18245189 Change-Id: Iaadcddbe3f966733a13b2e1fb60ba09a8b3aef9a
| * Scaling down the icon before applying the user badgeSunny Goyal2015-11-251-0/+24
| | | | | | | | | | | | | | > This also saves memory only create one new bitmap while loading instead of two Bug: 25027252 Change-Id: Ia594dd65a30f32e99404190f649b334615c9e17f
* | Merge "Skip to the end of the folder open animation in battery saver mode." ↵Tony Wickham2015-11-251-0/+7
|\| | | | | | | | | | | | | | | | | into ub-launcher3-burnaby-polish am: 6e83dc4031 * commit '6e83dc4031b78ac6e65102b2d936e9e769686fec': Skip to the end of the folder open animation in battery saver mode.
| * Skip to the end of the folder open animation in battery saver mode.Tony Wickham2015-11-121-0/+7
| | | | | | | | | | Bug: 25666809 Change-Id: I867d56a34fc5e0ad6aaabd8b6df47be05ec31966
* | resolve merge conflicts of fe3db428ab to ub-launcher3-master.Sunny Goyal2015-10-201-3/+7
|\| | | | | | | Change-Id: Icc60a61f621fefe9db67b178921e62f7d72d7e5a
| * Refactoring getPreferenceKey methodSunny Goyal2015-10-201-1/+6
| | | | | | | | | | | | This method was returnning a constant and getting inlined by proguard. Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
* | Scaling down the icon before applying the user badgeSunny Goyal2015-10-191-0/+23
| | | | | | | | | | | | | | > This also saves memory only create one new bitmap while loading instead of two Bug: 25027252 Change-Id: Ia594dd65a30f32e99404190f649b334615c9e17f
* | resolved conflicts for 1845049c to ub-launcher3-masterWinson2015-10-071-0/+7
|\| | | | | | | Change-Id: I25a01a0735be754f4c8daef5a4a04eaec651b95c
| * Replace Long.compare() with implementation.Winson2015-10-011-0/+7
| | | | | | | | | | | | - Long.compare() was added in API level 19. Change-Id: Ic7020c941403c10daa6feacdc737c6a82676ada0
* | am 81284287: am de9590be: Adding null check when creating icon bitmapSunny Goyal2015-09-281-1/+1
|\| | | | | | | | | * commit '81284287a761a9ee512bd7d4857995fdd8d8dcbc': Adding null check when creating icon bitmap
| * am de9590be: Adding null check when creating icon bitmapSunny Goyal2015-09-281-1/+1
| |\ | | | | | | | | | | | | * commit 'de9590be4ca2779ae0f7f64a48ac8b90472484f8': Adding null check when creating icon bitmap
| | * Adding null check when creating icon bitmapSunny Goyal2015-09-271-1/+1
| | | | | | | | | | | | | | | Bug: 24299267 Change-Id: I596e4a8dbd4e45cffff75e6cf7bbbf7ec45c8ec9
* | | resolved conflicts for e78e3d73 to ub-launcher3-masterSunny Goyal2015-09-251-1/+21
|\| | | | | | | | | | | Change-Id: Idc119a57e21cf6016ee0fd91866839301db072d6
| * | Accessibility fixesSunny Goyal2015-09-251-0/+21
| |/ | | | | | | | | | | | | | | | | | | | | 1) Use a different content description for temporary new page 2) Use different accessibility description for add widget toast 3) Announce when an item is deleted 4) Announce when hovering over a drop target 5) Announce state during drag-n-drop and widget resize (similar to seekbar) Bug: 23573321, 24057944 Change-Id: Icabb317625e70c78e11c0b4f99b9339172d93594
* | am f27cb0e6: resolved conflicts for 8ac727b2 to ub-launcher3-burnaby-polishSunny Goyal2015-09-231-0/+16
|\| | | | | | | | | * commit 'f27cb0e6b1edb2a53de64fdd12d25f400a3acdd9': Using custom threadpool executor instead of the one defined in AsyncTask
| * Using custom threadpool executor instead of the one defined in AsyncTaskSunny Goyal2015-09-231-0/+16
| | | | | | | | Change-Id: I8fe95d932c5de14c74f0576bfc3d1f641d12b448
* | Make sure all overlay panels are visible as user free scrolls.Tony Wickham2015-09-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Previously there was a workaround to ensure that adjacent panels were visible while in the overview or spring-loaded states, but it incorrectly kept only those original pages visible even while the user scrolled to other pages. So now we only use the workaround when first entering the overview or spring-loaded states, and then fall back to the default getVisiblePages() implementation in PageView when in free scoll mode. Bug: 23766408 Change-Id: I692ec00b9cd6d7889c374aee41b85abd0a5d8d3c
* | Removing multi_process access to shared preferencesSunny Goyal2015-08-211-3/+2
| | | | | | | | Change-Id: If802245632c30d4f383013203fb2e0349ebc14fe
* | General code refactoringSunny Goyal2015-08-201-10/+0
| | | | | | | | | | | | | | | | | | > Removing utility method for isAttachedToWindow > Moving logic to calculate cell size from workspace to DeviceProfile > Replacing some constants with xml resource variables > Saving the item info using content values for better compatibility with other methods Change-Id: Idd612633d97a6241cb31148df9466031374bd5a0
* | resolved conflicts for merge of 9fc953b9 to ub-launcher3-masterSunny Goyal2015-08-171-20/+21
|\| | | | | | | Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
| * 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
* | Some cleanup around drag and dropSunny Goyal2015-08-131-14/+12
| | | | | | | | | | | | | | > Instead of resizing the rect for dragoutline in onDrow, store the resized rect itself > Remove unnecessary inverse matrix calculation Change-Id: If13c3c5aaecba5a1d3a4f5d39199ed82e9662c62
* | Enabling framework DND in N+.Vadim Tryshev2015-08-041-0/+12
| | | | | | | | | | | | | | Also, making the drag shadow opaque. Bug: 22028725 Change-Id: I2aa61d3906cb9e9c33003bc6e485b9ff1980b9f4
* | Merge "Removing boot receiver." into ub-launcher3-masterSunny Goyal2015-07-311-0/+15
|\ \
| * | Removing boot receiver.Sunny Goyal2015-07-161-0/+15
| |/ | | | | | | | | | | | | | | > Registering the receiver at runtime, only when it is required > Using system property sys.boot_completed to check if boot completion > This prevents unnecessary process startup during system bootup Change-Id: I68f99ecf2e1ffd2ca7b6d15a99a282451bf67aec
* / Changing the dogfood check to a static boolean to better handle proguard ↵Sunny Goyal2015-07-161-1/+3
|/ | | | | | optimizations Change-Id: I892b88ce1a007fafc23a73ad4193c5c4aa411d1b
* 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