Ejemplo n.º 1
0
 @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);
 }
Ejemplo n.º 2
0
 @Override
 protected void onNewIntent(Intent intent) {
   super.onNewIntent(intent);
   initPage();
 }
Ejemplo n.º 3
0
 @Override
 protected void onPause() {
   super.onPause();
   save_status();
 }
Ejemplo n.º 4
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   initUI();
   initPage();
 }