use of org.storymaker.app.db.StoryMakerDB in project storymaker by StoryMaker.
the class SceneEditorActivity method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.exportProjectFiles:
exportProjectFiles();
return true;
case R.id.itemInfo:
Intent intent = new Intent(this, StoryInfoActivity.class);
intent.putExtra("pid", mProject.getId());
startActivity(intent);
return true;
case R.id.purgePublishTables:
// NEW/CACHEWORD
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
int timeout = Integer.parseInt(settings.getString("pcachewordtimeout", CACHEWORD_TIMEOUT));
mCacheWordHandler = new CacheWordHandler(getBaseContext(), this, timeout);
mCacheWordHandler.connectToService();
SQLiteDatabase db = new StoryMakerDB(mCacheWordHandler, getBaseContext()).getWritableDatabase();
JobTable foo;
(new PublishJobTable(db)).debugPurgeTable();
(new JobTable(db)).debugPurgeTable();
db.close();
return true;
}
return super.onOptionsItemSelected(item);
}
Aggregations