remove unused amazon device check

This commit is contained in:
Andrew Dolgov 2014-10-15 21:11:37 +04:00
parent eae22a4771
commit 34f23b9901
3 changed files with 11 additions and 24 deletions

View File

@ -50,10 +50,6 @@ public class CommonActivity extends ActionBarActivity {
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();
editor.putBoolean("show_unread_only", unread);

View File

@ -149,10 +149,8 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
ft.commit();
if (!isAmazonDevice()) {
AppRater.appLaunched(this);
checkTrial(true);
}
AppRater.appLaunched(this);
checkTrial(true);
} else { // savedInstanceState != null
m_actionbarUpEnabled = savedInstanceState.getBoolean("actionbarUpEnabled");

View File

@ -176,10 +176,7 @@ public class OnlineActivity extends CommonActivity {
if (isOffline) {
switchOfflineSuccess();
} else {
if (!isAmazonDevice()) {
checkTrial(false);
}
checkTrial(false);
/* if (getIntent().getExtras() != null) {
Intent i = getIntent();
@ -1261,19 +1258,15 @@ public class OnlineActivity extends CommonActivity {
initMenu();
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;
}
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;