Bug 1484463 - Remove GeckoAppShell.setScreenDepthOverride(). r=jchen
authorRandall Barker <rbarker@mozilla.com>
Mon, 20 Aug 2018 19:11:09 +0000
changeset 487474 a1376639939701af68140b1c3029cadff03c88b2
parent 487473 bdbea15cf0ba472eb2f2ee2c968f74d903091519
child 487557 d0d2e0f4b33cd28bc05c353c185873256f7f926e
child 487558 da16d500fe4e4ad3ca61a2fd3f51b4217bd834b0
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1484463
milestone63.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 1484463 - Remove GeckoAppShell.setScreenDepthOverride(). r=jchen Differential Revision: https://phabricator.services.mozilla.com/D3813
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
widget/android/nsAppShell.cpp
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -1042,26 +1042,16 @@ public class GeckoAppShell
                 sScreenDepth = 24;
             }
         }
 
         return sScreenDepth;
     }
 
     @WrapForJNI(calledFrom = "gecko")
-    private static synchronized void setScreenDepthOverride(int aScreenDepth) {
-        if (sScreenDepth != 0) {
-            Log.e(LOGTAG, "Tried to override screen depth after it's already been set");
-            throw new IllegalStateException();
-        }
-
-        sScreenDepth = aScreenDepth;
-    }
-
-    @WrapForJNI(calledFrom = "gecko")
     private static void performHapticFeedback(boolean aIsLongPress) {
         // Don't perform haptic feedback if a vibration is currently playing,
         // because the haptic feedback will nuke the vibration.
         if (!sVibrationMaybePlaying || System.nanoTime() >= sVibrationEndTime) {
             getHapticFeedbackDelegate().performHapticFeedback(
                     aIsLongPress ? HapticFeedbackConstants.LONG_PRESS
                                  : HapticFeedbackConstants.VIRTUAL_KEY);
             sVibrationMaybePlaying = false;
--- a/widget/android/nsAppShell.cpp
+++ b/widget/android/nsAppShell.cpp
@@ -582,21 +582,16 @@ nsAppShell::Observe(nsISupports* aSubjec
         return NS_OK;
 
     } else if (!strcmp(aTopic, "browser-delayed-startup-finished")) {
         NS_CreateServicesFromCategory("browser-delayed-startup-finished", nullptr,
                                       "browser-delayed-startup-finished");
 
     } else if (!strcmp(aTopic, "profile-after-change")) {
         if (jni::IsAvailable()) {
-            // See if we want to force 16-bit color before doing anything
-            if (Preferences::GetBool("gfx.android.rgb16.force", false)) {
-                java::GeckoAppShell::SetScreenDepthOverride(16);
-            }
-
             java::GeckoThread::SetState(
                     java::GeckoThread::State::PROFILE_READY());
 
             // Gecko on Android follows the Android app model where it never
             // stops until it is killed by the system or told explicitly to
             // quit. Therefore, we should *not* exit Gecko when there is no
             // window or the last window is closed. nsIAppStartup::Quit will
             // still force Gecko to exit.