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
1 changed files with 5 additions and 3 deletions

View File

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