Backed out changeset 4b301ec04c21 (bug 1182665) for android reftest orange CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 11 Sep 2015 11:21:04 -0700
changeset 296382 d48fbf99a903bf9eb4eb843d1f692737eba971dd
parent 296381 f37d3294ec16634db538951c2f74148a12e4773a
child 296383 fcd8a338f3ada1baa9de23b7d6d94cb9580a84a5
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1182665
milestone43.0a1
backs out4b301ec04c21b339af87dd31b9e298a40c90f80e
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
Backed out changeset 4b301ec04c21 (bug 1182665) for android reftest orange CLOSED TREE
widget/android/nsScreenManagerAndroid.cpp
--- a/widget/android/nsScreenManagerAndroid.cpp
+++ b/widget/android/nsScreenManagerAndroid.cpp
@@ -27,22 +27,16 @@ nsScreenAndroid::GetId(uint32_t *outId)
 {
     *outId = 1;
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsScreenAndroid::GetRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, int32_t *outHeight)
 {
-    if (!mozilla::jni::IsAvailable()) {
-      // xpcshell most likely
-      *outLeft = *outTop = *outWidth = *outHeight = 0;
-      return NS_ERROR_FAILURE;
-    }
-
     widget::sdk::Rect::LocalRef rect = widget::GeckoAppShell::GetScreenSize();
     rect->Left(outLeft);
     rect->Top(outTop);
     rect->Width(outWidth);
     rect->Height(outHeight);
 
     return NS_OK;
 }
@@ -54,39 +48,31 @@ nsScreenAndroid::GetAvailRect(int32_t *o
     return GetRect(outLeft, outTop, outWidth, outHeight);
 }
 
 
 
 NS_IMETHODIMP
 nsScreenAndroid::GetPixelDepth(int32_t *aPixelDepth)
 {
-    if (!mozilla::jni::IsAvailable()) {
-      // xpcshell most likely
-      *aPixelDepth = 16;
-      return NS_ERROR_FAILURE;
-    }
-
-    *aPixelDepth = widget::GeckoAppShell::GetScreenDepthWrapper();
+    *aPixelDepth = AndroidBridge::Bridge()->GetScreenDepth();
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsScreenAndroid::GetColorDepth(int32_t *aColorDepth)
 {
     return GetPixelDepth(aColorDepth);
 }
 
 void
 nsScreenAndroid::ApplyMinimumBrightness(uint32_t aBrightness)
 {
-    if (mozilla::jni::IsAvailable()) {
-      widget::GeckoAppShell::SetKeepScreenOn(aBrightness == BRIGHTNESS_FULL);
-    }
+    widget::GeckoAppShell::SetKeepScreenOn(aBrightness == BRIGHTNESS_FULL);
 }
 
 NS_IMPL_ISUPPORTS(nsScreenManagerAndroid, nsIScreenManager)
 
 nsScreenManagerAndroid::nsScreenManagerAndroid()
 {
     mOneScreen = new nsScreenAndroid(nullptr);
 }