Commit Graph

47 Commits

Author SHA1 Message Date
Sunny Goyal 9c83a0da6d Cleaning up some resources in WallpaperPickerActivity
Change-Id: I4923403c0c094d0ae0b00e3a08a13099c3addb10
2015-02-26 19:33:38 +00:00
Sunny Goyal 9f9d0a59c4 Picking a bitmap to reuse where least pixels are wasted
Change-Id: I4217bc68a5caa2d1526e4ebb101dbaf0348066d3
2015-02-25 11:53:26 -08:00
Sunny Goyal 65b929d6f2 Reducing memory usage of wallpaper picker
> Loading preview bitmap only once, instead of loading it twice at BitmapRegionTileSource and BitmapSource
> Maintaing a weak-set of reusable bitmaps and reusing them for decoding bitmaps
> Loading images on a HandlerThread (instead of AsyncTask) and removing any non-started task before submitting a new task
> Loading inbuild images (from resources) on HandlerThread instead of UIThread
> Freeing up unbound GL textures before binding a new texture.

Bug: 18382606
Change-Id: Ic4ca630dd113ded65d2853eb0d291c9e5823637e
(cherry picked from commit 283c2261bd)
2015-02-24 23:18:25 +00:00
Sunny Goyal f3e4f548fd Merge "Moving some files and methods around" into ub-launcher3-master 2015-02-20 01:54:31 +00:00
Sunny Goyal 9026271410 Merge "Fixing logic to determine if wallpaper change." into ub-launcher3-master 2015-02-20 01:50:47 +00:00
Sunny Goyal 35746d6029 Merge "Removing unused BlockingGLTextureView" into ub-launcher3-master 2015-02-12 22:26:48 +00:00
Sunny Goyal 06a4d3f1af Moving some files and methods around
> Removing android.util package
> Moving static methods and classes out of WallpaperCropActivity
> Removing some unused utility methods

Change-Id: I252a0655ddce195189b6b3f0bf92970e5808c9d7
2015-02-12 12:25:56 -08:00
Sunny Goyal c7eef37512 Removing unused BlockingGLTextureView
Change-Id: Iac5aec1193e53dd554f61d07201bac06178914f5
2015-02-12 10:13:09 -08:00
Sunny Goyal fddef4634c Fixing logic to determine if wallpaper change.
> Current logic to determine if livewallpaper changed returns true all the time
> Use returnCode passed by the calling activity.

Change-Id: Ida800a90451b1f7d368234e1a7e10938dcf2f6f7
2015-02-12 10:01:15 -08:00
Sunny Goyal 6f553b975f Fixing last image thumb, being loaded twice
Change-Id: I241e472a3f0869b82066163514fb2c29c0f18a8f
2015-02-12 09:58:04 -08:00
Sunny Goyal 5736ed319d Merge "Removing usage of reflection." into ub-launcher3-master 2015-01-21 01:13:27 +00:00
Sunny Goyal d009101232 Removing usage of reflection.
> Updated launcher.java with the new APIs
> Removed unused method in BitmapUtils

Change-Id: I24804d2cd7d9fc45040532e8324672f5ea6fc110
2015-01-20 15:56:23 -08:00
Sunny Goyal c46bfef5df Removing support library dependency
> Removed FolderAutoScrollHelper as folders are currently not scrollable

Change-Id: I261f43a665b742697e3224e1e9852ccc526badcd
2015-01-20 11:49:12 -08:00
Helena Josol 28db280b7a Add more Launcher files to delete on Clear Launcher Data
Bug: 12753154
Change-Id: I00679bdc6eff70a1398122aaa955c08eabd556b1
2014-10-16 17:35:50 +01:00
Helena Josol 4fbbb3e3e0 Create a central list of files the Launcher writes to the app directory
Replace hardcoded Launcher filenames with the defined constants.

Bug: 12753154
Change-Id: I072f202d9388a703b9e6851bde64ea7fafe4b10a
2014-10-06 17:08:10 +01:00
Adam Cohen 4ae96ce92d Add ability for Partner customization apk to override certain DeviceProfile params
-> Workspace row / col counts
-> All apps row / col counts
-> Workspace icon size

issue 17208277

