This commit is contained in:
Thomas 2020-07-10 11:43:53 +02:00
parent 25ab1b2159
commit 8c042c80d0
1 changed files with 2 additions and 2 deletions

View File

@ -129,10 +129,8 @@ public class AppsPickerActivity extends Activity {
packages.add(packageName); packages.add(packageName);
i++; i++;
} }
} }
String defaultApp = new DefaultAppDAO(AppsPickerActivity.this, db).getDefault(packages); String defaultApp = new DefaultAppDAO(AppsPickerActivity.this, db).getDefault(packages);
TextView urlText = findViewById(R.id.url); TextView urlText = findViewById(R.id.url);
urlText.setText(url); urlText.setText(url);
@ -141,6 +139,7 @@ public class AppsPickerActivity extends Activity {
intent.setPackage(defaultApp); intent.setPackage(defaultApp);
startActivity(intent); startActivity(intent);
finish(); finish();
return;
} else { } else {
ConstraintLayout app_container = findViewById(R.id.app_container); ConstraintLayout app_container = findViewById(R.id.app_container);
app_container.setVisibility(View.VISIBLE); app_container.setVisibility(View.VISIBLE);
@ -188,6 +187,7 @@ public class AppsPickerActivity extends Activity {
if (isPresent) { if (isPresent) {
ArrayList<String> oldConcurrent = new DefaultAppDAO(AppsPickerActivity.this, db).getConcurrent(appToUse); ArrayList<String> oldConcurrent = new DefaultAppDAO(AppsPickerActivity.this, db).getConcurrent(appToUse);
ArrayList<String> newConcurrent = Utils.union(oldConcurrent, packages); ArrayList<String> newConcurrent = Utils.union(oldConcurrent, packages);
newConcurrent.remove(appToUse);
new DefaultAppDAO(AppsPickerActivity.this, db).update(appToUse, newConcurrent); new DefaultAppDAO(AppsPickerActivity.this, db).update(appToUse, newConcurrent);
} else { } else {
val = new DefaultAppDAO(AppsPickerActivity.this, db).insert(appToUse, packages); val = new DefaultAppDAO(AppsPickerActivity.this, db).insert(appToUse, packages);