FileDocCategorySizeDatePackage
StorageBrowser.javaAPI DocAndroid 5.1 API3735Thu Mar 12 22:22:30 GMT 2015com.android.camerabrowser

StorageBrowser

public class StorageBrowser extends android.app.ListActivity
A list view displaying all storage units on a device.

Fields Summary
private static final String
TAG
private MtpClient
mClient
private String
mDeviceName
private List
mStorageList
private DeviceDisconnectedReceiver
mDisconnectedReceiver
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle savedInstanceState)

        super.onCreate(savedInstanceState);

        mClient = ((CameraBrowserApplication)getApplication()).getMtpClient();
        mDeviceName = getIntent().getStringExtra("device");
        mDisconnectedReceiver = new DeviceDisconnectedReceiver(this, mDeviceName);
    
protected voidonDestroy()

        unregisterReceiver(mDisconnectedReceiver);
        super.onDestroy();
    
protected voidonListItemClick(android.widget.ListView l, android.view.View v, int position, long id)

        Intent intent = new Intent(this, ObjectBrowser.class);
        intent.putExtra("device", mDeviceName);
        intent.putExtra("storage", mStorageList.get(position).getStorageId());
        startActivity(intent);
    
protected voidonResume()

        super.onResume();
        mStorageList = mClient.getStorageList(mDeviceName);
        setListAdapter(new StorageAdapter(this));