@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { // if a result has been returned, display a notify if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) { OperationResult result = data.getParcelableExtra(OperationResult.EXTRA_RESULT); result.createNotify(this).show(); } else { super.onActivityResult(requestCode, resultCode, data); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAccountsLabel = (TextView) findViewById(R.id.api_accounts_label); mAppNameView = (TextView) findViewById(R.id.api_app_settings_app_name); mAppIconView = (ImageView) findViewById(R.id.api_app_settings_app_icon); mPackageName = (TextView) findViewById(R.id.api_app_settings_package_name); mPackageSignature = (TextView) findViewById(R.id.api_app_settings_package_certificate); mStartFab = (FloatingActionButton) findViewById(R.id.fab); mStartFab.setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { startApp(); } }); setFullScreenDialogClose( new View.OnClickListener() { @Override public void onClick(View v) { cancel(); } }); setTitle(null); Intent intent = getIntent(); mAppUri = intent.getData(); if (mAppUri == null) { Log.e(Constants.TAG, "Intent data missing. Should be Uri of app!"); finish(); return; } else { Log.d(Constants.TAG, "uri: " + mAppUri); loadData(savedInstanceState, mAppUri); } }
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.api_app_settings, menu); return true; }