|
|
|
Created:
Dec. 24, 2014, 9:45 a.m. by Felix Dahlke Modified:
May 21, 2015, 11:57 a.m. Visibility:
Public. |
DescriptionDisable the start pane
Patch Set 1 #Patch Set 2 : Actually hide the start pane #
Total comments: 3
Patch Set 3 : Make the change in GeckoProfile.java rather than BrowserApp.java #MessagesTotal messages: 9
This disables the confusing "Log into Adblock Browser" (AKA Firefox Sync) popup on first run.
LGTM
I'm not sure why I thought my patch does the trick, but it certainly doesn't. StartPane.java is not an activity to begin with. I suppose Android just ignores the activity declaration in the manifest, so `enabled = "false"` doesn't change anything. It looks like there's no way around changing the code for this :( http://codereview.adblockplus.org/5928376401395712/diff/5750085036015616/mobi... File mobile/android/base/BrowserApp.java (right): http://codereview.adblockplus.org/5928376401395712/diff/5750085036015616/mobi... mobile/android/base/BrowserApp.java:625: // We never want the start pane to show up in Adblock Browser. There are two places where we can keep the start pane from showing up - here (where it's shown) and in GeckoProfile.java, where PREF_STARTPANE_ENABLED is initialised. I've opted for making the cut here, since it'll keep the pane from showing up no matter what, and since I don't need to touch existing code here.
LGTM still, have a look at the comment. http://codereview.adblockplus.org/5928376401395712/diff/5750085036015616/mobi... File mobile/android/base/BrowserApp.java (right): http://codereview.adblockplus.org/5928376401395712/diff/5750085036015616/mobi... mobile/android/base/BrowserApp.java:625: // We never want the start pane to show up in Adblock Browser. On 2015/03/01 12:00:50, Felix H. Dahlke wrote: > There are two places where we can keep the start pane from showing up - here > (where it's shown) and in GeckoProfile.java, where PREF_STARTPANE_ENABLED is > initialised. > > I've opted for making the cut here, since it'll keep the pane from showing up no > matter what, and since I don't need to touch existing code here. I really don't like having dead code lying around, but if you really want to fix it this way, we should file a follow-up issue to check if we can disable this by modifying GeckoProfile only. If so, modifying a single line instead of adding four might also be a 'minimal' change.
http://codereview.adblockplus.org/5928376401395712/diff/5750085036015616/mobi... File mobile/android/base/BrowserApp.java (right): http://codereview.adblockplus.org/5928376401395712/diff/5750085036015616/mobi... mobile/android/base/BrowserApp.java:625: // We never want the start pane to show up in Adblock Browser. On 2015/03/01 18:27:30, René Jeschke wrote: > On 2015/03/01 12:00:50, Felix H. Dahlke wrote: > > There are two places where we can keep the start pane from showing up - here > > (where it's shown) and in GeckoProfile.java, where PREF_STARTPANE_ENABLED is > > initialised. > > > > I've opted for making the cut here, since it'll keep the pane from showing up > no > > matter what, and since I don't need to touch existing code here. > > I really don't like having dead code lying around, but if you really want to fix > it this way, we should file a follow-up issue to check if we can disable this by > modifying GeckoProfile only. > If so, modifying a single line instead of adding four might also be a 'minimal' > change. We can change it in GeckoProfile, as I said. But the change is more messy, we need to modify existing code rather than add some new code above it, as we can here. We need to change this: // Initialize pref flag for displaying the start pane for a new non-webapp profile. if (!mIsWebAppProfile) { final SharedPreferences prefs = GeckoSharedPrefs.forProfile(mApplicationContext); prefs.edit().putBoolean(BrowserApp.PREF_STARTPANE_ENABLED, true).apply(); } Into something like this: // Initialize pref flag for displaying the start pane for a new non-webapp profile. // In Adblock Browser, however, we never want to see the start pane. if (false && !mIsWebAppProfile) { final SharedPreferences prefs = GeckoSharedPrefs.forProfile(mApplicationContext); prefs.edit().putBoolean(BrowserApp.PREF_STARTPANE_ENABLED, true).apply(); } That's arguably more messy. Sure, we could also just remove the code, effectively never setting startpane to enabled. But that's also a more intrusive change.
Discussed this over IRC with René - we'll go for removing the code that sets PREF_STARTPANE_ENABLED to true in GeckoProfile.java, leaving a comment behind.
New patch set up, as discussed.
On 2015/03/02 10:01:41, Felix H. Dahlke wrote: > New patch set up, as discussed. LGTM
LGTM
|
