Merge pull request #1076 from wojcik-online/patch-1

Control media volume with the hardware buttons.
pull/1077/head
Christian Schabesberger 2018-02-07 19:38:22 +01:00 zatwierdzone przez GitHub
commit de65d1e1fc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -22,6 +22,7 @@ package org.schabi.newpipe;
import android.content.Intent;
import android.content.SharedPreferences;
import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
@ -95,6 +96,8 @@ public class MainActivity extends AppCompatActivity implements HistoryListener {
if (getSupportFragmentManager() != null && getSupportFragmentManager().getBackStackEntryCount() == 0) {
initFragments();
}
setVolumeControlStream(AudioManager.STREAM_MUSIC);
setSupportActionBar(findViewById(R.id.toolbar));
setupDrawer();