Reply
Contributor
Carter
Posts: 15
Registered: 11-22-2009

Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

 

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."

 

Motorola
suzannea
Posts: 236
Registered: 12-02-2008

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

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

Contributor
Carter
Posts: 15
Registered: 11-22-2009

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

This is a MOTOBLUR-specific issue.  It does not occur under standard Android 1.5 devices.

Motorola
suzannea
Posts: 236
Registered: 12-02-2008

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

[ Edited ]

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

Contributor
Carter
Posts: 15
Registered: 11-22-2009

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

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.

Contributor
Carter
Posts: 15
Registered: 11-22-2009

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

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?

Motorola
Greg_Wilson
Posts: 657
Registered: 03-06-2009

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

We'll look into it.

 

-Greg Wilson

 MOTODEV Technical Support

 Motorola Mobility, Inc.

Motorola
suzannea
Posts: 236
Registered: 12-02-2008

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

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.html

 

 

- Suzanne

Contributor
Carter
Posts: 15
Registered: 11-22-2009

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

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.

Motorola
suzannea
Posts: 236
Registered: 12-02-2008

Re: Wallpaper Picker's Picture Gallery Always Returns RESULT_CANCELED

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