Change-Id: I25cfafede4da783083593b9bfeff4e5ba7751d36
2014-09-04 15:12:55 +00:00
Sunny Goyal 0af0d8422b Saving the system wallpaper thumbnail prefixed by the SDK_INT
so that it is recreated after a system update.

issue: 15670065

Change-Id: I237ef1d99676d5a0ac6ff7b4a80a7a72905ef1ed
2014-08-13 12:16:59 -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
Adam Cohen f24c61295d Add partner customization option to force first run flow
Change-Id: Id50587cbb95e375b3847597f12bd8566c70dd7bc
(cherry picked from commit 923e1de9f0d7672dd18947ecde2b0da8c5768b7a)
2014-08-08 04:31:24 +00:00
Adam Cohen 8dc6e1bfa2 Fix SecurityException when exiting wallpaper picker early
issue 16155967

Change-Id: Iba1add737089b73e6e5bbfb143dce4204fa9dc7c
2014-07-24 10:48:20 -07:00
Sunny Goyal 0c625eeec2 Merge "Adding options in the partner apk to disable the default wallpaper and provide a folder containing additional wallpapers" into ub-now-master 2014-07-23 18:44:51 +00:00
Sunny Goyal e9bacd9c2b Fixing memory leak in WallpaperCropActivity
issue 15516788

Change-Id: I6feb4cb72052bc7f19e9c30957bff7dcccd5bc9d
2014-07-22 09:39:01 -07:00
Sunny Goyal cdc4dbd878 Adding options in the partner apk to disable the default wallpaper and
provide a folder containing additional wallpapers

issue: 16045459

Change-Id: Id411121ff552d0d270258a5b371d1fd756bd7884
2014-07-16 16:19:23 -07:00
Adam Cohen 56c2acc3df Add method to check if there is a partner folder
Change-Id: I6154c731edfeb2a4fc0aed94f74a556059b5d103
2014-06-12 18:04:10 -07:00
Adam Cohen c8d31ff228 Add null check for empty MediaStore cursor
issue 15397853

Change-Id: I1c28262e181a4f32e1f7a58813121db72746d6a8
2014-06-12 12:37:55 -07:00
Adam Skory 5fbdd06489 Squash unreachable catch
The compiler warning distracts me often.

Change-Id: I0192314f4ac9d8e3acb40dd10a39de297affcdac
2014-06-04 18:13:49 +01:00
Adam Cohen 9b8f51fcc8 Adding ability for partners to specify a default layout
Change-Id: Ib071faa4b41d13961c3a33b865b40a644631c08a
2014-06-02 11:06:47 -07:00
Adam Cohen ea90f83e24 Check before suggesting default wallpaper dimensions
issue 14470153

Change-Id: Id00e9cb4bd2b769818ed61de65be8c1c0119e07d
2014-05-21 17:13:40 -07:00
Sameer Padala e697a9a042 Move Partner.java into the Wallpaper directory.
WallpaperPicker depends on this and have this class in Launcher3 would cause a
circular dependency in google3

Change-Id: Ia582bcb988a4f6375904660546b1bc1744d25238
2014-05-02 15:06:35 -07:00
Jeff Sharkey 5aeef58131 Add support for partner customization.
Traditionally Launcher workspace customization is offered through
overlays at build time, but we don't have access to partner-specific
customization at build time.  To solve this, this adds a new
"partner-folder" tag which points at an XML resource provided by
an external package.

The external package XML can't depend on the binary XML attributes
defined by Launcher3, so we switch to using manual string-based
attribute lookups.  Partners can also provide extra wallpapers.

When a folder only results in a single item, promote that item into
the folder location instead of deleting completely.

Bug: 13340779
Change-Id: Ide558288bef4113565f288b700d8245055c0fee9
2014-04-22 12:28:51 -07:00
Selim Cinek 314425602a Fixed crash when setting wallpaper with built in rotation
If an image had a built-in rotation, a crash could occur,
when setting it. An example was a panorama image which had
a rotation of 90 degrees.

Change-Id: Iede8226dac3a40f08d39a69162eb388e6aba97ec
Bug: 13507421
2014-03-27 20:35:19 +01:00
Selim Cinek 7c989e90e8 Fixed wallpaper bug where wrong size was taken when cropping
When cropping, the selected area of the image was incorrectly
cropped to the size of the view instead of the size of the image

