forked from organicmaps/organicmaps
Android. Changing TTS volume all the time MAPS.ME is in foreground.
This commit is contained in:
parent
f948035a01
commit
07935fb4d4
2 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
package com.mapswithme.maps.base;
|
||||
|
||||
import android.media.AudioManager;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentTransaction;
|
||||
|
@ -18,6 +19,7 @@ public class BaseMwmFragmentActivity extends AppCompatActivity
|
|||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||
final int layoutId = getContentLayoutResId();
|
||||
if (layoutId != 0)
|
||||
setContentView(layoutId);
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.mapswithme.maps.settings;
|
|||
|
||||
import android.app.Fragment;
|
||||
import android.content.res.Configuration;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.support.annotation.NonNull;
|
||||
|
@ -77,6 +78,7 @@ public class SettingsActivity extends PreferenceActivity
|
|||
getDelegate().onCreate(savedInstanceState);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
||||
|
||||
// Hack to attach Toolbar and make it work on native PreferenceActivity
|
||||
ViewGroup root = (ViewGroup)findViewById(android.R.id.list).getParent().getParent().getParent();
|
||||
|
|
Loading…
Add table
Reference in a new issue