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

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

Issue 29328791: Issue 3136 - Only show about:feedback to release build users (Closed)
Patch Set: Created Oct. 1, 2015, 2:26 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
Index: mobile/android/base/BrowserApp.java
===================================================================
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -3537,13 +3537,18 @@
try {
SharedPreferences settings = getPreferences(Activity.MODE_PRIVATE);
int launchCount = settings.getInt(keyName, 0);
- if (launchCount < FEEDBACK_LAUNCH_COUNT) {
+ // 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 &&
René Jeschke 2015/10/01 14:38:11 Is it really necessary to check `wasInstalledFromP
Felix Dahlke 2015/10/01 15:30:53 I've changed this mainly to ensure that users that
René Jeschke 2015/10/02 08:22:34 I wasn't really concerned about performance issues
+ AppConstants.ABB_RELEASE_BUILD && wasInstalledFromPlayStore()) {
// 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 && wasInstalledFromPlayStore()) {
+ if (launchCount == FEEDBACK_LAUNCH_COUNT) {
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Feedback:Show", null));
}
}
« mobile/android/base/AppConstants.java.in ('K') | « mobile/android/base/AppConstants.java.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld