remove beta build
This commit is contained in:
parent
b40dd3e5c0
commit
d6f7b4706b
9 changed files with 23 additions and 47 deletions
|
@ -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'
|
||||||
|
|
|
@ -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>
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
Before Width: | Height: | Size: 19 KiB |
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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));
|
||||||
|
|
Loading…
Reference in a new issue