remove beta build

pull/1227/head
Christian Schabesberger 2018-03-30 11:09:07 +02:00
rodzic b40dd3e5c0
commit d6f7b4706b
9 zmienionych plików z 23 dodań i 47 usunięć

Wyświetl plik

@ -26,13 +26,6 @@ android {
debuggable true debuggable true
applicationIdSuffix ".debug" applicationIdSuffix ".debug"
} }
beta {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".beta"
}
} }
lintOptions { lintOptions {
@ -98,7 +91,6 @@ dependencies {
annotationProcessor "frankiesardo:icepick-processor:$icepickLibVersion" annotationProcessor "frankiesardo:icepick-processor:$icepickLibVersion"
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryLibVersion" debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryLibVersion"
betaImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryLibVersion"
implementation 'com.squareup.okhttp3:okhttp:3.9.1' implementation 'com.squareup.okhttp3:okhttp:3.9.1'

Wyświetl plik

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="NewPipe Beta"
tools:replace="android:label">
</application>
</manifest>

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 5.8 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 3.0 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 8.1 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 13 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 19 KiB

Wyświetl plik

@ -97,35 +97,32 @@ public class MainActivity extends AppCompatActivity {
//drawerItems.setItemIconTintList(null); // Set null to use the original icon //drawerItems.setItemIconTintList(null); // Set null to use the original icon
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true); drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(true);
if (!BuildConfig.BUILD_TYPE.equals("release")) { toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.drawer_open, R.string.drawer_close);
toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.drawer_open, R.string.drawer_close); toggle.syncState();
toggle.syncState(); drawer.addDrawerListener(toggle);
drawer.addDrawerListener(toggle); drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() {
drawer.addDrawerListener(new DrawerLayout.SimpleDrawerListener() { private int lastService;
private int lastService;
@Override @Override
public void onDrawerOpened(View drawerView) { public void onDrawerOpened(View drawerView) {
lastService = ServiceHelper.getSelectedServiceId(MainActivity.this); lastService = ServiceHelper.getSelectedServiceId(MainActivity.this);
}
@Override
public void onDrawerClosed(View drawerView) {
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
new Handler(Looper.getMainLooper()).post(MainActivity.this::recreate);
} }
}
});
@Override drawerItems.setNavigationItemSelectedListener(this::changeService);
public void onDrawerClosed(View drawerView) {
if (lastService != ServiceHelper.getSelectedServiceId(MainActivity.this)) {
new Handler(Looper.getMainLooper()).post(MainActivity.this::recreate);
}
}
});
drawerItems.setNavigationItemSelectedListener(this::changeService); setupDrawerFooter();
setupDrawerHeader();
setupDrawerFooter();
setupDrawerHeader();
} else {
drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
}
} }
private boolean changeService(MenuItem item) { private boolean changeService(MenuItem item) {
if (item.getGroupId() == R.id.menu_services_group) { if (item.getGroupId() == R.id.menu_services_group) {
drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(false); drawerItems.getMenu().getItem(ServiceHelper.getSelectedServiceId(this)).setChecked(false);
@ -176,11 +173,9 @@ 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 {
if(BuildConfig.BUILD_TYPE != "release" ) { String selectedServiceName = NewPipe.getService(
String selectedServiceName = NewPipe.getService( ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName();
ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName(); headerServiceView.setText(selectedServiceName);
headerServiceView.setText(selectedServiceName);
}
} catch (Exception e) { } catch (Exception e) {
ErrorActivity.reportUiError(this, e); ErrorActivity.reportUiError(this, e);
} }

Wyświetl plik

@ -65,7 +65,6 @@ public class ServiceHelper {
} }
public static int getSelectedServiceId(Context context) { public static int getSelectedServiceId(Context context) {
if (BuildConfig.BUILD_TYPE.equals("release")) return DEFAULT_FALLBACK_SERVICE.getServiceId();
final String serviceName = PreferenceManager.getDefaultSharedPreferences(context) final String serviceName = PreferenceManager.getDefaultSharedPreferences(context)
.getString(context.getString(R.string.current_service_key), context.getString(R.string.default_service_value)); .getString(context.getString(R.string.current_service_key), context.getString(R.string.default_service_value));