FileDocCategorySizeDatePackage
BackupTestActivity.javaAPI DocAndroid 5.1 API7956Thu Mar 12 22:22:44 GMT 2015com.android.backuptest

BackupTestActivity

public class BackupTestActivity extends android.app.ListActivity

Fields Summary
static final String
TAG
static final String
PREF_GROUP_SETTINGS
static final String
PREF_KEY
static final String
FILE_NAME
android.app.backup.BackupManager
sBm
Test[]
mTests
Constructors Summary
Methods Summary
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        String[] labels = new String[mTests.length];
        for (int i=0; i<mTests.length; i++) {
            labels[i] = mTests[i].name;
        }

        setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, labels));
    
public voidonListItemClick(android.widget.ListView l, android.view.View v, int position, long id)

        Test t = mTests[position];
        Log.d(TAG, "Test: " + t.name);
        t.run();
    
voidwriteFile(java.lang.String name, java.lang.String contents, int mode)

        try {
            PrintStream out = new PrintStream(openFileOutput(name, mode));
            out.print(contents);
            out.close();
        } catch (FileNotFoundException ex) {
            throw new RuntimeException(ex);
        }