Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: mobile/android/base/BrowserApp.java

Issue 29341330: Issue 3135 - Show the first run slide about the beta community to users that installed via Play and… (Closed)
Patch Set: Created May 12, 2016, 3:21 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mobile/android/thirdparty/org/adblockplus/browser/BrowserAppUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mobile/android/base/BrowserApp.java
===================================================================
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -3553,36 +3553,31 @@ public class BrowserApp extends GeckoApp
try {
SharedPreferences settings = getPreferences(Activity.MODE_PRIVATE);
int launchCount = settings.getInt(keyName, 0);
// In Adblock Browser, we only want to increment the feedback page
// launch count for release builds that were installed from the
// Play store, see https://issues.adblockplus.org/ticket/2967 and
// https://issues.adblockplus.org/ticket/3136.
if (launchCount < FEEDBACK_LAUNCH_COUNT &&
- AppConstants.ABB_RELEASE_BUILD && wasInstalledFromPlayStore()) {
+ AppConstants.ABB_RELEASE_BUILD && org.adblockplus.browser.BrowserAppUtils.wasInstalledFromPlayStore(this)) {
anton 2016/09/12 11:36:11 what the point of using full classname with packag
diegocarloslima 2016/10/20 12:18:07 I agree with you that using an import + simple cla
// Increment the launch count and store the new value.
launchCount++;
settings.edit().putInt(keyName, launchCount).apply();
// If we've reached our magic number, show the feedback page.
if (launchCount == FEEDBACK_LAUNCH_COUNT) {
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Feedback:Show", null));
}
}
} finally {
StrictMode.setThreadPolicy(savedPolicy);
}
}
- private boolean wasInstalledFromPlayStore() {
- final String installer = this.getPackageManager().getInstallerPackageName(this.getPackageName());
- return "com.android.vending".equals(installer);
- }
-
private void showTabQueuePromptIfApplicable(final Intent intent) {
ThreadUtils.postToBackgroundThread(new Runnable() {
@Override
public void run() {
// We only want to show the prompt if the browser has been opened from an external url
if (TabQueueHelper.TAB_QUEUE_ENABLED && mInitialized
&& Intent.ACTION_VIEW.equals(intent.getAction())
&& TabQueueHelper.shouldShowTabQueuePrompt(BrowserApp.this)) {
« no previous file with comments | « no previous file | mobile/android/thirdparty/org/adblockplus/browser/BrowserAppUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld