Merge branch 'audiorecorder-3.1.20'

This commit is contained in:
Alexey Kuznetsov 2018-02-26 17:51:36 +03:00
commit ed15769218
2 changed files with 13 additions and 4 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId "com.github.axet.audiorecorder"
minSdkVersion 9
targetSdkVersion 23 // 24+ file:// unable to open
versionCode 250
versionName "3.1.19"
versionCode 251
versionName "3.1.20"
}
signingConfigs {
release {
@ -55,5 +55,5 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.github.axet:android-audio-library:1.0.87' // compile project(':android-audio-library')
compile 'com.github.axet:android-audio-library:1.0.88' // compile project(':android-audio-library')
}

View file

@ -100,7 +100,16 @@ public class MainActivity extends AppCompatThemeActivity {
RecordingService.startIfPending(this);
receiver = new ScreenReceiver(this);
final SharedPreferences shared = PreferenceManager.getDefaultSharedPreferences(this);
receiver = new ScreenReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (!shared.getBoolean(MainApplication.PREFERENCE_CONTROLS, false))
return;
super.onReceive(context, intent);
}
};
receiver.registerReceiver(this);
}
void checkPending() {