BackupTestActivitypublic 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 |
Methods Summary |
---|
public void | onCreate(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 void | onListItemClick(android.widget.ListView l, android.view.View v, int position, long id)
Test t = mTests[position];
Log.d(TAG, "Test: " + t.name);
t.run();
| void | writeFile(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);
}
|
|