コード例 #1
0
 public DetailsPresenter(DetailsView detailsView, BaseActivity activity) {
   this.detailsView = detailsView;
   this.activity = activity;
   this.database = FirebaseDatabase.getInstance().getReference(FirebaseLink.forNotes());
   this.storage = FirebaseStorage.getInstance().getReferenceFromUrl(Secrets.FIREBASE_STORAGE);
   this.password = activity.getAuthHandler().getCredentials().getId();
   this.filesDir = activity.getFilesDir();
 }
コード例 #2
0
 private void displayContents(final String content) {
   final Encryptor encryptor = new Encryptor(password);
   activity.runOnUiThread(
       new Runnable() {
         @Override
         public void run() {
           detailsView.noteContentsLoaded(encryptor.decrypt(content));
         }
       });
 }