diff --git a/res/values/strings.xml b/res/values/strings.xml
index 24bf38bc3b..e55f37dcb2 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1397,6 +1397,7 @@
Invite your friends!
The more friends use Signal, the better it gets.
Signal is experiencing technical difficulties. We are working hard to restore service as quickly as possible.
+ The latest Signal features won\'t work on this version of Android. Please upgrade this device to receive future Signal updates.
Save
diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java
index 90852fa258..de333787b7 100644
--- a/src/org/thoughtcrime/securesms/ConversationListFragment.java
+++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java
@@ -71,6 +71,7 @@ import org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder;
import org.thoughtcrime.securesms.components.reminder.ShareReminder;
import org.thoughtcrime.securesms.components.reminder.SystemSmsImportReminder;
import org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder;
+import org.thoughtcrime.securesms.components.reminder.UnsupportedAndroidVersionReminder;
import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.MessagingDatabase.MarkedMessageInfo;
import org.thoughtcrime.securesms.database.loaders.ConversationListLoader;
@@ -201,6 +202,8 @@ public class ConversationListFragment extends Fragment
final Context context = params[0];
if (UnauthorizedReminder.isEligible(context)) {
return Optional.of(new UnauthorizedReminder(context));
+ } else if (UnsupportedAndroidVersionReminder.isEligible()) {
+ return Optional.of(new UnsupportedAndroidVersionReminder(context));
} else if (ExpiredBuildReminder.isEligible()) {
return Optional.of(new ExpiredBuildReminder(context));
} else if (ServiceOutageReminder.isEligible(context)) {
diff --git a/src/org/thoughtcrime/securesms/components/reminder/UnsupportedAndroidVersionReminder.java b/src/org/thoughtcrime/securesms/components/reminder/UnsupportedAndroidVersionReminder.java
new file mode 100644
index 0000000000..7f94ff2428
--- /dev/null
+++ b/src/org/thoughtcrime/securesms/components/reminder/UnsupportedAndroidVersionReminder.java
@@ -0,0 +1,23 @@
+package org.thoughtcrime.securesms.components.reminder;
+
+import android.content.Context;
+import android.os.Build;
+import android.support.annotation.NonNull;
+
+import org.thoughtcrime.securesms.R;
+
+public class UnsupportedAndroidVersionReminder extends Reminder {
+
+ public UnsupportedAndroidVersionReminder(@NonNull Context context) {
+ super(null, context.getString(R.string.reminder_header_the_latest_signal_features_wont_work));
+ }
+
+ @Override
+ public boolean isDismissable() {
+ return false;
+ }
+
+ public static boolean isEligible() {
+ return Build.VERSION.SDK_INT < 19;
+ }
+}
diff --git a/src/org/thoughtcrime/securesms/util/Util.java b/src/org/thoughtcrime/securesms/util/Util.java
index 3c0400c7ef..3422da5b15 100644
--- a/src/org/thoughtcrime/securesms/util/Util.java
+++ b/src/org/thoughtcrime/securesms/util/Util.java
@@ -395,8 +395,12 @@ public class Util {
}
public static int getDaysTillBuildExpiry() {
- int age = (int)TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - BuildConfig.BUILD_TIMESTAMP);
- return 90 - age;
+ if (Build.VERSION.SDK_INT < 19) {
+ return Integer.MAX_VALUE;
+ } else {
+ int age = (int) TimeUnit.MILLISECONDS.toDays(System.currentTimeMillis() - BuildConfig.BUILD_TIMESTAMP);
+ return 90 - age;
+ }
}
@TargetApi(VERSION_CODES.LOLLIPOP)