Merge branch 'TeamNewPipe:dev' into dev

This commit is contained in:
LingYinTianMeng 2022-04-19 16:36:42 +08:00 committed by GitHub
commit fd5626e9e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 4 deletions

View File

@ -262,7 +262,7 @@ dependencies {
implementation "com.nononsenseapps:filepicker:4.2.1"
// Crash reporting
implementation "ch.acra:acra-core:5.8.4"
implementation "ch.acra:acra-core:5.9.1"
// Properly restarting
implementation 'com.jakewharton:process-phoenix:2.1.2'

View File

@ -205,7 +205,7 @@ public class App extends MultiDexApplication {
return;
}
final CoreConfigurationBuilder acraConfig = new CoreConfigurationBuilder(this)
final CoreConfigurationBuilder acraConfig = new CoreConfigurationBuilder()
.withBuildConfigClass(BuildConfig.class);
ACRA.init(this, acraConfig);
}

View File

@ -97,7 +97,10 @@ public final class PlayQueueActivity extends AppCompatActivity
getMenuInflater().inflate(R.menu.menu_play_queue, m);
getMenuInflater().inflate(R.menu.menu_play_queue_bg, m);
onMaybeMuteChanged();
// to avoid null reference
if (player != null) {
onPlaybackParameterChanged(player.getPlaybackParameters());
}
return true;
}

View File

@ -24,9 +24,21 @@ public final class KeyboardUtil {
if (editText.requestFocus()) {
final InputMethodManager imm = ContextCompat.getSystemService(activity,
InputMethodManager.class);
if (!imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED)) {
/*
* Sometimes the keyboard can't be shown because Android's ImeFocusController is in
* a incorrect state e.g. when animations are disabled or the unfocus event of the
* previous view arrives in the wrong moment (see #7647 for details).
* The invalid state can be fixed by to re-focusing the editText.
*/
editText.clearFocus();
editText.requestFocus();
// Try again
imm.showSoftInput(editText, InputMethodManager.SHOW_FORCED);
}
}
}
public static void hideKeyboard(final Activity activity, final EditText editText) {
if (activity == null || editText == null) {