summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/tests/CameraBrowser/res/layout/object_info.xml10
-rw-r--r--media/tests/CameraBrowser/res/values/strings.xml1
-rw-r--r--media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java10
-rw-r--r--media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java3
4 files changed, 19 insertions, 5 deletions
diff --git a/media/tests/CameraBrowser/res/layout/object_info.xml b/media/tests/CameraBrowser/res/layout/object_info.xml
index c7fd830..ac210b9 100644
--- a/media/tests/CameraBrowser/res/layout/object_info.xml
+++ b/media/tests/CameraBrowser/res/layout/object_info.xml
@@ -41,6 +41,16 @@
style="@style/info_value" />
</TableRow>
<TableRow>
+ <TextView android:id="@+id/format_label"
+ android:text="@string/format_label"
+ android:layout_gravity="right"
+ android:layout_marginRight="8dip"
+ style="@style/info_label" />
+
+ <TextView android:id="@+id/format"
+ style="@style/info_value" />
+ </TableRow>
+ <TableRow>
<TextView android:id="@+id/thumb_width_label"
android:text="@string/thumb_width_label"
android:layout_gravity="right"
diff --git a/media/tests/CameraBrowser/res/values/strings.xml b/media/tests/CameraBrowser/res/values/strings.xml
index 56c5111..cd477f1 100644
--- a/media/tests/CameraBrowser/res/values/strings.xml
+++ b/media/tests/CameraBrowser/res/values/strings.xml
@@ -20,6 +20,7 @@
<!-- for object info -->
<string name="name_label">Name: </string>
<string name="size_label">Size: </string>
+ <string name="format_label">Format: </string>
<string name="thumb_width_label">Thumb Width: </string>
<string name="thumb_height_label">Thumb Height: </string>
<string name="thumb_size_label">Thumb Size: </string>
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
index fc9989d..329aa40 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectBrowser.java
@@ -101,17 +101,17 @@ public class ObjectBrowser extends ListActivity {
format = c.getLong(FORMAT_COLUMN);
Log.d(TAG, "rowId: " + rowId + " name: " + name + " format: " + format);
}
- if (format == MtpConstants.FORMAT_JFIF) {
- Intent intent = new Intent(this, ObjectViewer.class);
+ if (format == MtpConstants.FORMAT_ASSOCIATION) {
+ Intent intent = new Intent(this, ObjectBrowser.class);
intent.putExtra("device", mDeviceID);
intent.putExtra("storage", mStorageID);
- intent.putExtra("object",rowID);
+ intent.putExtra("object", rowID);
startActivity(intent);
} else {
- Intent intent = new Intent(this, ObjectBrowser.class);
+ Intent intent = new Intent(this, ObjectViewer.class);
intent.putExtra("device", mDeviceID);
intent.putExtra("storage", mStorageID);
- intent.putExtra("object", rowID);
+ intent.putExtra("object",rowID);
startActivity(intent);
}
}
diff --git a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
index aa49cd8..408f15e 100644
--- a/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
+++ b/media/tests/CameraBrowser/src/com/android/camerabrowser/ObjectViewer.java
@@ -69,6 +69,7 @@ public class ObjectViewer extends Activity {
Mtp.Object.DATE_MODIFIED,
Mtp.Object.KEYWORDS,
Mtp.Object.THUMB,
+ Mtp.Object.FORMAT,
};
@Override
@@ -125,6 +126,8 @@ public class ObjectViewer extends Activity {
thumbView.setImageBitmap(bitmap);
}
}
+ view = (TextView)findViewById(R.id.format);
+ view.setText(Long.toHexString(c.getLong(14)).toUpperCase());
}
}