fix few crashes

This commit is contained in:
Alexey Kuznetsov 2018-02-26 17:51:28 +03:00
commit 9229794fc8
2 changed files with 3 additions and 2 deletions

View file

@ -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

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