Skip to content

Commit

Permalink
OboeTester: Display actual device id (#2078)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertwu1 authored Jul 18, 2024
1 parent e3e0858 commit 568bde6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class StreamConfigurationView extends LinearLayout {

protected Spinner mNativeApiSpinner;
private TextView mActualNativeApiView;
private TextView mActualDeviceIdView;

private TextView mActualMMapView;
private CheckBox mRequestedMMapView;
Expand Down Expand Up @@ -194,6 +195,8 @@ private void initializeViews(Context context) {

mActualNativeApiView = (TextView) findViewById(R.id.actualNativeApi);

mActualDeviceIdView = (TextView) findViewById(R.id.actualDeviceId);

mChannelConversionBox = (CheckBox) findViewById(R.id.checkChannelConversion);

mFormatConversionBox = (CheckBox) findViewById(R.id.checkFormatConversion);
Expand Down Expand Up @@ -447,6 +450,9 @@ void updateDisplay(StreamConfiguration actualConfiguration) {
value = actualConfiguration.getNativeApi();
mActualNativeApiView.setText(StreamConfiguration.convertNativeApiToText(value));

value = actualConfiguration.getDeviceId();
mActualDeviceIdView.setText(String.valueOf(value));

mActualMMapView.setText(yesOrNo(actualConfiguration.isMMap()));
int sharingMode = actualConfiguration.getSharingMode();
boolean isExclusive = (sharingMode == StreamConfiguration.SHARING_MODE_EXCLUSIVE);
Expand Down
5 changes: 5 additions & 0 deletions apps/OboeTester/app/src/main/res/layout/stream_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
android:id="@+id/devices_spinner"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/actualDeviceId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="\?" />

</TableRow>

Expand Down

0 comments on commit 568bde6

Please sign in to comment.