add new debug build so two tusky versions can be run on the same device

This commit is contained in:
Conny Duck 2017-12-08 12:15:46 +01:00
parent 7fc4ad7528
commit 2899114f66
17 changed files with 28 additions and 4 deletions

View File

@ -20,6 +20,9 @@ android {
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
applicationIdSuffix ".test"
}
}
flavorDimensions "store"

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<size android:width="108dp" android:height="108dp" />
<gradient
android:type="radial"
android:centerX="50%"
android:centerY="50%"
android:startColor="#25d069"
android:endColor="#19a341"
android:gradientRadius="100"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -40,7 +40,7 @@
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="@string/oauth_redirect_host"
android:host="${applicationId}"
android:scheme="@string/oauth_scheme" />
</intent-filter>
</activity>
@ -111,7 +111,7 @@
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.keylesspalace.tusky.fileprovider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data

View File

@ -145,7 +145,7 @@ public class LoginActivity extends AppCompatActivity {
private String getOauthRedirectUri() {
String scheme = getString(R.string.oauth_scheme);
String host = getString(R.string.oauth_redirect_host);
String host = BuildConfig.APPLICATION_ID;
return scheme + "://" + host + "/";
}

View File

@ -18,6 +18,7 @@ package com.keylesspalace.tusky;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
@ -371,6 +372,16 @@ public class MainActivity extends BaseActivity implements ActionButtonActivity {
return false;
})
.build();
if(BuildConfig.DEBUG) {
IDrawerItem debugItem = new SecondaryDrawerItem()
.withIdentifier(1337)
.withName("debug")
.withDisabledTextColor(Color.GREEN)
.withSelectable(false)
.withEnabled(false);
drawer.addItem(debugItem);
}
}
private void logout() {

View File

@ -4,7 +4,6 @@
<string name="app_website" translatable="false">https://tusky.keylesspalace.com</string>
<string name="oauth_scheme" translatable="false">oauth2redirect</string>
<string name="oauth_redirect_host" translatable="false">com.keylesspalace.tusky</string>
<string name="preferences_file_key" translatable="false">com.keylesspalace.tusky.PREFERENCES</string>
<string name="status_sensitive_media_template" translatable="false">&lt;b>%1$s&lt;/b>&lt;br>%2$s</string>

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB