Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1779789b authored by Mike Lockwood's avatar Mike Lockwood
Browse files

CameraBrowser: show format in object info and show info for non-JPEG objects



Change-Id: I22b1906fecbf8609bc688a148180edc95fa1badf
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 88fc2b85
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,16 @@
        <TextView android:id="@+id/size"
            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"
+1 −0
Original line number Diff line number Diff line
@@ -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>
+5 −5
Original line number Diff line number Diff line
@@ -101,14 +101,14 @@ 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);
            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);
+3 −0
Original line number Diff line number Diff line
@@ -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());
        }
    }