disable trial stuff on amazon devices
This commit is contained in:
parent
f955dac12b
commit
d4caac40d4
@ -43,6 +43,10 @@ public class CommonActivity extends SherlockFragmentActivity {
|
||||
public boolean getUnreadOnly() {
|
||||
return m_prefs.getBoolean("show_unread_only", true);
|
||||
}
|
||||
|
||||
public static boolean isAmazonDevice() {
|
||||
return android.os.Build.MANUFACTURER.equals("Amazon");
|
||||
}
|
||||
|
||||
public void setUnreadOnly(boolean unread) {
|
||||
SharedPreferences.Editor editor = m_prefs.edit();
|
||||
|
@ -127,8 +127,10 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
|
||||
|
||||
ft.commit();
|
||||
|
||||
AppRater.appLaunched(this);
|
||||
checkTrial(true);
|
||||
if (!isAmazonDevice()) {
|
||||
AppRater.appLaunched(this);
|
||||
checkTrial(true);
|
||||
}
|
||||
|
||||
} else { // savedInstanceState != null
|
||||
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");
|
||||
|
@ -173,7 +173,10 @@ public class OnlineActivity extends CommonActivity {
|
||||
if (isOffline) {
|
||||
switchOfflineSuccess();
|
||||
} else {
|
||||
checkTrial(false);
|
||||
|
||||
if (!isAmazonDevice()) {
|
||||
checkTrial(false);
|
||||
}
|
||||
|
||||
/* if (getIntent().getExtras() != null) {
|
||||
Intent i = getIntent();
|
||||
@ -1226,15 +1229,19 @@ public class OnlineActivity extends CommonActivity {
|
||||
|
||||
initMenu();
|
||||
|
||||
List<PackageInfo> pkgs = getPackageManager()
|
||||
.getInstalledPackages(0);
|
||||
|
||||
for (PackageInfo p : pkgs) {
|
||||
if ("org.fox.ttrss.key".equals(p.packageName)) {
|
||||
Log.d(TAG, "license apk found");
|
||||
menu.findItem(R.id.donate).setVisible(false);
|
||||
break;
|
||||
if (!isAmazonDevice()) {
|
||||
List<PackageInfo> pkgs = getPackageManager()
|
||||
.getInstalledPackages(0);
|
||||
|
||||
for (PackageInfo p : pkgs) {
|
||||
if ("org.fox.ttrss.key".equals(p.packageName)) {
|
||||
Log.d(TAG, "license apk found");
|
||||
menu.findItem(R.id.donate).setVisible(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
menu.findItem(R.id.donate).setVisible(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user