diff --git a/AndroidManifest.xml b/AndroidManifest.xml index df98441d..ebf91fe0 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="123" + android:versionName="1.1" > Trial expired To continue using Tiny Tiny RSS please unlock the full version by purchasing the key. Sepia + Full version, thank you for support! \ No newline at end of file diff --git a/src/org/fox/ttrss/OnlineActivity.java b/src/org/fox/ttrss/OnlineActivity.java index 534c4a77..004fab6e 100644 --- a/src/org/fox/ttrss/OnlineActivity.java +++ b/src/org/fox/ttrss/OnlineActivity.java @@ -25,6 +25,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; @@ -450,18 +451,8 @@ public class OnlineActivity extends CommonActivity { } public void checkTrial(boolean notify) { - List pkgs = getPackageManager() - .getInstalledPackages(0); - - boolean isTrial = true; - - for (PackageInfo p : pkgs) { - if ("org.fox.ttrss.key".equals(p.packageName)) { - //toast(R.string.donate_thanks); - isTrial = false; - break; - } - } + boolean isTrial = getPackageManager().checkSignatures( + getPackageName(), "org.fox.ttrss.key") != PackageManager.SIGNATURE_MATCH; if (isTrial) { long firstStart = m_prefs.getLong("date_firstlaunch_trial", -1); @@ -512,6 +503,8 @@ public class OnlineActivity extends CommonActivity { toast(getString(R.string.trial_mode_prompt, Long.valueOf(daysLeft))); } } + } else if (notify) { + toast(R.string.trial_thanks); } }