Unsupported

pull/194/merge
M66B 3 years ago
parent b55e54dbac
commit c2524276ad

@ -27,6 +27,8 @@ import android.content.res.Configuration;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
@ -42,10 +44,25 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
@Override
protected void onCreate(Bundle savedInstanceState) {
if (!Helper.isSupportedDevice() && Helper.isPlayStoreInstall()) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean accept_unsupported = prefs.getBoolean("accept_unsupported", false);
if (!accept_unsupported &&
!Helper.isSupportedDevice() &&
Helper.isPlayStoreInstall()) {
setTheme(R.style.AppThemeBlueOrangeLight);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_unsupported);
Button btnContinue = findViewById(R.id.btnContinue);
btnContinue.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
prefs.edit().putBoolean("accept_unsupported", true).commit();
ApplicationEx.restart(v.getContext());
}
});
return;
}
@ -111,7 +128,6 @@ public class ActivityMain extends ActivityBase implements FragmentManager.OnBack
return;
}
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
boolean eula = prefs.getBoolean("eula", false);
boolean sync_on_launch = prefs.getBoolean("sync_on_launch", false);

@ -6,13 +6,25 @@
android:padding="12dp">
<eu.faircode.email.FixedTextView
android:id="@+id/tvWarning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/app_crash"
android:text="@string/app_unsupported"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?attr/colorWarning"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/btnContinue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:drawableEnd="@drawable/twotone_check_24"
android:drawablePadding="6dp"
android:text="@string/app_continue"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvWarning" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -7,7 +7,8 @@
<string name="app_welcome">FairEmail is an open source email app focused on privacy and security. For this reason some features might work differently from what you are used to.</string>
<string name="app_limitations">For example, messages are reformatted by default to remove unsafe elements and to improve readability, and opening links needs to be confirmed for safety. Both can be disabled if desired.</string>
<string name="app_eula" translatable="false">THIS SOFTWARE IS PROVIDED BY THE AUTHOR \'\'AS IS\'\' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</string>
<string name="app_crash">FairEmail is not supported on this device because bugs in Android cause crashes</string>
<string name="app_unsupported">Bugs in the Android version of this particular device cause crashes</string>
<string name="app_continue">Continue anyway</string>
<string name="app_exit">Go \'back\' again to exit</string>
<string name="app_cake">Insufficient storage space left</string>
<string name="app_updated">Last update: %1$s</string>

Loading…
Cancel
Save