Skip to content
Snippets Groups Projects
Commit 423aa13d authored by Alexandre Lision's avatar Alexandre Lision
Browse files

* #36668: remove bitrate and channels, keep samplerate only for speex

parent 8af73cb7
Branches
Tags
No related merge requests found
...@@ -2,45 +2,29 @@ ...@@ -2,45 +2,29 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/drag_handle" android:id="@id/drag_handle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="?android:attr/listPreferredItemHeight" >
android:padding="4dp" >
<TextView <TextView
android:id="@+id/codec_name" android:id="@+id/codec_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="?android:attr/listPreferredItemHeight"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="4dp"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:gravity="center_vertical"
android:textSize="18sp" />
<TextView <TextView
android:id="@+id/codec_samplerate" android:id="@+id/codec_samplerate"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignBottom="@+id/codec_name"
android:layout_below="@+id/codec_name" android:layout_alignTop="@+id/codec_name"
android:layout_marginLeft="4dp" android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/codec_bitrate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/codec_name"
android:layout_marginLeft="4dp"
android:layout_toRightOf="@+id/codec_samplerate"
android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/codec_channels"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/codec_name"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"
android:layout_toRightOf="@+id/codec_bitrate" android:layout_toRightOf="@+id/codec_name"
android:textAppearance="?android:attr/textAppearanceSmall" /> android:gravity="center_vertical"
android:textSize="12sp"
android:visibility="gone" />
<CheckBox <CheckBox
android:id="@+id/codec_checked" android:id="@+id/codec_checked"
......
...@@ -349,21 +349,22 @@ public class AudioManagementFragment extends PreferenceFragment { ...@@ -349,21 +349,22 @@ public class AudioManagementFragment extends PreferenceFragment {
entryView = new CodecView(); entryView = new CodecView();
entryView.name = (TextView) rowView.findViewById(R.id.codec_name); entryView.name = (TextView) rowView.findViewById(R.id.codec_name);
entryView.bitrate = (TextView) rowView.findViewById(R.id.codec_bitrate);
entryView.samplerate = (TextView) rowView.findViewById(R.id.codec_samplerate); entryView.samplerate = (TextView) rowView.findViewById(R.id.codec_samplerate);
entryView.channels = (TextView) rowView.findViewById(R.id.codec_channels);
entryView.enabled = (CheckBox) rowView.findViewById(R.id.codec_checked); entryView.enabled = (CheckBox) rowView.findViewById(R.id.codec_checked);
rowView.setTag(entryView); rowView.setTag(entryView);
} else { } else {
entryView = (CodecView) rowView.getTag(); entryView = (CodecView) rowView.getTag();
} }
if(items.get(pos).isSpeex())
entryView.samplerate.setVisibility(View.VISIBLE);
else
entryView.samplerate.setVisibility(View.GONE);
entryView.name.setText(items.get(pos).getName()); entryView.name.setText(items.get(pos).getName());
entryView.samplerate.setText(items.get(pos).getSampleRate()); entryView.samplerate.setText(items.get(pos).getSampleRate());
entryView.bitrate.setText(items.get(pos).getBitRate());
entryView.channels.setText(items.get(pos).getChannels());
entryView.enabled.setChecked(items.get(pos).isEnabled()); entryView.enabled.setChecked(items.get(pos).isEnabled());
;
return rowView; return rowView;
} }
...@@ -403,8 +404,6 @@ public class AudioManagementFragment extends PreferenceFragment { ...@@ -403,8 +404,6 @@ public class AudioManagementFragment extends PreferenceFragment {
public class CodecView { public class CodecView {
public TextView name; public TextView name;
public TextView samplerate; public TextView samplerate;
public TextView bitrate;
public TextView channels;
public CheckBox enabled; public CheckBox enabled;
} }
} }
......
...@@ -112,4 +112,8 @@ public class Codec implements Parcelable { ...@@ -112,4 +112,8 @@ public class Codec implements Parcelable {
return false; return false;
} }
public boolean isSpeex() {
return name.contentEquals("speex");
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment