use of com.decad3nce.aegis.Fragments.BackupAccountsDialogFragment in project Aegis by Decad3nce.
the class BackupGoogleAccountsActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.backup_layout);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setVisibility(View.VISIBLE);
context = this;
Intent intent;
cr = getContentResolver();
credential = GoogleAccountCredential.usingOAuth2(this, DriveScopes.DRIVE);
try {
intent = getIntent();
if (intent.hasExtra("fromReceiver")) {
address = intent.getStringExtra("fromReceiver");
Log.i(TAG, "Backup intent from receiver");
recoverData();
} else {
Log.i(TAG, "Backup intent from elsewhere");
DialogFragment dialog = new BackupAccountsDialogFragment();
dialog.show(getFragmentManager(), "BackupAccountsDialogFragment");
}
} catch (Exception e) {
recoverData();
}
}
use of com.decad3nce.aegis.Fragments.BackupAccountsDialogFragment in project Aegis by Decad3nce.
the class BackupDropboxAccountsActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.backup_layout);
progressBar = (ProgressBar) findViewById(R.id.progressBar);
progressBar.setVisibility(View.VISIBLE);
cr = getContentResolver();
context = this;
Intent intent;
AndroidAuthSession session = buildSession();
mDBApi = new DropboxAPI<AndroidAuthSession>(session);
try {
intent = getIntent();
if (intent.hasExtra("fromReceiver")) {
address = intent.getStringExtra("fromReceiver");
Log.i(TAG, "Backup intent from receiver");
recoverData();
} else {
Log.i(TAG, "Backup intent from elsewhere");
DialogFragment dialog = new BackupAccountsDialogFragment();
dialog.show(getFragmentManager(), "BackupAccountsDialogFragment");
}
} catch (Exception e) {
Log.e(TAG, e.toString());
}
}
Aggregations