Bug 1287946 - Update existing code to use mozilla::java; r=me

This commit is contained in:
Jim Chen
2016-07-21 13:49:04 -04:00
parent 982705fc07
commit e8f534d407
67 changed files with 209 additions and 218 deletions

View File

@@ -7,7 +7,6 @@
#include "nsScreenManagerAndroid.h"
#include "nsWindow.h"
#include "AndroidBridge.h"
#include "GeneratedJNIWrappers.h"
#include "AndroidRect.h"
#include <mozilla/jni/Refs.h>
@@ -38,7 +37,7 @@ nsScreenAndroid::GetRect(int32_t *outLeft, int32_t *outTop, int32_t *outWidth, i
return NS_ERROR_FAILURE;
}
widget::sdk::Rect::LocalRef rect = widget::GeckoAppShell::GetScreenSize();
java::sdk::Rect::LocalRef rect = java::GeckoAppShell::GetScreenSize();
rect->Left(outLeft);
rect->Top(outTop);
rect->Width(outWidth);
@@ -65,7 +64,7 @@ nsScreenAndroid::GetPixelDepth(int32_t *aPixelDepth)
return NS_ERROR_FAILURE;
}
*aPixelDepth = widget::GeckoAppShell::GetScreenDepthWrapper();
*aPixelDepth = java::GeckoAppShell::GetScreenDepthWrapper();
return NS_OK;
}
@@ -80,7 +79,7 @@ void
nsScreenAndroid::ApplyMinimumBrightness(uint32_t aBrightness)
{
if (mozilla::jni::IsAvailable()) {
widget::GeckoAppShell::SetKeepScreenOn(aBrightness == BRIGHTNESS_FULL);
java::GeckoAppShell::SetKeepScreenOn(aBrightness == BRIGHTNESS_FULL);
}
}