Skip to content

Commit fd5626e

Browse files
Merge branch 'TeamNewPipe:dev' into dev
2 parents 8ea98b6 + 53bf342 commit fd5626e

4 files changed

Lines changed: 19 additions & 4 deletions

File tree

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ dependencies {
262262
implementation "com.nononsenseapps:filepicker:4.2.1"
263263

264264
// Crash reporting
265-
implementation "ch.acra:acra-core:5.8.4"
265+
implementation "ch.acra:acra-core:5.9.1"
266266

267267
// Properly restarting
268268
implementation 'com.jakewharton:process-phoenix:2.1.2'

app/src/main/java/org/schabi/newpipe/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected void initACRA() {
205205
return;
206206
}
207207

208-
final CoreConfigurationBuilder acraConfig = new CoreConfigurationBuilder(this)
208+
final CoreConfigurationBuilder acraConfig = new CoreConfigurationBuilder()
209209
.withBuildConfigClass(BuildConfig.class);
210210
ACRA.init(this, acraConfig);
211211
}

app/src/main/java/org/schabi/newpipe/player/PlayQueueActivity.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ public boolean onCreateOptionsMenu(final Menu m) {
9797
getMenuInflater().inflate(R.menu.menu_play_queue, m);
9898
getMenuInflater().inflate(R.menu.menu_play_queue_bg, m);
9999
onMaybeMuteChanged();
100-
onPlaybackParameterChanged(player.getPlaybackParameters());
100+
// to avoid null reference
101+
if (player != null) {
102+
onPlaybackParameterChanged(player.getPlaybackParameters());
103+
}
101104
return true;
102105
}
103106

app/src/main/java/org/schabi/newpipe/util/KeyboardUtil.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,19 @@ public static void showKeyboard(final Activity activity, final EditText editText
2424
if (editText.requestFocus()) {
2525
final InputMethodManager imm = ContextCompat.getSystemService(activity,
2626
InputMethodManager.class);
27-
imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);
27+
if (!imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED)) {
28+
/*
29+
* Sometimes the keyboard can't be shown because Android's ImeFocusController is in
30+
* a incorrect state e.g. when animations are disabled or the unfocus event of the
31+
* previous view arrives in the wrong moment (see #7647 for details).
32+
* The invalid state can be fixed by to re-focusing the editText.
33+
*/
34+
editText.clearFocus();
35+
editText.requestFocus();
36+
37+
// Try again
38+
imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);
39+
}
2840
}
2941
}
3042

0 commit comments

Comments
 (0)