streamline key detection, bump version
This commit is contained in:
parent
204ee6d4b9
commit
d4e823efcc
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fox.ttrss"
|
||||
android:versionCode="122"
|
||||
android:versionName="1.0" >
|
||||
android:versionCode="123"
|
||||
android:versionName="1.1" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="8"
|
||||
|
@ -151,4 +151,5 @@
|
||||
<string name="trial_purchase">Unlock full version</string>
|
||||
<string name="trial_expired">Trial expired</string>
|
||||
<string name="trial_expired_message">To continue using Tiny Tiny RSS please unlock the full version by purchasing the key.</string>
|
||||
<string name="trial_thanks">Full version, thank you for support!</string>
|
||||
</resources>
|
@ -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<PackageInfo> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user