Bug 1028710 - Init private tab bg color to avoid flickering (r=mfinkle)
authorLucas Rocha <lucasr@mozilla.com>
Thu, 03 Jul 2014 21:09:26 +0100
changeset 192312 9e5e9a282e0c601171992ef44a2216cf2e308434
parent 192311 0a020e03333812d4966c275f2c7720971630ec53
child 192313 9fc70845e27c9882ecef5cbc81d1d58015d7c3fe
push id27080
push userryanvm@gmail.com
push dateFri, 04 Jul 2014 03:24:41 +0000
treeherdermozilla-central@e8df6826a571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1028710
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1028710 - Init private tab bg color to avoid flickering (r=mfinkle)
mobile/android/base/PrivateTab.java
--- a/mobile/android/base/PrivateTab.java
+++ b/mobile/android/base/PrivateTab.java
@@ -5,16 +5,21 @@
 
 package org.mozilla.gecko;
 
 import android.content.Context;
 
 public class PrivateTab extends Tab {
     public PrivateTab(Context context, int id, String url, boolean external, int parentId, String title) {
         super(context, id, url, external, parentId, title);
+
+        // Init background to background_private to ensure flicker-free
+        // private tab creation. Page loads will reset it to white as expected.
+        final int bgColor = context.getResources().getColor(R.color.background_private);
+        setBackgroundColor(bgColor);
     }
 
     @Override
     protected void saveThumbnailToDB() {}
 
     @Override
     public boolean isPrivate() {
         return true;