Bug: 13617446
Change-Id: I0b40711c04f3d3b5929e7bb037d6cf21d4bb5bcb
2014-03-24 14:13:20 +01:00
Selim Cinek e04e8b2a14 Fixed a crash when an image with an odd width/height was selected
Due to an internal rounding in the renderer, the calculations
for the cropping area could be slightly offset, getting out
of the image boundaries. I sanitized the rect by ensuring they
are inside the image.

Bug: 12174629
Change-Id: I5e08c83fe3e9cd48254fa6c8ba9cef77ab8a51a6
2014-03-14 18:27:23 +01:00
Selim Cinek 459875d09e Catching security exception when activity destroyed
Fixed a bug where an asynctask tried to load an image
even after the activity was destroyed leading to a
security exception since the permission could not be granted anymore.

Bug: 12760267
Change-Id: I76ee2c0ab268b0ab4bde606706046caf0e39f1e9
2014-03-05 14:56:42 +01:00
Selim Cinek 0c255a9467 Merge "Changed behaviour of the wallpaper picker." into ub-now-lunchbox 2014-03-04 09:48:32 +00:00
Selim Cinek ffed65886e Changed behaviour of the wallpaper picker.
When opening the picker, the currently chosen wallpaper is
shown in the background.
In this change also the nullpointer was fixed when deleting
the currently selected wallpaper and setting it, because we
revert to the old wallpaper in that case.
When going into the same live wallpaper than the currently
selected we are going back to home if the user sets it or
goes back now, in order for the user not to loose state.
The real fix for this will be done later when the following
bug will be fixed: b/13241760

Bug: 12063773
Bug: 13219612
Change-Id: I7c6abb25755eca99c3255278e0884d1ff4749b55
2014-03-03 18:09:06 +01:00
Christoph Studer 8657bac9b5 Merge "Guard against null default wallpaper" into ub-now-lunchbox 2014-03-03 16:00:06 +00:00
Christoph Studer 7084c606eb Guard against null default wallpaper
Deal with WallpaperManager.getBuiltInDrawable() returning null.

Bug: 13109487
Change-Id: Ib5665a0eb947e9784cdcd0e8dfab1a01b4deca82
2014-03-03 15:35:25 +01:00
Selim Cinek 3aa28319ce Changed inconsistency when selecting default wallpaper, where it did not go back to home.
Bug: 13219313
Change-Id: I4961c6724a1550dbae126f97e45dc166cbe9a565
2014-02-28 18:03:15 +01:00
Selim Cinek c13e0a5cf1 Fixed visibility issue of save button in case the url loading failed
Bug: 12953091
Change-Id: Idc640532e2c2c6143d49d330bd541682eca64ac5
2014-02-25 14:23:57 +01:00
Michael Jurka b1f50d70e9 Catch exceptions if Exif is malformed
Bug: 11650650

Change-Id: Iee8f1675850c692fe54dc619f3e969ba180e4206
2014-01-23 15:26:50 +01:00
Michael Jurka 849aff7553 Disable Set Wallpaper button while loading image
Bug: 12472111

Change-Id: I2a0cba47f31af2416b0dd062929f277fcbf80481
2014-01-17 13:30:11 +01:00
Jorim Jaggi 1b921efc84 Keep selected wallpaper on configuration change.
Keeps the currently selected wallpaper when a configuration (for example,
device rotation) occurs. This change also effects the logic when the thumbnail
gets displayed after loading the image from an external URI, as this must be
now handled independently of which wallpaper is selected.

Bug: 11007874
Change-Id: Id676c378aec38d0b21e5d9150846f33aff415cad
2014-01-14 16:05:53 -08:00
Michael Jurka 4808aa6b42 Add ability to center the crop (disabled) 2014-01-14 13:50:53 +01:00
Michael Jurka 8b51b17320 Move saved wallpaper images from cache directory to data directory
Bug: 12028275

Change-Id: Ia8fdd0ea50a4dad34e560287c50ae3fcc6d09cf9
2014-01-09 14:34:19 +01:00
Michael Jurka 34c2e6cf7a Clean up imports 2013-12-13 16:20:53 +01:00
Michael Jurka 7ad868b86e Create separate project for Wallpaper Picker
Change-Id: Id9e855780b9fb68c63eb6e9f6c19bcbce28a6fd5
2013-12-13 12:50:32 +01:00