Open web search in a new window
This commit is contained in:
parent
9e306b3f91
commit
5283a0ca7a
2 changed files with 6 additions and 7 deletions
|
|
@ -221,14 +221,16 @@ public abstract class AbsTagEditorActivity extends AbsBaseActivity {
|
|||
@NonNull
|
||||
protected abstract List<String> getSongPaths();
|
||||
|
||||
protected void searchWebFor(@NonNull List<String> strings) {
|
||||
protected void searchWebFor(String... keys) {
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
for (String string : strings) {
|
||||
stringBuilder.append(string);
|
||||
for (String key : keys) {
|
||||
stringBuilder.append(key);
|
||||
stringBuilder.append(" ");
|
||||
}
|
||||
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
|
||||
intent.putExtra(SearchManager.QUERY, stringBuilder.toString());
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,10 +153,7 @@ public class AlbumTagEditorActivity extends AbsTagEditorActivity implements Text
|
|||
|
||||
@Override
|
||||
protected void searchImageOnWeb() {
|
||||
List<String> query = new ArrayList<>();
|
||||
query.add(albumTitle.getText().toString());
|
||||
query.add(albumArtist.getText().toString());
|
||||
searchWebFor(query);
|
||||
searchWebFor(albumTitle.getText().toString(), albumArtist.getText().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue