Android, Camera & "actually" supported image sizes
===

Ok, making a camera app and one part is selecting img size, done with following code:

    Camera.Parameters parameters = camera.getParameters();
    List<Camera.Size> sizes = parameters.getSupportedPictureSizes();

I get a nice list with supported sizes. Two worst resolutions are 640x480 and 320x240.
But when I set resolution to 320x240 that 640x480 used instead!

I set the resolution with following code:

    private void setImgSize() 
    {
        Log.d(TAG, "+setImgSize");
	    Camera.Parameters params = camera.getParameters();
	    params.setPictureSize(WIDTH, HEIGHT);
	    camera.setParameters(params);
		
	    Toast.makeText(getApplicationContext(), 
            "Resolution set to "+WIDTH+"x"+HEIGHT, 
            Toast.LENGTH_SHORT).show();
    }

WIDTH and HEIGHT are values returned from settingsactivity, and I get a nice Toast telling that resolution is set to 320x240. But when images are captured resolution is 640x480!
Ok, test2. Let's set resolution to 640x480. Toast is telling that resolution is 640x480. Cool. Let's capture some images, and their resolution is 640x480 as defined!

So, what am I doing wrong here and/or what I don't understand?!?! I get supported image sizes and at least one of them is not supported. Is there any way to check if the selected resolution is **actually** supported?

Device I use is Huawei Ideos X5 / U8800 with Android version 2.3.5.

Thanks for help :)

P.S. And before someone asks why I want use such a crappy resolution, this is why: This app will capture images in N seconds interval. And if the application is running, let's say, **very** long time, I'll run out of space in my sd card  :)

