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" > Unlock full version Trial expired To continue using Tiny Tiny RSS please unlock the full version by purchasing the key. + 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 36c46461..47ad86c0 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; @@ -447,18 +448,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); @@ -509,6 +500,8 @@ public class OnlineActivity extends CommonActivity { toast(getString(R.string.trial_mode_prompt, Long.valueOf(daysLeft))); } } + } else if (notify) { + toast(R.string.trial_thanks); } }