add new debug build so two tusky versions can be run on the same device
|
@ -20,6 +20,9 @@ android {
|
||||||
shrinkResources true
|
shrinkResources true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
debug {
|
||||||
|
applicationIdSuffix ".test"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flavorDimensions "store"
|
flavorDimensions "store"
|
||||||
|
|
11
app/src/debug/res/drawable/ic_launcher_background.xml
Normal 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>
|
BIN
app/src/debug/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
app/src/debug/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
app/src/debug/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
app/src/debug/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 20 KiB |
|
@ -40,7 +40,7 @@
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<category android:name="android.intent.category.BROWSABLE" />
|
||||||
|
|
||||||
<data
|
<data
|
||||||
android:host="@string/oauth_redirect_host"
|
android:host="${applicationId}"
|
||||||
android:scheme="@string/oauth_scheme" />
|
android:scheme="@string/oauth_scheme" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="android.support.v4.content.FileProvider"
|
android:name="android.support.v4.content.FileProvider"
|
||||||
android:authorities="com.keylesspalace.tusky.fileprovider"
|
android:authorities="${applicationId}.fileprovider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|
|
@ -145,7 +145,7 @@ public class LoginActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private String getOauthRedirectUri() {
|
private String getOauthRedirectUri() {
|
||||||
String scheme = getString(R.string.oauth_scheme);
|
String scheme = getString(R.string.oauth_scheme);
|
||||||
String host = getString(R.string.oauth_redirect_host);
|
String host = BuildConfig.APPLICATION_ID;
|
||||||
return scheme + "://" + host + "/";
|
return scheme + "://" + host + "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ package com.keylesspalace.tusky;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -371,6 +372,16 @@ public class MainActivity extends BaseActivity implements ActionButtonActivity {
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
.build();
|
.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() {
|
private void logout() {
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
<string name="app_website" translatable="false">https://tusky.keylesspalace.com</string>
|
<string name="app_website" translatable="false">https://tusky.keylesspalace.com</string>
|
||||||
|
|
||||||
<string name="oauth_scheme" translatable="false">oauth2redirect</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="preferences_file_key" translatable="false">com.keylesspalace.tusky.PREFERENCES</string>
|
||||||
|
|
||||||
<string name="status_sensitive_media_template" translatable="false"><b>%1$s</b><br>%2$s</string>
|
<string name="status_sensitive_media_template" translatable="false"><b>%1$s</b><br>%2$s</string>
|
||||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |