diff options
author | Owen Lin <owenlin@google.com> | 2011-09-13 20:48:13 +0800 |
---|---|---|
committer | Wei Huang <weih@google.com> | 2011-09-19 16:22:44 -0700 |
commit | 27a7e7b36ed5a42a0983a922db4df30b8fd154af (patch) | |
tree | c01a76c0baef785decb9f713121051884be5c468 | |
parent | 34c6eae8e431b97e386291acf059656211c736c7 (diff) | |
download | android_packages_apps_Snap-27a7e7b36ed5a42a0983a922db4df30b8fd154af.tar.gz android_packages_apps_Snap-27a7e7b36ed5a42a0983a922db4df30b8fd154af.tar.bz2 android_packages_apps_Snap-27a7e7b36ed5a42a0983a922db4df30b8fd154af.zip |
Add a hard limit on the size of the widget images.
There is a limit on the size of the data transfered by binder.
For now, we just add a hard limit (360 pixel) to ensure the widget's image
can be passed by binder.
Also adjust the size of widget to make it looks better.
Fix a bug in DecodeUtils which cause OOM for a image in size 12200x1920.
In that case, we should generate a screen nail of size 640x101 instead of
4066x640.
Change-Id: Ia8227d8e5368471fe7af94bf164d67017aa321fa
fix: 5273271
-rw-r--r-- | res/values-xlarge/dimensions.xml | 6 | ||||
-rw-r--r-- | res/values/dimensions.xml | 8 | ||||
-rw-r--r-- | res/xml/widget_info.xml | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/res/values-xlarge/dimensions.xml b/res/values-xlarge/dimensions.xml index a0160549f..4fa398f32 100644 --- a/res/values-xlarge/dimensions.xml +++ b/res/values-xlarge/dimensions.xml @@ -15,9 +15,9 @@ --> <resources> <dimen name="appwidget_width">240dp</dimen> - <dimen name="appwidget_height">200dp</dimen> - <dimen name="stack_photo_width">230dp</dimen> - <dimen name="stack_photo_height">190dp</dimen> + <dimen name="appwidget_height">240dp</dimen> + <dimen name="stack_photo_width">220dp</dimen> + <dimen name="stack_photo_height">165dp</dimen> <!-- configuration for album set page --> <integer name="albumset_rows_land">3</integer> diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 7cbd87506..428de3a14 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -14,10 +14,10 @@ limitations under the License. --> <resources> - <dimen name="appwidget_width">146dp</dimen> - <dimen name="appwidget_height">146dp</dimen> - <dimen name="stack_photo_width">140dp</dimen> - <dimen name="stack_photo_height">110dp</dimen> + <dimen name="appwidget_width">180dp</dimen> + <dimen name="appwidget_height">180dp</dimen> + <dimen name="stack_photo_width">160dp</dimen> + <dimen name="stack_photo_height">120dp</dimen> <!-- configuration for album set page --> <integer name="albumset_rows_land">2</integer> diff --git a/res/xml/widget_info.xml b/res/xml/widget_info.xml index e03124c2d..4aa460f8d 100644 --- a/res/xml/widget_info.xml +++ b/res/xml/widget_info.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" - android:minWidth="180dp" - android:minHeight="180dp" + android:minWidth="@dimen/appwidget_width" + android:minHeight="@dimen/appwidget_height" android:updatePeriodMillis="86400000" android:previewImage="@drawable/preview" android:initialLayout="@layout/appwidget_main" |