Browse Source

Merge branch 'master' of git.fakecake.org:tt-rss-android

Andrew Dolgov 7 months ago
parent
commit
9782c1a728

+ 2 - 2
org.fox.ttrss/src/main/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.fox.ttrss"
-    android:versionCode="510"
-    android:versionName="1.276">
+    android:versionCode="511"
+    android:versionName="1.277">
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

+ 14 - 0
org.fox.ttrss/src/main/java/org/fox/ttrss/OnlineActivity.java

@@ -20,6 +20,7 @@ import android.net.NetworkInfo;
 import android.net.Uri;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
+import android.provider.Settings;
 import android.util.Log;
 import android.view.Display;
 import android.view.KeyEvent;
@@ -275,6 +276,19 @@ public class OnlineActivity extends CommonActivity {
 	}
 
 	public void login(boolean refresh, OnLoginFinishedListener listener) {
+
+		if (BuildConfig.ENABLE_TRIAL && !BuildConfig.DEBUG) {
+			String testLabSetting = Settings.System.getString(getContentResolver(), "firebase.test.lab");
+
+			if ("true".equals(testLabSetting)) {
+				SharedPreferences.Editor editor = m_prefs.edit();
+				editor.putString("ttrss_url", "https://srv.tt-rss.org/tt-rss");
+				editor.putString("login", "demo");
+				editor.putString("password", "demo");
+				editor.apply();
+			}
+		}
+
 		if (m_prefs.getString("ttrss_url", "").trim().length() == 0) {
 
 			setLoadingStatus(R.string.login_need_configure);

+ 2 - 0
org.fox.ttrss/src/main/res/values-v21/style.xml

@@ -3,6 +3,8 @@
         <item name="android:windowDrawsSystemBarBackgrounds">true</item>
         <item name="android:statusBarColor">@android:color/transparent</item>
         <item name="android:windowBackground">@color/window_background</item>
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
     </style>
 
     <!-- <style name="DarkTheme.Base" parent="Theme.AppCompat.NoActionBar">

+ 2 - 0
org.fox.ttrss/src/main/res/values/style.xml

@@ -2,6 +2,8 @@
 
     <style name="AppTheme.Base" parent="Theme.AppCompat.DayNight">
         <item name="android:windowNoTitle">true</item>
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
     </style>
 
     <style name="AppTheme" parent="AppTheme.Base">