@Override protected void onActivityResult(int requestCode, int resultCode, Intent detail) { log.d("onActivityResult req=%s res=%sdetail=%s", requestCode, resultCode, detail); switch (requestCode) { case MenuDialog.REQ_FILEPICKER: if (resultCode == RESULT_OK && detail != null) { add_item(MushroomHelper.uri_to_path(env, detail.getData())); } break; case MenuDialog.REQ_HISTORY: if (resultCode == RESULT_OK && detail != null) { MushroomHelper.finish_mush(env, true, detail.getStringExtra("url")); } break; case MenuDialog.REQ_PREF: upload_target_manager.reload(); break; case MenuDialog.REQ_ARRANGE: if (resultCode == RESULT_OK && detail != null) { String path = detail.getStringExtra(PrefKey.EXTRA_DST_PATH); replace_path(last_edit_index, path); } break; case MenuDialog.REQ_APPINFO: break; case MenuDialog.REQ_CAPTURE: if (resultCode == RESULT_OK) { Uri uri = (detail == null ? null : detail.getData()); if (uri == null) uri = capture_uri; if (uri == null) { log.e("cannot get capture uri"); } else { log.d("capture uri = %s", uri); add_item(MushroomHelper.uri_to_path(env, uri)); } } break; } super.onActivityResult(requestCode, resultCode, detail); }
@Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); initPage(); }
@Override protected void onPause() { super.onPause(); save_status(); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initUI(); initPage(); }