Skip to content

Commit

Permalink
Extended version alert message for deprecated Android versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
schildbach committed Mar 19, 2014
1 parent fecdf0f commit 7b048e6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions wallet/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
oder empfangen.\n\nDu solltest Deine Zeit- und Zeitzoneneinstellungen überprüfen und korrigieren.</string>
<string name="wallet_version_dialog_title">Eine neue Version ist verfügbar!</string>
<string name="wallet_version_dialog_msg">Diese Version behebt wichtige Fehler. Die Einzelheiten stehen in der Liste der Änderungen auf Google Play.</string>
<string name="wallet_version_dialog_msg_deprecated">Wenn du kein Update siehst, heißt das vermutlich daß deine Android-Version nicht mehr unterstützt wird.</string>
<string name="wallet_version_dialog_button_market">Google Play</string>
<string name="wallet_version_dialog_button_binary">Herunterladen</string>
<string name="wallet_precision_warning_dialog_title">Änderung der Stückelung</string>
Expand Down
1 change: 1 addition & 0 deletions wallet/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<string name="wallet_timeskew_dialog_msg">Your device time is off by %d minutes. You probably cannot send or receive Bitcoins due to this problem.\n\nYou should check and correct your time and timezone settings.</string>
<string name="wallet_version_dialog_title">A new version is available!</string>
<string name="wallet_version_dialog_msg">This version fixes important bugs. For details, see the change log on Google Play.</string>
<string name="wallet_version_dialog_msg_deprecated">If you don\'t see an update, this probably means your version of Android isn\'t supported any more.</string>
<string name="wallet_version_dialog_button_market">Google Play</string>
<string name="wallet_version_dialog_button_binary">Download</string>
<string name="wallet_precision_warning_dialog_title">Change of denomination</string>
Expand Down
3 changes: 3 additions & 0 deletions wallet/src/de/schildbach/wallet/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.File;
import java.nio.charset.Charset;

import android.os.Build;
import android.os.Environment;
import android.text.format.DateUtils;

Expand Down Expand Up @@ -109,6 +110,8 @@ public class Constants
public static final int SDK_JELLY_BEAN = 16;
public static final int SDK_JELLY_BEAN_MR2 = 18;

public static final int SDK_DEPRECATED_BELOW = Build.VERSION_CODES.ICE_CREAM_SANDWICH;

public static final int MEMORY_CLASS_LOWEND = 48;

public static final Charset UTF_8 = Charset.forName("UTF-8");
Expand Down
6 changes: 5 additions & 1 deletion wallet/src/de/schildbach/wallet/ui/WalletActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import android.net.Uri;
import android.nfc.NdefMessage;
import android.nfc.NfcAdapter;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.text.format.DateUtils;
Expand Down Expand Up @@ -743,7 +744,10 @@ private Dialog createVersionAlertDialog()
final Intent binaryIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(Constants.BINARY_URL));

final DialogBuilder dialog = DialogBuilder.warn(this, R.string.wallet_version_dialog_title);
dialog.setMessage(getString(R.string.wallet_version_dialog_msg));
final StringBuilder message = new StringBuilder(getString(R.string.wallet_version_dialog_msg));
if (Build.VERSION.SDK_INT < Constants.SDK_DEPRECATED_BELOW)
message.append("\n\n").append(getString(R.string.wallet_version_dialog_msg_deprecated));
dialog.setMessage(message);

if (pm.resolveActivity(marketIntent, 0) != null)
{
Expand Down

0 comments on commit 7b048e6

Please sign in to comment.