package com.xtremelabs.robolectric.shadows;

import com.xtremelabs.robolectric.util.Implementation;
import com.xtremelabs.robolectric.util.Implements;

import android.media.AudioManager;

@SuppressWarnings({"UnusedDeclaration"})
@Implements(AudioManager.class)
public class ShadowAudioManager {
	
	private int streamMaxVolume = 15;
	private int streamVolume = 7;

	private int streamType;
	private int flags;
	
	@Implementation
	public int getStreamMaxVolume(int streamType) {
		this.streamType = streamType;
		return streamMaxVolume;
	}
	
	@Implementation
	int getStreamVolume(int streamType) {
		this.streamType = streamType;
		return streamVolume;
	}
	
	@Implementation
	void setStreamVolume(int streamType, int index, int flags) {
		this.streamType = streamType;
		this.streamVolume = index;
		this.flags = flags;
	}

	public int getStreamMaxVolume() {
		return streamMaxVolume;
	}

	public void setStreamMaxVolume(int streamMaxVolume) {
		this.streamMaxVolume = streamMaxVolume;
	}

	public int getStreamVolume() {
		return streamVolume;
	}

	public void setStreamVolume(int streamVolume) {
		this.streamVolume = streamVolume;
	}

	public int getStreamType() {
		return streamType;
	}

	public void setStreamType(int streamType) {
		this.streamType = streamType;
	}

	public int getFlags() {
		return flags;
	}

	public void setFlags(int flags) {
		this.flags = flags;
	}
	
}

@@ -361,33 +361,8 @@
 7;%0A%0A
-%09private int streamType;%0A
 %09pri
@@ -377,16 +377,16 @@
  flags;%0A
+
 %09%0A%09@Impl
@@ -449,40 +449,8 @@
 ) %7B%0A
-%09%09this.streamType = streamType;%0A
 %09%09re
@@ -536,40 +536,8 @@
 ) %7B%0A
-%09%09this.streamType = streamType;%0A
 %09%09re
@@ -643,40 +643,8 @@
 ) %7B%0A
-%09%09this.streamType = streamType;%0A
 %09%09th
@@ -960,32 +960,32 @@
 streamVolume) %7B%0A
+
 %09%09this.streamVol
@@ -1012,144 +1012,8 @@
 %09%7D%0A%0A
-%09public int getStreamType() %7B%0A%09%09return streamType;%0A%09%7D%0A%0A%09public void setStreamType(int streamType) %7B%0A%09%09this.streamType = streamType;%0A%09%7D%0A%0A
 %09pub

Remove streamType field for ShadowAudioManager, as it is not used. Add test case.