Index: mobile/android/base/BrowserApp.java |
diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java |
index 690b3004f1d5f539347df8ad5b4a883326291e98..a1d61dd633d743f17e5643158c0099c03c42e5c3 100644 |
--- a/mobile/android/base/BrowserApp.java |
+++ b/mobile/android/base/BrowserApp.java |
@@ -232,9 +232,10 @@ public class BrowserApp extends GeckoApp |
private FindInPageBar mFindInPageBar; |
private MediaCastingBar mMediaCastingBar; |
- // Don't show about:feedback automatically in Adblock Browser, see |
- // https://issues.adblockplus.org/ticket/2521 |
- private static final int FEEDBACK_LAUNCH_COUNT = 0; |
+ // We again show about:feedback automatically in Adblock Browser, after |
+ // 5 application starts, but only for installations from the PlayStore, |
+ // see https://issues.adblockplus.org/ticket/2967 |
+ private static final int FEEDBACK_LAUNCH_COUNT = 5; |
// Stored value of the toolbar height, so we know when it's changed. |
private int mToolbarHeight; |
@@ -3542,7 +3543,7 @@ public class BrowserApp extends GeckoApp |
settings.edit().putInt(keyName, launchCount).apply(); |
// If we've reached our magic number, show the feedback page. |
- if (launchCount == FEEDBACK_LAUNCH_COUNT) { |
+ if (launchCount == FEEDBACK_LAUNCH_COUNT && wasInstalledFromPlayStore()) { |
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Feedback:Show", null)); |
} |
} |
@@ -3551,6 +3552,11 @@ public class BrowserApp extends GeckoApp |
} |
} |
+ 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 |