fix release crash because of setting sidebar header

This commit is contained in:
Christian Schabesberger 2018-03-12 15:57:35 +01:00
parent 736c902f3c
commit a9fea9f606

View file

@ -176,9 +176,11 @@ public class MainActivity extends AppCompatActivity {
// when the user returns to MainActivity // when the user returns to MainActivity
drawer.closeDrawer(Gravity.START, false); drawer.closeDrawer(Gravity.START, false);
try { try {
String selectedServiceName = NewPipe.getService( if(BuildConfig.BUILD_TYPE != "release" ) {
ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName(); String selectedServiceName = NewPipe.getService(
headerServiceView.setText(selectedServiceName); ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName();
headerServiceView.setText(selectedServiceName);
}
} catch (Exception e) { } catch (Exception e) {
ErrorActivity.reportUiError(this, e); ErrorActivity.reportUiError(this, e);
} }