Merge branch 'master' of github.com:gothfox/Tiny-Tiny-RSS-for-Honeycomb

Conflicts:
	res/values/strings.xml
This commit is contained in:
Andrew Dolgov 2012-12-31 03:15:27 +04:00
commit fc4111ae22
3 changed files with 8 additions and 14 deletions

View File

@ -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"

View File

@ -152,4 +152,5 @@
<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="theme_sepia">Sepia</string>
<string name="trial_thanks">Full version, thank you for support!</string>
</resources>

View File

@ -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<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);
@ -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);
}
}