03-06-2010 11:13 AM
OVERVIEW
On the Motorola Cliq, the "Picture Gallery" wallpaper source will return Activity.RESULT_CANCELED even when wallpaper was successfully set
STEPS TO REPRODUCE
1. Setup an Activity instance and within that Activity call the following:
/*
The requestCode doesn't matter; we just want onActivityResult() to be called
*/
startActivityForResult(Intent.createChooser(new Intent(Intent.ACTION_SET_WALLPAPER), "Wallpaper Sets"), 0);
2. Add the following to the onActivityResult method:
/**
* {@inheritDoc}
*/
@Override
protected void onActivityResult(final int requestCode, final int resultCode, final Intent data)
{
/*
* We only expect an activity result from the ACTION_SET_WALLPAPER Intent
*/
if (resultCode == RESULT_CANCELED)
{
Log.i("Tag", "RESULT_CANCELED");
}
}
3. Now install the app, start the Activity, and launch the wallpaper picker through the startActivityForResult call
4. In the list of wallpaper sets, choose "Picture Gallery" (do not choose "Wallpaper Gallery").
5. Go through the process of picking a wallpaper, which will eventually return you to the parent Activity where onActivityResult() is called
RESULTS
Actual: When choosing a picture from the "Picture Gallery", RESULT_CANCELED is always returned, even if the user didn't cancel picking a wallpaper.
Expected: RESULT_OK should be returned if a wallpaper is set. RESULT_CANCELED should only be returned if the user aborts picking a wallpaper
NOTES
Correct behavior is observed if the "Wallpaper Gallery" is chosen instead of the "Picture Gallery."
03-12-2010 02:04 PM
Carter --
Thanks for providing the sample code and steps to reproduce. You're right - I saw it. The picture chosen from the Gallery is correctly set as wallpaper, but the RESULT_CANCELED code is returned. I gather that your app is doing something with the returned code?
I'll notify the CLIQ team, file a bug with as high a priority as I can, and let you know what happens.
Meanwhile, have you run this on any Android 1.5 non-MOTOBLUR devices (with available pictures)? I can also try that here, but just checking what you might have already done.
-- Suzanne Alexandra
03-13-2010 10:03 AM
This is a MOTOBLUR-specific issue. It does not occur under standard Android 1.5 devices.
03-15-2010 09:52 AM - last edited on 03-15-2010 10:07 AM
Yes, I totally understand. The bug is filed on MOTOBLUR, and we're watching it.
Please let us know also if this affects Locale or another app under development, how many users this impacts, and so on.
-- Suzanne
03-15-2010 09:11 PM
This bug affects Locale's Wallpaper setting. Given that this bug is 100% reproducible, it will affect any Cliq user who wishes to use their own images for a Wallpaper.
The Wallpaper setting is surprisingly popular amongst Locale users, and given the number of emails I've received from users about this issue, I would say it is widely noticed by Locale users with the Cliq.
05-14-2011 01:10 PM
I am seeing this regression now on the Motorola Atrix.
The steps to reproduce are almost identical: the problem occurs when trying to choose a wallpaper from the Media Gallery. The problem does not occur when trying to choose a wallpaper from the Android Wallpaper gallery.
Can Motorola please investigate?
05-16-2011 11:03 AM
We'll look into it.
-Greg Wilson
MOTODEV Technical Support
Motorola Mobility, Inc.
06-01-2011 12:56 PM
Hi Carter -
Sorry this issue has popped up again on ATRIX. I've filed a bug on this. I'll let you know as soon as I hear anything.
It seems that this is one of those Android compatibility issues that slips through the CTS. At Google I/O this year, Google stated that developers can submit their own tests to the compatibility suite. If you'd like to do that, you can check here for more info -
http://source.android.com/compatibility/cts-intro.
- Suzanne
06-07-2011 01:42 PM
Hi and thanks for the reply.
I don't think it will be possible to create a CTS test case, because that would required automated control of the Motorola Wallpaper picker. The current interface to the wallpaper picker is sending an Intent and receiving a result code back. That interface is insufficient to trigger the Motorola wallpaper picker to actually choose a wallpaper.
06-14-2011 09:02 PM
Carter -
Thanks. I gave the engineering team a test case, and they're working on this issue. As far as whether or when it will be upgraded to ATRIX devices in the field -- that is a more complex question. I don't yet have an answer on that.
- Suzanne
Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
Android, Android Market and YouTube are trademarks of Google, Inc.
Source code displayed on this page may be licensed under Apache License, Version 2
Copyright © 2011, Android Open Source Project. All rights reserved unless otherwise explicitly indicated.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.