Fix issue #32
This commit is contained in:
parent
25ab1b2159
commit
8c042c80d0
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue