1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/widget/android/GeneratedJNIWrappers.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,2443 @@ 1.4 +// GENERATED CODE 1.5 +// Generated by the Java program at /build/annotationProcessors at compile time from 1.6 +// annotations on Java methods. To update, change the annotations on the corresponding Java 1.7 +// methods and rerun the build. Manually updating this file will cause your build to fail. 1.8 + 1.9 +#include "GeneratedJNIWrappers.h" 1.10 +#include "AndroidBridgeUtilities.h" 1.11 +#include "nsXPCOMStrings.h" 1.12 +#include "AndroidBridge.h" 1.13 + 1.14 +namespace mozilla { 1.15 +namespace widget { 1.16 +namespace android { 1.17 +jclass GeckoAppShell::mGeckoAppShellClass = 0; 1.18 +jmethodID GeckoAppShell::jAcknowledgeEvent = 0; 1.19 +jmethodID GeckoAppShell::jAddPluginViewWrapper = 0; 1.20 +jmethodID GeckoAppShell::jAlertsProgressListener_OnProgress = 0; 1.21 +jmethodID GeckoAppShell::jCancelVibrate = 0; 1.22 +jmethodID GeckoAppShell::jCheckURIVisited = 0; 1.23 +jmethodID GeckoAppShell::jClearMessageList = 0; 1.24 +jmethodID GeckoAppShell::jCloseCamera = 0; 1.25 +jmethodID GeckoAppShell::jCloseNotification = 0; 1.26 +jmethodID GeckoAppShell::jCreateMessageListWrapper = 0; 1.27 +jmethodID GeckoAppShell::jCreateShortcut = 0; 1.28 +jmethodID GeckoAppShell::jDeleteMessageWrapper = 0; 1.29 +jmethodID GeckoAppShell::jDisableBatteryNotifications = 0; 1.30 +jmethodID GeckoAppShell::jDisableNetworkNotifications = 0; 1.31 +jmethodID GeckoAppShell::jDisableScreenOrientationNotifications = 0; 1.32 +jmethodID GeckoAppShell::jDisableSensor = 0; 1.33 +jmethodID GeckoAppShell::jEnableBatteryNotifications = 0; 1.34 +jmethodID GeckoAppShell::jEnableLocation = 0; 1.35 +jmethodID GeckoAppShell::jEnableLocationHighAccuracy = 0; 1.36 +jmethodID GeckoAppShell::jEnableNetworkNotifications = 0; 1.37 +jmethodID GeckoAppShell::jEnableScreenOrientationNotifications = 0; 1.38 +jmethodID GeckoAppShell::jEnableSensor = 0; 1.39 +jmethodID GeckoAppShell::jGetContext = 0; 1.40 +jmethodID GeckoAppShell::jGetCurrentBatteryInformationWrapper = 0; 1.41 +jmethodID GeckoAppShell::jGetCurrentNetworkInformationWrapper = 0; 1.42 +jmethodID GeckoAppShell::jGetDensity = 0; 1.43 +jmethodID GeckoAppShell::jGetDpiWrapper = 0; 1.44 +jmethodID GeckoAppShell::jGetExtensionFromMimeTypeWrapper = 0; 1.45 +jmethodID GeckoAppShell::jGetHandlersForMimeTypeWrapper = 0; 1.46 +jmethodID GeckoAppShell::jGetHandlersForURLWrapper = 0; 1.47 +jmethodID GeckoAppShell::jGetIconForExtensionWrapper = 0; 1.48 +jmethodID GeckoAppShell::jGetMessageWrapper = 0; 1.49 +jmethodID GeckoAppShell::jGetMimeTypeFromExtensionsWrapper = 0; 1.50 +jmethodID GeckoAppShell::jGetNextMessageInListWrapper = 0; 1.51 +jmethodID GeckoAppShell::jGetProxyForURIWrapper = 0; 1.52 +jmethodID GeckoAppShell::jGetScreenDepthWrapper = 0; 1.53 +jmethodID GeckoAppShell::jGetScreenOrientationWrapper = 0; 1.54 +jmethodID GeckoAppShell::jGetShowPasswordSetting = 0; 1.55 +jmethodID GeckoAppShell::jGetSystemColoursWrapper = 0; 1.56 +jmethodID GeckoAppShell::jHandleGeckoMessageWrapper = 0; 1.57 +jmethodID GeckoAppShell::jHandleUncaughtException = 0; 1.58 +jmethodID GeckoAppShell::jHideProgressDialog = 0; 1.59 +jmethodID GeckoAppShell::jInitCameraWrapper = 0; 1.60 +jmethodID GeckoAppShell::jIsNetworkLinkKnown = 0; 1.61 +jmethodID GeckoAppShell::jIsNetworkLinkUp = 0; 1.62 +jmethodID GeckoAppShell::jIsTablet = 0; 1.63 +jmethodID GeckoAppShell::jKillAnyZombies = 0; 1.64 +jmethodID GeckoAppShell::jLoadPluginClass = 0; 1.65 +jmethodID GeckoAppShell::jLockScreenOrientation = 0; 1.66 +jmethodID GeckoAppShell::jMarkURIVisited = 0; 1.67 +jmethodID GeckoAppShell::jMoveTaskToBack = 0; 1.68 +jmethodID GeckoAppShell::jNetworkLinkType = 0; 1.69 +jmethodID GeckoAppShell::jNotifyDefaultPrevented = 0; 1.70 +jmethodID GeckoAppShell::jNotifyIME = 0; 1.71 +jmethodID GeckoAppShell::jNotifyIMEChange = 0; 1.72 +jmethodID GeckoAppShell::jNotifyIMEContext = 0; 1.73 +jmethodID GeckoAppShell::jNotifyWakeLockChanged = 0; 1.74 +jmethodID GeckoAppShell::jNotifyXreExit = 0; 1.75 +jmethodID GeckoAppShell::jOpenUriExternal = 0; 1.76 +jmethodID GeckoAppShell::jPerformHapticFeedback = 0; 1.77 +jmethodID GeckoAppShell::jPumpMessageLoop = 0; 1.78 +jmethodID GeckoAppShell::jRegisterSurfaceTextureFrameListener = 0; 1.79 +jmethodID GeckoAppShell::jRemovePluginView = 0; 1.80 +jmethodID GeckoAppShell::jScanMedia = 0; 1.81 +jmethodID GeckoAppShell::jScheduleRestart = 0; 1.82 +jmethodID GeckoAppShell::jSendMessageWrapper = 0; 1.83 +jmethodID GeckoAppShell::jSetFullScreen = 0; 1.84 +jmethodID GeckoAppShell::jSetKeepScreenOn = 0; 1.85 +jmethodID GeckoAppShell::jSetURITitle = 0; 1.86 +jmethodID GeckoAppShell::jShowAlertNotificationWrapper = 0; 1.87 +jmethodID GeckoAppShell::jShowInputMethodPicker = 0; 1.88 +jmethodID GeckoAppShell::jUnlockProfile = 0; 1.89 +jmethodID GeckoAppShell::jUnlockScreenOrientation = 0; 1.90 +jmethodID GeckoAppShell::jUnregisterSurfaceTextureFrameListener = 0; 1.91 +jmethodID GeckoAppShell::jVibrate1 = 0; 1.92 +jmethodID GeckoAppShell::jVibrateA = 0; 1.93 +void GeckoAppShell::InitStubs(JNIEnv *jEnv) { 1.94 + initInit(); 1.95 + 1.96 + mGeckoAppShellClass = getClassGlobalRef("org/mozilla/gecko/GeckoAppShell"); 1.97 + jAcknowledgeEvent = getStaticMethod("acknowledgeEvent", "()V"); 1.98 + jAddPluginViewWrapper = getStaticMethod("addPluginView", "(Landroid/view/View;FFFFZ)V"); 1.99 + jAlertsProgressListener_OnProgress = getStaticMethod("alertsProgressListener_OnProgress", "(Ljava/lang/String;JJLjava/lang/String;)V"); 1.100 + jCancelVibrate = getStaticMethod("cancelVibrate", "()V"); 1.101 + jCheckURIVisited = getStaticMethod("checkUriVisited", "(Ljava/lang/String;)V"); 1.102 + jClearMessageList = getStaticMethod("clearMessageList", "(I)V"); 1.103 + jCloseCamera = getStaticMethod("closeCamera", "()V"); 1.104 + jCloseNotification = getStaticMethod("closeNotification", "(Ljava/lang/String;)V"); 1.105 + jCreateMessageListWrapper = getStaticMethod("createMessageList", "(JJ[Ljava/lang/String;IIZI)V"); 1.106 + jCreateShortcut = getStaticMethod("createShortcut", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); 1.107 + jDeleteMessageWrapper = getStaticMethod("deleteMessage", "(II)V"); 1.108 + jDisableBatteryNotifications = getStaticMethod("disableBatteryNotifications", "()V"); 1.109 + jDisableNetworkNotifications = getStaticMethod("disableNetworkNotifications", "()V"); 1.110 + jDisableScreenOrientationNotifications = getStaticMethod("disableScreenOrientationNotifications", "()V"); 1.111 + jDisableSensor = getStaticMethod("disableSensor", "(I)V"); 1.112 + jEnableBatteryNotifications = getStaticMethod("enableBatteryNotifications", "()V"); 1.113 + jEnableLocation = getStaticMethod("enableLocation", "(Z)V"); 1.114 + jEnableLocationHighAccuracy = getStaticMethod("enableLocationHighAccuracy", "(Z)V"); 1.115 + jEnableNetworkNotifications = getStaticMethod("enableNetworkNotifications", "()V"); 1.116 + jEnableScreenOrientationNotifications = getStaticMethod("enableScreenOrientationNotifications", "()V"); 1.117 + jEnableSensor = getStaticMethod("enableSensor", "(I)V"); 1.118 + jGetContext = getStaticMethod("getContext", "()Landroid/content/Context;"); 1.119 + jGetCurrentBatteryInformationWrapper = getStaticMethod("getCurrentBatteryInformation", "()[D"); 1.120 + jGetCurrentNetworkInformationWrapper = getStaticMethod("getCurrentNetworkInformation", "()[D"); 1.121 + jGetDensity = getStaticMethod("getDensity", "()F"); 1.122 + jGetDpiWrapper = getStaticMethod("getDpi", "()I"); 1.123 + jGetExtensionFromMimeTypeWrapper = getStaticMethod("getExtensionFromMimeType", "(Ljava/lang/String;)Ljava/lang/String;"); 1.124 + jGetHandlersForMimeTypeWrapper = getStaticMethod("getHandlersForMimeType", "(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;"); 1.125 + jGetHandlersForURLWrapper = getStaticMethod("getHandlersForURL", "(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;"); 1.126 + jGetIconForExtensionWrapper = getStaticMethod("getIconForExtension", "(Ljava/lang/String;I)[B"); 1.127 + jGetMessageWrapper = getStaticMethod("getMessage", "(II)V"); 1.128 + jGetMimeTypeFromExtensionsWrapper = getStaticMethod("getMimeTypeFromExtensions", "(Ljava/lang/String;)Ljava/lang/String;"); 1.129 + jGetNextMessageInListWrapper = getStaticMethod("getNextMessageInList", "(II)V"); 1.130 + jGetProxyForURIWrapper = getStaticMethod("getProxyForURI", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;"); 1.131 + jGetScreenDepthWrapper = getStaticMethod("getScreenDepth", "()I"); 1.132 + jGetScreenOrientationWrapper = getStaticMethod("getScreenOrientation", "()S"); 1.133 + jGetShowPasswordSetting = getStaticMethod("getShowPasswordSetting", "()Z"); 1.134 + jGetSystemColoursWrapper = getStaticMethod("getSystemColors", "()[I"); 1.135 + jHandleGeckoMessageWrapper = getStaticMethod("handleGeckoMessage", "(Lorg/mozilla/gecko/util/NativeJSContainer;)V"); 1.136 + jHandleUncaughtException = getStaticMethod("handleUncaughtException", "(Ljava/lang/Thread;Ljava/lang/Throwable;)V"); 1.137 + jHideProgressDialog = getStaticMethod("hideProgressDialog", "()V"); 1.138 + jInitCameraWrapper = getStaticMethod("initCamera", "(Ljava/lang/String;III)[I"); 1.139 + jIsNetworkLinkKnown = getStaticMethod("isNetworkLinkKnown", "()Z"); 1.140 + jIsNetworkLinkUp = getStaticMethod("isNetworkLinkUp", "()Z"); 1.141 + jIsTablet = getStaticMethod("isTablet", "()Z"); 1.142 + jKillAnyZombies = getStaticMethod("killAnyZombies", "()V"); 1.143 + jLoadPluginClass = getStaticMethod("loadPluginClass", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Class;"); 1.144 + jLockScreenOrientation = getStaticMethod("lockScreenOrientation", "(I)V"); 1.145 + jMarkURIVisited = getStaticMethod("markUriVisited", "(Ljava/lang/String;)V"); 1.146 + jMoveTaskToBack = getStaticMethod("moveTaskToBack", "()V"); 1.147 + jNetworkLinkType = getStaticMethod("networkLinkType", "()I"); 1.148 + jNotifyDefaultPrevented = getStaticMethod("notifyDefaultPrevented", "(Z)V"); 1.149 + jNotifyIME = getStaticMethod("notifyIME", "(I)V"); 1.150 + jNotifyIMEChange = getStaticMethod("notifyIMEChange", "(Ljava/lang/String;III)V"); 1.151 + jNotifyIMEContext = getStaticMethod("notifyIMEContext", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); 1.152 + jNotifyWakeLockChanged = getStaticMethod("notifyWakeLockChanged", "(Ljava/lang/String;Ljava/lang/String;)V"); 1.153 + jNotifyXreExit = getStaticMethod("onXreExit", "()V"); 1.154 + jOpenUriExternal = getStaticMethod("openUriExternal", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z"); 1.155 + jPerformHapticFeedback = getStaticMethod("performHapticFeedback", "(Z)V"); 1.156 + jPumpMessageLoop = getStaticMethod("pumpMessageLoop", "()Z"); 1.157 + jRegisterSurfaceTextureFrameListener = getStaticMethod("registerSurfaceTextureFrameListener", "(Ljava/lang/Object;I)V"); 1.158 + jRemovePluginView = getStaticMethod("removePluginView", "(Landroid/view/View;Z)V"); 1.159 + jScanMedia = getStaticMethod("scanMedia", "(Ljava/lang/String;Ljava/lang/String;)V"); 1.160 + jScheduleRestart = getStaticMethod("scheduleRestart", "()V"); 1.161 + jSendMessageWrapper = getStaticMethod("sendMessage", "(Ljava/lang/String;Ljava/lang/String;I)V"); 1.162 + jSetFullScreen = getStaticMethod("setFullScreen", "(Z)V"); 1.163 + jSetKeepScreenOn = getStaticMethod("setKeepScreenOn", "(Z)V"); 1.164 + jSetURITitle = getStaticMethod("setUriTitle", "(Ljava/lang/String;Ljava/lang/String;)V"); 1.165 + jShowAlertNotificationWrapper = getStaticMethod("showAlertNotification", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); 1.166 + jShowInputMethodPicker = getStaticMethod("showInputMethodPicker", "()V"); 1.167 + jUnlockProfile = getStaticMethod("unlockProfile", "()Z"); 1.168 + jUnlockScreenOrientation = getStaticMethod("unlockScreenOrientation", "()V"); 1.169 + jUnregisterSurfaceTextureFrameListener = getStaticMethod("unregisterSurfaceTextureFrameListener", "(Ljava/lang/Object;)V"); 1.170 + jVibrate1 = getStaticMethod("vibrate", "(J)V"); 1.171 + jVibrateA = getStaticMethod("vibrate", "([JI)V"); 1.172 +} 1.173 + 1.174 +GeckoAppShell* GeckoAppShell::Wrap(jobject obj) { 1.175 + JNIEnv *env = GetJNIForThread(); 1.176 + GeckoAppShell* ret = new GeckoAppShell(obj, env); 1.177 + env->DeleteLocalRef(obj); 1.178 + return ret; 1.179 +} 1.180 + 1.181 +void GeckoAppShell::AcknowledgeEvent() { 1.182 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.183 + if (env->PushLocalFrame(0) != 0) { 1.184 + AndroidBridge::HandleUncaughtException(env); 1.185 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.186 + } 1.187 + 1.188 + env->CallStaticVoidMethod(mGeckoAppShellClass, jAcknowledgeEvent); 1.189 + AndroidBridge::HandleUncaughtException(env); 1.190 + env->PopLocalFrame(nullptr); 1.191 +} 1.192 + 1.193 +void GeckoAppShell::AddPluginViewWrapper(jobject a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, bool a5) { 1.194 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.195 + if (env->PushLocalFrame(1) != 0) { 1.196 + AndroidBridge::HandleUncaughtException(env); 1.197 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.198 + } 1.199 + 1.200 + jvalue args[6]; 1.201 + args[0].l = a0; 1.202 + args[1].f = a1; 1.203 + args[2].f = a2; 1.204 + args[3].f = a3; 1.205 + args[4].f = a4; 1.206 + args[5].z = a5; 1.207 + 1.208 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jAddPluginViewWrapper, args); 1.209 + AndroidBridge::HandleUncaughtException(env); 1.210 + env->PopLocalFrame(nullptr); 1.211 +} 1.212 + 1.213 +void GeckoAppShell::AlertsProgressListener_OnProgress(const nsAString& a0, int64_t a1, int64_t a2, const nsAString& a3) { 1.214 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.215 + if (env->PushLocalFrame(2) != 0) { 1.216 + AndroidBridge::HandleUncaughtException(env); 1.217 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.218 + } 1.219 + 1.220 + jvalue args[4]; 1.221 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.222 + args[1].j = a1; 1.223 + args[2].j = a2; 1.224 + args[3].l = AndroidBridge::NewJavaString(env, a3); 1.225 + 1.226 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jAlertsProgressListener_OnProgress, args); 1.227 + AndroidBridge::HandleUncaughtException(env); 1.228 + env->PopLocalFrame(nullptr); 1.229 +} 1.230 + 1.231 +void GeckoAppShell::CancelVibrate() { 1.232 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.233 + if (env->PushLocalFrame(0) != 0) { 1.234 + AndroidBridge::HandleUncaughtException(env); 1.235 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.236 + } 1.237 + 1.238 + env->CallStaticVoidMethod(mGeckoAppShellClass, jCancelVibrate); 1.239 + AndroidBridge::HandleUncaughtException(env); 1.240 + env->PopLocalFrame(nullptr); 1.241 +} 1.242 + 1.243 +void GeckoAppShell::CheckURIVisited(const nsAString& a0) { 1.244 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.245 + if (env->PushLocalFrame(1) != 0) { 1.246 + AndroidBridge::HandleUncaughtException(env); 1.247 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.248 + } 1.249 + 1.250 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.251 + 1.252 + env->CallStaticVoidMethod(mGeckoAppShellClass, jCheckURIVisited, j0); 1.253 + AndroidBridge::HandleUncaughtException(env); 1.254 + env->PopLocalFrame(nullptr); 1.255 +} 1.256 + 1.257 +void GeckoAppShell::ClearMessageList(int32_t a0) { 1.258 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.259 + if (env->PushLocalFrame(0) != 0) { 1.260 + AndroidBridge::HandleUncaughtException(env); 1.261 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.262 + } 1.263 + 1.264 + env->CallStaticVoidMethod(mGeckoAppShellClass, jClearMessageList, a0); 1.265 + AndroidBridge::HandleUncaughtException(env); 1.266 + env->PopLocalFrame(nullptr); 1.267 +} 1.268 + 1.269 +void GeckoAppShell::CloseCamera() { 1.270 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.271 + if (env->PushLocalFrame(0) != 0) { 1.272 + AndroidBridge::HandleUncaughtException(env); 1.273 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.274 + } 1.275 + 1.276 + env->CallStaticVoidMethod(mGeckoAppShellClass, jCloseCamera); 1.277 + AndroidBridge::HandleUncaughtException(env); 1.278 + env->PopLocalFrame(nullptr); 1.279 +} 1.280 + 1.281 +void GeckoAppShell::CloseNotification(const nsAString& a0) { 1.282 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.283 + if (env->PushLocalFrame(1) != 0) { 1.284 + AndroidBridge::HandleUncaughtException(env); 1.285 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.286 + } 1.287 + 1.288 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.289 + 1.290 + env->CallStaticVoidMethod(mGeckoAppShellClass, jCloseNotification, j0); 1.291 + AndroidBridge::HandleUncaughtException(env); 1.292 + env->PopLocalFrame(nullptr); 1.293 +} 1.294 + 1.295 +void GeckoAppShell::CreateMessageListWrapper(int64_t a0, int64_t a1, jobjectArray a2, int32_t a3, int32_t a4, bool a5, int32_t a6) { 1.296 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.297 + if (env->PushLocalFrame(1) != 0) { 1.298 + AndroidBridge::HandleUncaughtException(env); 1.299 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.300 + } 1.301 + 1.302 + jvalue args[7]; 1.303 + args[0].j = a0; 1.304 + args[1].j = a1; 1.305 + args[2].l = a2; 1.306 + args[3].i = a3; 1.307 + args[4].i = a4; 1.308 + args[5].z = a5; 1.309 + args[6].i = a6; 1.310 + 1.311 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jCreateMessageListWrapper, args); 1.312 + AndroidBridge::HandleUncaughtException(env); 1.313 + env->PopLocalFrame(nullptr); 1.314 +} 1.315 + 1.316 +void GeckoAppShell::CreateShortcut(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) { 1.317 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.318 + if (env->PushLocalFrame(4) != 0) { 1.319 + AndroidBridge::HandleUncaughtException(env); 1.320 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.321 + } 1.322 + 1.323 + jvalue args[4]; 1.324 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.325 + args[1].l = AndroidBridge::NewJavaString(env, a1); 1.326 + args[2].l = AndroidBridge::NewJavaString(env, a2); 1.327 + args[3].l = AndroidBridge::NewJavaString(env, a3); 1.328 + 1.329 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jCreateShortcut, args); 1.330 + AndroidBridge::HandleUncaughtException(env); 1.331 + env->PopLocalFrame(nullptr); 1.332 +} 1.333 + 1.334 +void GeckoAppShell::DeleteMessageWrapper(int32_t a0, int32_t a1) { 1.335 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.336 + if (env->PushLocalFrame(0) != 0) { 1.337 + AndroidBridge::HandleUncaughtException(env); 1.338 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.339 + } 1.340 + 1.341 + env->CallStaticVoidMethod(mGeckoAppShellClass, jDeleteMessageWrapper, a0, a1); 1.342 + AndroidBridge::HandleUncaughtException(env); 1.343 + env->PopLocalFrame(nullptr); 1.344 +} 1.345 + 1.346 +void GeckoAppShell::DisableBatteryNotifications() { 1.347 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.348 + if (env->PushLocalFrame(0) != 0) { 1.349 + AndroidBridge::HandleUncaughtException(env); 1.350 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.351 + } 1.352 + 1.353 + env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableBatteryNotifications); 1.354 + AndroidBridge::HandleUncaughtException(env); 1.355 + env->PopLocalFrame(nullptr); 1.356 +} 1.357 + 1.358 +void GeckoAppShell::DisableNetworkNotifications() { 1.359 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.360 + if (env->PushLocalFrame(0) != 0) { 1.361 + AndroidBridge::HandleUncaughtException(env); 1.362 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.363 + } 1.364 + 1.365 + env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableNetworkNotifications); 1.366 + AndroidBridge::HandleUncaughtException(env); 1.367 + env->PopLocalFrame(nullptr); 1.368 +} 1.369 + 1.370 +void GeckoAppShell::DisableScreenOrientationNotifications() { 1.371 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.372 + if (env->PushLocalFrame(0) != 0) { 1.373 + AndroidBridge::HandleUncaughtException(env); 1.374 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.375 + } 1.376 + 1.377 + env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableScreenOrientationNotifications); 1.378 + AndroidBridge::HandleUncaughtException(env); 1.379 + env->PopLocalFrame(nullptr); 1.380 +} 1.381 + 1.382 +void GeckoAppShell::DisableSensor(int32_t a0) { 1.383 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.384 + if (env->PushLocalFrame(0) != 0) { 1.385 + AndroidBridge::HandleUncaughtException(env); 1.386 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.387 + } 1.388 + 1.389 + env->CallStaticVoidMethod(mGeckoAppShellClass, jDisableSensor, a0); 1.390 + AndroidBridge::HandleUncaughtException(env); 1.391 + env->PopLocalFrame(nullptr); 1.392 +} 1.393 + 1.394 +void GeckoAppShell::EnableBatteryNotifications() { 1.395 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.396 + if (env->PushLocalFrame(0) != 0) { 1.397 + AndroidBridge::HandleUncaughtException(env); 1.398 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.399 + } 1.400 + 1.401 + env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableBatteryNotifications); 1.402 + AndroidBridge::HandleUncaughtException(env); 1.403 + env->PopLocalFrame(nullptr); 1.404 +} 1.405 + 1.406 +void GeckoAppShell::EnableLocation(bool a0) { 1.407 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.408 + if (env->PushLocalFrame(0) != 0) { 1.409 + AndroidBridge::HandleUncaughtException(env); 1.410 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.411 + } 1.412 + 1.413 + env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableLocation, a0); 1.414 + AndroidBridge::HandleUncaughtException(env); 1.415 + env->PopLocalFrame(nullptr); 1.416 +} 1.417 + 1.418 +void GeckoAppShell::EnableLocationHighAccuracy(bool a0) { 1.419 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.420 + if (env->PushLocalFrame(0) != 0) { 1.421 + AndroidBridge::HandleUncaughtException(env); 1.422 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.423 + } 1.424 + 1.425 + env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableLocationHighAccuracy, a0); 1.426 + AndroidBridge::HandleUncaughtException(env); 1.427 + env->PopLocalFrame(nullptr); 1.428 +} 1.429 + 1.430 +void GeckoAppShell::EnableNetworkNotifications() { 1.431 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.432 + if (env->PushLocalFrame(0) != 0) { 1.433 + AndroidBridge::HandleUncaughtException(env); 1.434 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.435 + } 1.436 + 1.437 + env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableNetworkNotifications); 1.438 + AndroidBridge::HandleUncaughtException(env); 1.439 + env->PopLocalFrame(nullptr); 1.440 +} 1.441 + 1.442 +void GeckoAppShell::EnableScreenOrientationNotifications() { 1.443 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.444 + if (env->PushLocalFrame(0) != 0) { 1.445 + AndroidBridge::HandleUncaughtException(env); 1.446 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.447 + } 1.448 + 1.449 + env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableScreenOrientationNotifications); 1.450 + AndroidBridge::HandleUncaughtException(env); 1.451 + env->PopLocalFrame(nullptr); 1.452 +} 1.453 + 1.454 +void GeckoAppShell::EnableSensor(int32_t a0) { 1.455 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.456 + if (env->PushLocalFrame(0) != 0) { 1.457 + AndroidBridge::HandleUncaughtException(env); 1.458 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.459 + } 1.460 + 1.461 + env->CallStaticVoidMethod(mGeckoAppShellClass, jEnableSensor, a0); 1.462 + AndroidBridge::HandleUncaughtException(env); 1.463 + env->PopLocalFrame(nullptr); 1.464 +} 1.465 + 1.466 +jobject GeckoAppShell::GetContext() { 1.467 + JNIEnv *env = GetJNIForThread(); 1.468 + if (env->PushLocalFrame(1) != 0) { 1.469 + AndroidBridge::HandleUncaughtException(env); 1.470 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.471 + } 1.472 + 1.473 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetContext); 1.474 + AndroidBridge::HandleUncaughtException(env); 1.475 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.476 + return ret; 1.477 +} 1.478 + 1.479 +jdoubleArray GeckoAppShell::GetCurrentBatteryInformationWrapper() { 1.480 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.481 + if (env->PushLocalFrame(1) != 0) { 1.482 + AndroidBridge::HandleUncaughtException(env); 1.483 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.484 + } 1.485 + 1.486 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetCurrentBatteryInformationWrapper); 1.487 + AndroidBridge::HandleUncaughtException(env); 1.488 + jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp)); 1.489 + return ret; 1.490 +} 1.491 + 1.492 +jdoubleArray GeckoAppShell::GetCurrentNetworkInformationWrapper() { 1.493 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.494 + if (env->PushLocalFrame(1) != 0) { 1.495 + AndroidBridge::HandleUncaughtException(env); 1.496 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.497 + } 1.498 + 1.499 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetCurrentNetworkInformationWrapper); 1.500 + AndroidBridge::HandleUncaughtException(env); 1.501 + jdoubleArray ret = static_cast<jdoubleArray>(env->PopLocalFrame(temp)); 1.502 + return ret; 1.503 +} 1.504 + 1.505 +jfloat GeckoAppShell::GetDensity() { 1.506 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.507 + if (env->PushLocalFrame(0) != 0) { 1.508 + AndroidBridge::HandleUncaughtException(env); 1.509 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.510 + } 1.511 + 1.512 + jfloat temp = env->CallStaticFloatMethod(mGeckoAppShellClass, jGetDensity); 1.513 + AndroidBridge::HandleUncaughtException(env); 1.514 + env->PopLocalFrame(nullptr); 1.515 + return temp; 1.516 +} 1.517 + 1.518 +int32_t GeckoAppShell::GetDpiWrapper() { 1.519 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.520 + if (env->PushLocalFrame(0) != 0) { 1.521 + AndroidBridge::HandleUncaughtException(env); 1.522 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.523 + } 1.524 + 1.525 + int32_t temp = env->CallStaticIntMethod(mGeckoAppShellClass, jGetDpiWrapper); 1.526 + AndroidBridge::HandleUncaughtException(env); 1.527 + env->PopLocalFrame(nullptr); 1.528 + return temp; 1.529 +} 1.530 + 1.531 +jstring GeckoAppShell::GetExtensionFromMimeTypeWrapper(const nsAString& a0) { 1.532 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.533 + if (env->PushLocalFrame(2) != 0) { 1.534 + AndroidBridge::HandleUncaughtException(env); 1.535 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.536 + } 1.537 + 1.538 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.539 + 1.540 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetExtensionFromMimeTypeWrapper, j0); 1.541 + AndroidBridge::HandleUncaughtException(env); 1.542 + jstring ret = static_cast<jstring>(env->PopLocalFrame(temp)); 1.543 + return ret; 1.544 +} 1.545 + 1.546 +jobjectArray GeckoAppShell::GetHandlersForMimeTypeWrapper(const nsAString& a0, const nsAString& a1) { 1.547 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.548 + if (env->PushLocalFrame(3) != 0) { 1.549 + AndroidBridge::HandleUncaughtException(env); 1.550 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.551 + } 1.552 + 1.553 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.554 + jstring j1 = AndroidBridge::NewJavaString(env, a1); 1.555 + 1.556 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetHandlersForMimeTypeWrapper, j0, j1); 1.557 + AndroidBridge::HandleUncaughtException(env); 1.558 + jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp)); 1.559 + return ret; 1.560 +} 1.561 + 1.562 +jobjectArray GeckoAppShell::GetHandlersForURLWrapper(const nsAString& a0, const nsAString& a1) { 1.563 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.564 + if (env->PushLocalFrame(3) != 0) { 1.565 + AndroidBridge::HandleUncaughtException(env); 1.566 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.567 + } 1.568 + 1.569 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.570 + jstring j1 = AndroidBridge::NewJavaString(env, a1); 1.571 + 1.572 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetHandlersForURLWrapper, j0, j1); 1.573 + AndroidBridge::HandleUncaughtException(env); 1.574 + jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp)); 1.575 + return ret; 1.576 +} 1.577 + 1.578 +jbyteArray GeckoAppShell::GetIconForExtensionWrapper(const nsAString& a0, int32_t a1) { 1.579 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.580 + if (env->PushLocalFrame(2) != 0) { 1.581 + AndroidBridge::HandleUncaughtException(env); 1.582 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.583 + } 1.584 + 1.585 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.586 + 1.587 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetIconForExtensionWrapper, j0, a1); 1.588 + AndroidBridge::HandleUncaughtException(env); 1.589 + jbyteArray ret = static_cast<jbyteArray>(env->PopLocalFrame(temp)); 1.590 + return ret; 1.591 +} 1.592 + 1.593 +void GeckoAppShell::GetMessageWrapper(int32_t a0, int32_t a1) { 1.594 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.595 + if (env->PushLocalFrame(0) != 0) { 1.596 + AndroidBridge::HandleUncaughtException(env); 1.597 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.598 + } 1.599 + 1.600 + env->CallStaticVoidMethod(mGeckoAppShellClass, jGetMessageWrapper, a0, a1); 1.601 + AndroidBridge::HandleUncaughtException(env); 1.602 + env->PopLocalFrame(nullptr); 1.603 +} 1.604 + 1.605 +jstring GeckoAppShell::GetMimeTypeFromExtensionsWrapper(const nsAString& a0) { 1.606 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.607 + if (env->PushLocalFrame(2) != 0) { 1.608 + AndroidBridge::HandleUncaughtException(env); 1.609 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.610 + } 1.611 + 1.612 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.613 + 1.614 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetMimeTypeFromExtensionsWrapper, j0); 1.615 + AndroidBridge::HandleUncaughtException(env); 1.616 + jstring ret = static_cast<jstring>(env->PopLocalFrame(temp)); 1.617 + return ret; 1.618 +} 1.619 + 1.620 +void GeckoAppShell::GetNextMessageInListWrapper(int32_t a0, int32_t a1) { 1.621 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.622 + if (env->PushLocalFrame(0) != 0) { 1.623 + AndroidBridge::HandleUncaughtException(env); 1.624 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.625 + } 1.626 + 1.627 + env->CallStaticVoidMethod(mGeckoAppShellClass, jGetNextMessageInListWrapper, a0, a1); 1.628 + AndroidBridge::HandleUncaughtException(env); 1.629 + env->PopLocalFrame(nullptr); 1.630 +} 1.631 + 1.632 +jstring GeckoAppShell::GetProxyForURIWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, int32_t a3) { 1.633 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.634 + if (env->PushLocalFrame(4) != 0) { 1.635 + AndroidBridge::HandleUncaughtException(env); 1.636 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.637 + } 1.638 + 1.639 + jvalue args[4]; 1.640 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.641 + args[1].l = AndroidBridge::NewJavaString(env, a1); 1.642 + args[2].l = AndroidBridge::NewJavaString(env, a2); 1.643 + args[3].i = a3; 1.644 + 1.645 + jobject temp = env->CallStaticObjectMethodA(mGeckoAppShellClass, jGetProxyForURIWrapper, args); 1.646 + AndroidBridge::HandleUncaughtException(env); 1.647 + jstring ret = static_cast<jstring>(env->PopLocalFrame(temp)); 1.648 + return ret; 1.649 +} 1.650 + 1.651 +int32_t GeckoAppShell::GetScreenDepthWrapper() { 1.652 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.653 + if (env->PushLocalFrame(0) != 0) { 1.654 + AndroidBridge::HandleUncaughtException(env); 1.655 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.656 + } 1.657 + 1.658 + int32_t temp = env->CallStaticIntMethod(mGeckoAppShellClass, jGetScreenDepthWrapper); 1.659 + AndroidBridge::HandleUncaughtException(env); 1.660 + env->PopLocalFrame(nullptr); 1.661 + return temp; 1.662 +} 1.663 + 1.664 +int16_t GeckoAppShell::GetScreenOrientationWrapper() { 1.665 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.666 + if (env->PushLocalFrame(0) != 0) { 1.667 + AndroidBridge::HandleUncaughtException(env); 1.668 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.669 + } 1.670 + 1.671 + int16_t temp = env->CallStaticShortMethod(mGeckoAppShellClass, jGetScreenOrientationWrapper); 1.672 + AndroidBridge::HandleUncaughtException(env); 1.673 + env->PopLocalFrame(nullptr); 1.674 + return temp; 1.675 +} 1.676 + 1.677 +bool GeckoAppShell::GetShowPasswordSetting() { 1.678 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.679 + if (env->PushLocalFrame(0) != 0) { 1.680 + AndroidBridge::HandleUncaughtException(env); 1.681 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.682 + } 1.683 + 1.684 + bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jGetShowPasswordSetting); 1.685 + AndroidBridge::HandleUncaughtException(env); 1.686 + env->PopLocalFrame(nullptr); 1.687 + return temp; 1.688 +} 1.689 + 1.690 +jintArray GeckoAppShell::GetSystemColoursWrapper() { 1.691 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.692 + if (env->PushLocalFrame(1) != 0) { 1.693 + AndroidBridge::HandleUncaughtException(env); 1.694 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.695 + } 1.696 + 1.697 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jGetSystemColoursWrapper); 1.698 + AndroidBridge::HandleUncaughtException(env); 1.699 + jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp)); 1.700 + return ret; 1.701 +} 1.702 + 1.703 +void GeckoAppShell::HandleGeckoMessageWrapper(jobject a0) { 1.704 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.705 + if (env->PushLocalFrame(1) != 0) { 1.706 + AndroidBridge::HandleUncaughtException(env); 1.707 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.708 + } 1.709 + 1.710 + env->CallStaticVoidMethod(mGeckoAppShellClass, jHandleGeckoMessageWrapper, a0); 1.711 + AndroidBridge::HandleUncaughtException(env); 1.712 + env->PopLocalFrame(nullptr); 1.713 +} 1.714 + 1.715 +void GeckoAppShell::HandleUncaughtException(jobject a0, jthrowable a1) { 1.716 + JNIEnv *env = GetJNIForThread(); 1.717 + if (env->PushLocalFrame(2) != 0) { 1.718 + return; 1.719 + } 1.720 + 1.721 + env->CallStaticVoidMethod(mGeckoAppShellClass, jHandleUncaughtException, a0, a1); 1.722 + env->PopLocalFrame(nullptr); 1.723 +} 1.724 + 1.725 +void GeckoAppShell::HideProgressDialog() { 1.726 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.727 + if (env->PushLocalFrame(0) != 0) { 1.728 + AndroidBridge::HandleUncaughtException(env); 1.729 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.730 + } 1.731 + 1.732 + env->CallStaticVoidMethod(mGeckoAppShellClass, jHideProgressDialog); 1.733 + AndroidBridge::HandleUncaughtException(env); 1.734 + env->PopLocalFrame(nullptr); 1.735 +} 1.736 + 1.737 +jintArray GeckoAppShell::InitCameraWrapper(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) { 1.738 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.739 + if (env->PushLocalFrame(2) != 0) { 1.740 + AndroidBridge::HandleUncaughtException(env); 1.741 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.742 + } 1.743 + 1.744 + jvalue args[4]; 1.745 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.746 + args[1].i = a1; 1.747 + args[2].i = a2; 1.748 + args[3].i = a3; 1.749 + 1.750 + jobject temp = env->CallStaticObjectMethodA(mGeckoAppShellClass, jInitCameraWrapper, args); 1.751 + AndroidBridge::HandleUncaughtException(env); 1.752 + jintArray ret = static_cast<jintArray>(env->PopLocalFrame(temp)); 1.753 + return ret; 1.754 +} 1.755 + 1.756 +bool GeckoAppShell::IsNetworkLinkKnown() { 1.757 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.758 + if (env->PushLocalFrame(0) != 0) { 1.759 + AndroidBridge::HandleUncaughtException(env); 1.760 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.761 + } 1.762 + 1.763 + bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsNetworkLinkKnown); 1.764 + AndroidBridge::HandleUncaughtException(env); 1.765 + env->PopLocalFrame(nullptr); 1.766 + return temp; 1.767 +} 1.768 + 1.769 +bool GeckoAppShell::IsNetworkLinkUp() { 1.770 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.771 + if (env->PushLocalFrame(0) != 0) { 1.772 + AndroidBridge::HandleUncaughtException(env); 1.773 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.774 + } 1.775 + 1.776 + bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsNetworkLinkUp); 1.777 + AndroidBridge::HandleUncaughtException(env); 1.778 + env->PopLocalFrame(nullptr); 1.779 + return temp; 1.780 +} 1.781 + 1.782 +bool GeckoAppShell::IsTablet() { 1.783 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.784 + if (env->PushLocalFrame(0) != 0) { 1.785 + AndroidBridge::HandleUncaughtException(env); 1.786 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.787 + } 1.788 + 1.789 + bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jIsTablet); 1.790 + AndroidBridge::HandleUncaughtException(env); 1.791 + env->PopLocalFrame(nullptr); 1.792 + return temp; 1.793 +} 1.794 + 1.795 +void GeckoAppShell::KillAnyZombies() { 1.796 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.797 + if (env->PushLocalFrame(0) != 0) { 1.798 + AndroidBridge::HandleUncaughtException(env); 1.799 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.800 + } 1.801 + 1.802 + env->CallStaticVoidMethod(mGeckoAppShellClass, jKillAnyZombies); 1.803 + AndroidBridge::HandleUncaughtException(env); 1.804 + env->PopLocalFrame(nullptr); 1.805 +} 1.806 + 1.807 +jclass GeckoAppShell::LoadPluginClass(const nsAString& a0, const nsAString& a1) { 1.808 + JNIEnv *env = GetJNIForThread(); 1.809 + if (env->PushLocalFrame(3) != 0) { 1.810 + AndroidBridge::HandleUncaughtException(env); 1.811 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.812 + } 1.813 + 1.814 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.815 + jstring j1 = AndroidBridge::NewJavaString(env, a1); 1.816 + 1.817 + jobject temp = env->CallStaticObjectMethod(mGeckoAppShellClass, jLoadPluginClass, j0, j1); 1.818 + AndroidBridge::HandleUncaughtException(env); 1.819 + jclass ret = static_cast<jclass>(env->PopLocalFrame(temp)); 1.820 + return ret; 1.821 +} 1.822 + 1.823 +void GeckoAppShell::LockScreenOrientation(int32_t a0) { 1.824 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.825 + if (env->PushLocalFrame(0) != 0) { 1.826 + AndroidBridge::HandleUncaughtException(env); 1.827 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.828 + } 1.829 + 1.830 + env->CallStaticVoidMethod(mGeckoAppShellClass, jLockScreenOrientation, a0); 1.831 + AndroidBridge::HandleUncaughtException(env); 1.832 + env->PopLocalFrame(nullptr); 1.833 +} 1.834 + 1.835 +void GeckoAppShell::MarkURIVisited(const nsAString& a0) { 1.836 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.837 + if (env->PushLocalFrame(1) != 0) { 1.838 + AndroidBridge::HandleUncaughtException(env); 1.839 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.840 + } 1.841 + 1.842 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.843 + 1.844 + env->CallStaticVoidMethod(mGeckoAppShellClass, jMarkURIVisited, j0); 1.845 + AndroidBridge::HandleUncaughtException(env); 1.846 + env->PopLocalFrame(nullptr); 1.847 +} 1.848 + 1.849 +void GeckoAppShell::MoveTaskToBack() { 1.850 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.851 + if (env->PushLocalFrame(0) != 0) { 1.852 + AndroidBridge::HandleUncaughtException(env); 1.853 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.854 + } 1.855 + 1.856 + env->CallStaticVoidMethod(mGeckoAppShellClass, jMoveTaskToBack); 1.857 + AndroidBridge::HandleUncaughtException(env); 1.858 + env->PopLocalFrame(nullptr); 1.859 +} 1.860 + 1.861 +int32_t GeckoAppShell::NetworkLinkType() { 1.862 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.863 + if (env->PushLocalFrame(0) != 0) { 1.864 + AndroidBridge::HandleUncaughtException(env); 1.865 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.866 + } 1.867 + 1.868 + int32_t temp = env->CallStaticIntMethod(mGeckoAppShellClass, jNetworkLinkType); 1.869 + AndroidBridge::HandleUncaughtException(env); 1.870 + env->PopLocalFrame(nullptr); 1.871 + return temp; 1.872 +} 1.873 + 1.874 +void GeckoAppShell::NotifyDefaultPrevented(bool a0) { 1.875 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.876 + if (env->PushLocalFrame(0) != 0) { 1.877 + AndroidBridge::HandleUncaughtException(env); 1.878 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.879 + } 1.880 + 1.881 + env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyDefaultPrevented, a0); 1.882 + AndroidBridge::HandleUncaughtException(env); 1.883 + env->PopLocalFrame(nullptr); 1.884 +} 1.885 + 1.886 +void GeckoAppShell::NotifyIME(int32_t a0) { 1.887 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.888 + if (env->PushLocalFrame(0) != 0) { 1.889 + AndroidBridge::HandleUncaughtException(env); 1.890 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.891 + } 1.892 + 1.893 + env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyIME, a0); 1.894 + AndroidBridge::HandleUncaughtException(env); 1.895 + env->PopLocalFrame(nullptr); 1.896 +} 1.897 + 1.898 +void GeckoAppShell::NotifyIMEChange(const nsAString& a0, int32_t a1, int32_t a2, int32_t a3) { 1.899 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.900 + if (env->PushLocalFrame(1) != 0) { 1.901 + AndroidBridge::HandleUncaughtException(env); 1.902 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.903 + } 1.904 + 1.905 + jvalue args[4]; 1.906 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.907 + args[1].i = a1; 1.908 + args[2].i = a2; 1.909 + args[3].i = a3; 1.910 + 1.911 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jNotifyIMEChange, args); 1.912 + AndroidBridge::HandleUncaughtException(env); 1.913 + env->PopLocalFrame(nullptr); 1.914 +} 1.915 + 1.916 +void GeckoAppShell::NotifyIMEContext(int32_t a0, const nsAString& a1, const nsAString& a2, const nsAString& a3) { 1.917 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.918 + if (env->PushLocalFrame(3) != 0) { 1.919 + AndroidBridge::HandleUncaughtException(env); 1.920 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.921 + } 1.922 + 1.923 + jvalue args[4]; 1.924 + args[0].i = a0; 1.925 + args[1].l = AndroidBridge::NewJavaString(env, a1); 1.926 + args[2].l = AndroidBridge::NewJavaString(env, a2); 1.927 + args[3].l = AndroidBridge::NewJavaString(env, a3); 1.928 + 1.929 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jNotifyIMEContext, args); 1.930 + AndroidBridge::HandleUncaughtException(env); 1.931 + env->PopLocalFrame(nullptr); 1.932 +} 1.933 + 1.934 +void GeckoAppShell::NotifyWakeLockChanged(const nsAString& a0, const nsAString& a1) { 1.935 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.936 + if (env->PushLocalFrame(2) != 0) { 1.937 + AndroidBridge::HandleUncaughtException(env); 1.938 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.939 + } 1.940 + 1.941 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.942 + jstring j1 = AndroidBridge::NewJavaString(env, a1); 1.943 + 1.944 + env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyWakeLockChanged, j0, j1); 1.945 + AndroidBridge::HandleUncaughtException(env); 1.946 + env->PopLocalFrame(nullptr); 1.947 +} 1.948 + 1.949 +void GeckoAppShell::NotifyXreExit() { 1.950 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.951 + if (env->PushLocalFrame(0) != 0) { 1.952 + AndroidBridge::HandleUncaughtException(env); 1.953 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.954 + } 1.955 + 1.956 + env->CallStaticVoidMethod(mGeckoAppShellClass, jNotifyXreExit); 1.957 + AndroidBridge::HandleUncaughtException(env); 1.958 + env->PopLocalFrame(nullptr); 1.959 +} 1.960 + 1.961 +bool GeckoAppShell::OpenUriExternal(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4, const nsAString& a5) { 1.962 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.963 + if (env->PushLocalFrame(6) != 0) { 1.964 + AndroidBridge::HandleUncaughtException(env); 1.965 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.966 + } 1.967 + 1.968 + jvalue args[6]; 1.969 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.970 + args[1].l = AndroidBridge::NewJavaString(env, a1); 1.971 + args[2].l = AndroidBridge::NewJavaString(env, a2); 1.972 + args[3].l = AndroidBridge::NewJavaString(env, a3); 1.973 + args[4].l = AndroidBridge::NewJavaString(env, a4); 1.974 + args[5].l = AndroidBridge::NewJavaString(env, a5); 1.975 + 1.976 + bool temp = env->CallStaticBooleanMethodA(mGeckoAppShellClass, jOpenUriExternal, args); 1.977 + AndroidBridge::HandleUncaughtException(env); 1.978 + env->PopLocalFrame(nullptr); 1.979 + return temp; 1.980 +} 1.981 + 1.982 +void GeckoAppShell::PerformHapticFeedback(bool a0) { 1.983 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.984 + if (env->PushLocalFrame(0) != 0) { 1.985 + AndroidBridge::HandleUncaughtException(env); 1.986 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.987 + } 1.988 + 1.989 + env->CallStaticVoidMethod(mGeckoAppShellClass, jPerformHapticFeedback, a0); 1.990 + AndroidBridge::HandleUncaughtException(env); 1.991 + env->PopLocalFrame(nullptr); 1.992 +} 1.993 + 1.994 +bool GeckoAppShell::PumpMessageLoop() { 1.995 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.996 + if (env->PushLocalFrame(0) != 0) { 1.997 + AndroidBridge::HandleUncaughtException(env); 1.998 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.999 + } 1.1000 + 1.1001 + bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jPumpMessageLoop); 1.1002 + AndroidBridge::HandleUncaughtException(env); 1.1003 + env->PopLocalFrame(nullptr); 1.1004 + return temp; 1.1005 +} 1.1006 + 1.1007 +void GeckoAppShell::RegisterSurfaceTextureFrameListener(jobject a0, int32_t a1) { 1.1008 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1009 + if (env->PushLocalFrame(1) != 0) { 1.1010 + AndroidBridge::HandleUncaughtException(env); 1.1011 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1012 + } 1.1013 + 1.1014 + env->CallStaticVoidMethod(mGeckoAppShellClass, jRegisterSurfaceTextureFrameListener, a0, a1); 1.1015 + AndroidBridge::HandleUncaughtException(env); 1.1016 + env->PopLocalFrame(nullptr); 1.1017 +} 1.1018 + 1.1019 +void GeckoAppShell::RemovePluginView(jobject a0, bool a1) { 1.1020 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1021 + if (env->PushLocalFrame(1) != 0) { 1.1022 + AndroidBridge::HandleUncaughtException(env); 1.1023 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1024 + } 1.1025 + 1.1026 + env->CallStaticVoidMethod(mGeckoAppShellClass, jRemovePluginView, a0, a1); 1.1027 + AndroidBridge::HandleUncaughtException(env); 1.1028 + env->PopLocalFrame(nullptr); 1.1029 +} 1.1030 + 1.1031 +void GeckoAppShell::ScanMedia(const nsAString& a0, const nsAString& a1) { 1.1032 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1033 + if (env->PushLocalFrame(2) != 0) { 1.1034 + AndroidBridge::HandleUncaughtException(env); 1.1035 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1036 + } 1.1037 + 1.1038 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.1039 + jstring j1 = AndroidBridge::NewJavaString(env, a1); 1.1040 + 1.1041 + env->CallStaticVoidMethod(mGeckoAppShellClass, jScanMedia, j0, j1); 1.1042 + AndroidBridge::HandleUncaughtException(env); 1.1043 + env->PopLocalFrame(nullptr); 1.1044 +} 1.1045 + 1.1046 +void GeckoAppShell::ScheduleRestart() { 1.1047 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1048 + if (env->PushLocalFrame(0) != 0) { 1.1049 + AndroidBridge::HandleUncaughtException(env); 1.1050 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1051 + } 1.1052 + 1.1053 + env->CallStaticVoidMethod(mGeckoAppShellClass, jScheduleRestart); 1.1054 + AndroidBridge::HandleUncaughtException(env); 1.1055 + env->PopLocalFrame(nullptr); 1.1056 +} 1.1057 + 1.1058 +void GeckoAppShell::SendMessageWrapper(const nsAString& a0, const nsAString& a1, int32_t a2) { 1.1059 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1060 + if (env->PushLocalFrame(2) != 0) { 1.1061 + AndroidBridge::HandleUncaughtException(env); 1.1062 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1063 + } 1.1064 + 1.1065 + jvalue args[3]; 1.1066 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.1067 + args[1].l = AndroidBridge::NewJavaString(env, a1); 1.1068 + args[2].i = a2; 1.1069 + 1.1070 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jSendMessageWrapper, args); 1.1071 + AndroidBridge::HandleUncaughtException(env); 1.1072 + env->PopLocalFrame(nullptr); 1.1073 +} 1.1074 + 1.1075 +void GeckoAppShell::SetFullScreen(bool a0) { 1.1076 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1077 + if (env->PushLocalFrame(0) != 0) { 1.1078 + AndroidBridge::HandleUncaughtException(env); 1.1079 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1080 + } 1.1081 + 1.1082 + env->CallStaticVoidMethod(mGeckoAppShellClass, jSetFullScreen, a0); 1.1083 + AndroidBridge::HandleUncaughtException(env); 1.1084 + env->PopLocalFrame(nullptr); 1.1085 +} 1.1086 + 1.1087 +void GeckoAppShell::SetKeepScreenOn(bool a0) { 1.1088 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1089 + if (env->PushLocalFrame(0) != 0) { 1.1090 + AndroidBridge::HandleUncaughtException(env); 1.1091 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1092 + } 1.1093 + 1.1094 + env->CallStaticVoidMethod(mGeckoAppShellClass, jSetKeepScreenOn, a0); 1.1095 + AndroidBridge::HandleUncaughtException(env); 1.1096 + env->PopLocalFrame(nullptr); 1.1097 +} 1.1098 + 1.1099 +void GeckoAppShell::SetURITitle(const nsAString& a0, const nsAString& a1) { 1.1100 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1101 + if (env->PushLocalFrame(2) != 0) { 1.1102 + AndroidBridge::HandleUncaughtException(env); 1.1103 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1104 + } 1.1105 + 1.1106 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.1107 + jstring j1 = AndroidBridge::NewJavaString(env, a1); 1.1108 + 1.1109 + env->CallStaticVoidMethod(mGeckoAppShellClass, jSetURITitle, j0, j1); 1.1110 + AndroidBridge::HandleUncaughtException(env); 1.1111 + env->PopLocalFrame(nullptr); 1.1112 +} 1.1113 + 1.1114 +void GeckoAppShell::ShowAlertNotificationWrapper(const nsAString& a0, const nsAString& a1, const nsAString& a2, const nsAString& a3, const nsAString& a4) { 1.1115 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1116 + if (env->PushLocalFrame(5) != 0) { 1.1117 + AndroidBridge::HandleUncaughtException(env); 1.1118 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1119 + } 1.1120 + 1.1121 + jvalue args[5]; 1.1122 + args[0].l = AndroidBridge::NewJavaString(env, a0); 1.1123 + args[1].l = AndroidBridge::NewJavaString(env, a1); 1.1124 + args[2].l = AndroidBridge::NewJavaString(env, a2); 1.1125 + args[3].l = AndroidBridge::NewJavaString(env, a3); 1.1126 + args[4].l = AndroidBridge::NewJavaString(env, a4); 1.1127 + 1.1128 + env->CallStaticVoidMethodA(mGeckoAppShellClass, jShowAlertNotificationWrapper, args); 1.1129 + AndroidBridge::HandleUncaughtException(env); 1.1130 + env->PopLocalFrame(nullptr); 1.1131 +} 1.1132 + 1.1133 +void GeckoAppShell::ShowInputMethodPicker() { 1.1134 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1135 + if (env->PushLocalFrame(0) != 0) { 1.1136 + AndroidBridge::HandleUncaughtException(env); 1.1137 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1138 + } 1.1139 + 1.1140 + env->CallStaticVoidMethod(mGeckoAppShellClass, jShowInputMethodPicker); 1.1141 + AndroidBridge::HandleUncaughtException(env); 1.1142 + env->PopLocalFrame(nullptr); 1.1143 +} 1.1144 + 1.1145 +bool GeckoAppShell::UnlockProfile() { 1.1146 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1147 + if (env->PushLocalFrame(0) != 0) { 1.1148 + AndroidBridge::HandleUncaughtException(env); 1.1149 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1150 + } 1.1151 + 1.1152 + bool temp = env->CallStaticBooleanMethod(mGeckoAppShellClass, jUnlockProfile); 1.1153 + AndroidBridge::HandleUncaughtException(env); 1.1154 + env->PopLocalFrame(nullptr); 1.1155 + return temp; 1.1156 +} 1.1157 + 1.1158 +void GeckoAppShell::UnlockScreenOrientation() { 1.1159 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1160 + if (env->PushLocalFrame(0) != 0) { 1.1161 + AndroidBridge::HandleUncaughtException(env); 1.1162 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1163 + } 1.1164 + 1.1165 + env->CallStaticVoidMethod(mGeckoAppShellClass, jUnlockScreenOrientation); 1.1166 + AndroidBridge::HandleUncaughtException(env); 1.1167 + env->PopLocalFrame(nullptr); 1.1168 +} 1.1169 + 1.1170 +void GeckoAppShell::UnregisterSurfaceTextureFrameListener(jobject a0) { 1.1171 + JNIEnv *env = GetJNIForThread(); 1.1172 + if (env->PushLocalFrame(1) != 0) { 1.1173 + AndroidBridge::HandleUncaughtException(env); 1.1174 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1175 + } 1.1176 + 1.1177 + env->CallStaticVoidMethod(mGeckoAppShellClass, jUnregisterSurfaceTextureFrameListener, a0); 1.1178 + AndroidBridge::HandleUncaughtException(env); 1.1179 + env->PopLocalFrame(nullptr); 1.1180 +} 1.1181 + 1.1182 +void GeckoAppShell::Vibrate1(int64_t a0) { 1.1183 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1184 + if (env->PushLocalFrame(0) != 0) { 1.1185 + AndroidBridge::HandleUncaughtException(env); 1.1186 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1187 + } 1.1188 + 1.1189 + env->CallStaticVoidMethod(mGeckoAppShellClass, jVibrate1, a0); 1.1190 + AndroidBridge::HandleUncaughtException(env); 1.1191 + env->PopLocalFrame(nullptr); 1.1192 +} 1.1193 + 1.1194 +void GeckoAppShell::VibrateA(jlongArray a0, int32_t a1) { 1.1195 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1196 + if (env->PushLocalFrame(1) != 0) { 1.1197 + AndroidBridge::HandleUncaughtException(env); 1.1198 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1199 + } 1.1200 + 1.1201 + env->CallStaticVoidMethod(mGeckoAppShellClass, jVibrateA, a0, a1); 1.1202 + AndroidBridge::HandleUncaughtException(env); 1.1203 + env->PopLocalFrame(nullptr); 1.1204 +} 1.1205 +jclass JavaDomKeyLocation::mDomKeyLocationClass = 0; 1.1206 +jmethodID JavaDomKeyLocation::jvalueOf = 0; 1.1207 +jmethodID JavaDomKeyLocation::jvalues = 0; 1.1208 +jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_JOYSTICK = 0; 1.1209 +jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_LEFT = 0; 1.1210 +jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_MOBILE = 0; 1.1211 +jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_NUMPAD = 0; 1.1212 +jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_RIGHT = 0; 1.1213 +jfieldID JavaDomKeyLocation::jDOM_KEY_LOCATION_STANDARD = 0; 1.1214 +jfieldID JavaDomKeyLocation::jvalue = 0; 1.1215 +void JavaDomKeyLocation::InitStubs(JNIEnv *jEnv) { 1.1216 + initInit(); 1.1217 + 1.1218 + mDomKeyLocationClass = getClassGlobalRef("org/mozilla/gecko/GeckoEvent$DomKeyLocation"); 1.1219 + jvalueOf = getStaticMethod("valueOf", "(Ljava/lang/String;)Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1220 + jvalues = getStaticMethod("values", "()[Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1221 + jDOM_KEY_LOCATION_JOYSTICK = getStaticField("DOM_KEY_LOCATION_JOYSTICK", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1222 + jDOM_KEY_LOCATION_LEFT = getStaticField("DOM_KEY_LOCATION_LEFT", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1223 + jDOM_KEY_LOCATION_MOBILE = getStaticField("DOM_KEY_LOCATION_MOBILE", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1224 + jDOM_KEY_LOCATION_NUMPAD = getStaticField("DOM_KEY_LOCATION_NUMPAD", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1225 + jDOM_KEY_LOCATION_RIGHT = getStaticField("DOM_KEY_LOCATION_RIGHT", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1226 + jDOM_KEY_LOCATION_STANDARD = getStaticField("DOM_KEY_LOCATION_STANDARD", "Lorg/mozilla/gecko/GeckoEvent$DomKeyLocation;"); 1.1227 + jvalue = getField("value", "I"); 1.1228 +} 1.1229 + 1.1230 +JavaDomKeyLocation* JavaDomKeyLocation::Wrap(jobject obj) { 1.1231 + JNIEnv *env = GetJNIForThread(); 1.1232 + JavaDomKeyLocation* ret = new JavaDomKeyLocation(obj, env); 1.1233 + env->DeleteLocalRef(obj); 1.1234 + return ret; 1.1235 +} 1.1236 + 1.1237 +jobject JavaDomKeyLocation::valueOf(const nsAString& a0) { 1.1238 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1239 + if (env->PushLocalFrame(2) != 0) { 1.1240 + AndroidBridge::HandleUncaughtException(env); 1.1241 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1242 + } 1.1243 + 1.1244 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.1245 + 1.1246 + jobject temp = env->CallStaticObjectMethod(mDomKeyLocationClass, jvalueOf, j0); 1.1247 + AndroidBridge::HandleUncaughtException(env); 1.1248 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1249 + return ret; 1.1250 +} 1.1251 + 1.1252 +jobjectArray JavaDomKeyLocation::values() { 1.1253 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1254 + if (env->PushLocalFrame(1) != 0) { 1.1255 + AndroidBridge::HandleUncaughtException(env); 1.1256 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1257 + } 1.1258 + 1.1259 + jobject temp = env->CallStaticObjectMethod(mDomKeyLocationClass, jvalues); 1.1260 + AndroidBridge::HandleUncaughtException(env); 1.1261 + jobjectArray ret = static_cast<jobjectArray>(env->PopLocalFrame(temp)); 1.1262 + return ret; 1.1263 +} 1.1264 + 1.1265 +jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_JOYSTICK() { 1.1266 + JNIEnv *env = GetJNIForThread(); 1.1267 + return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_JOYSTICK)); 1.1268 +} 1.1269 + 1.1270 +jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_LEFT() { 1.1271 + JNIEnv *env = GetJNIForThread(); 1.1272 + return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_LEFT)); 1.1273 +} 1.1274 + 1.1275 +jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_MOBILE() { 1.1276 + JNIEnv *env = GetJNIForThread(); 1.1277 + return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_MOBILE)); 1.1278 +} 1.1279 + 1.1280 +jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_NUMPAD() { 1.1281 + JNIEnv *env = GetJNIForThread(); 1.1282 + return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_NUMPAD)); 1.1283 +} 1.1284 + 1.1285 +jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_RIGHT() { 1.1286 + JNIEnv *env = GetJNIForThread(); 1.1287 + return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_RIGHT)); 1.1288 +} 1.1289 + 1.1290 +jobject JavaDomKeyLocation::getDOM_KEY_LOCATION_STANDARD() { 1.1291 + JNIEnv *env = GetJNIForThread(); 1.1292 + return static_cast<jobject>(env->GetStaticObjectField(mDomKeyLocationClass, jDOM_KEY_LOCATION_STANDARD)); 1.1293 +} 1.1294 + 1.1295 +int32_t JavaDomKeyLocation::getvalue() { 1.1296 + JNIEnv *env = GetJNIForThread(); 1.1297 + return env->GetIntField(wrapped_obj, jvalue); 1.1298 +} 1.1299 +jclass GeckoJavaSampler::mGeckoJavaSamplerClass = 0; 1.1300 +jmethodID GeckoJavaSampler::jGetFrameNameJavaProfilingWrapper = 0; 1.1301 +jmethodID GeckoJavaSampler::jGetSampleTimeJavaProfiling = 0; 1.1302 +jmethodID GeckoJavaSampler::jGetThreadNameJavaProfilingWrapper = 0; 1.1303 +jmethodID GeckoJavaSampler::jPauseJavaProfiling = 0; 1.1304 +jmethodID GeckoJavaSampler::jStartJavaProfiling = 0; 1.1305 +jmethodID GeckoJavaSampler::jStopJavaProfiling = 0; 1.1306 +jmethodID GeckoJavaSampler::jUnpauseJavaProfiling = 0; 1.1307 +void GeckoJavaSampler::InitStubs(JNIEnv *jEnv) { 1.1308 + initInit(); 1.1309 + 1.1310 + mGeckoJavaSamplerClass = getClassGlobalRef("org/mozilla/gecko/GeckoJavaSampler"); 1.1311 + jGetFrameNameJavaProfilingWrapper = getStaticMethod("getFrameName", "(III)Ljava/lang/String;"); 1.1312 + jGetSampleTimeJavaProfiling = getStaticMethod("getSampleTime", "(II)D"); 1.1313 + jGetThreadNameJavaProfilingWrapper = getStaticMethod("getThreadName", "(I)Ljava/lang/String;"); 1.1314 + jPauseJavaProfiling = getStaticMethod("pause", "()V"); 1.1315 + jStartJavaProfiling = getStaticMethod("start", "(II)V"); 1.1316 + jStopJavaProfiling = getStaticMethod("stop", "()V"); 1.1317 + jUnpauseJavaProfiling = getStaticMethod("unpause", "()V"); 1.1318 +} 1.1319 + 1.1320 +GeckoJavaSampler* GeckoJavaSampler::Wrap(jobject obj) { 1.1321 + JNIEnv *env = GetJNIForThread(); 1.1322 + GeckoJavaSampler* ret = new GeckoJavaSampler(obj, env); 1.1323 + env->DeleteLocalRef(obj); 1.1324 + return ret; 1.1325 +} 1.1326 + 1.1327 +jstring GeckoJavaSampler::GetFrameNameJavaProfilingWrapper(int32_t a0, int32_t a1, int32_t a2) { 1.1328 + JNIEnv *env = GetJNIForThread(); 1.1329 + if (env->PushLocalFrame(1) != 0) { 1.1330 + AndroidBridge::HandleUncaughtException(env); 1.1331 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1332 + } 1.1333 + 1.1334 + jvalue args[3]; 1.1335 + args[0].i = a0; 1.1336 + args[1].i = a1; 1.1337 + args[2].i = a2; 1.1338 + 1.1339 + jobject temp = env->CallStaticObjectMethodA(mGeckoJavaSamplerClass, jGetFrameNameJavaProfilingWrapper, args); 1.1340 + AndroidBridge::HandleUncaughtException(env); 1.1341 + jstring ret = static_cast<jstring>(env->PopLocalFrame(temp)); 1.1342 + return ret; 1.1343 +} 1.1344 + 1.1345 +jdouble GeckoJavaSampler::GetSampleTimeJavaProfiling(int32_t a0, int32_t a1) { 1.1346 + JNIEnv *env = GetJNIForThread(); 1.1347 + if (env->PushLocalFrame(0) != 0) { 1.1348 + AndroidBridge::HandleUncaughtException(env); 1.1349 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1350 + } 1.1351 + 1.1352 + jdouble temp = env->CallStaticDoubleMethod(mGeckoJavaSamplerClass, jGetSampleTimeJavaProfiling, a0, a1); 1.1353 + AndroidBridge::HandleUncaughtException(env); 1.1354 + env->PopLocalFrame(nullptr); 1.1355 + return temp; 1.1356 +} 1.1357 + 1.1358 +jstring GeckoJavaSampler::GetThreadNameJavaProfilingWrapper(int32_t a0) { 1.1359 + JNIEnv *env = GetJNIForThread(); 1.1360 + if (env->PushLocalFrame(1) != 0) { 1.1361 + AndroidBridge::HandleUncaughtException(env); 1.1362 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1363 + } 1.1364 + 1.1365 + jobject temp = env->CallStaticObjectMethod(mGeckoJavaSamplerClass, jGetThreadNameJavaProfilingWrapper, a0); 1.1366 + AndroidBridge::HandleUncaughtException(env); 1.1367 + jstring ret = static_cast<jstring>(env->PopLocalFrame(temp)); 1.1368 + return ret; 1.1369 +} 1.1370 + 1.1371 +void GeckoJavaSampler::PauseJavaProfiling() { 1.1372 + JNIEnv *env = GetJNIForThread(); 1.1373 + if (env->PushLocalFrame(0) != 0) { 1.1374 + AndroidBridge::HandleUncaughtException(env); 1.1375 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1376 + } 1.1377 + 1.1378 + env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jPauseJavaProfiling); 1.1379 + AndroidBridge::HandleUncaughtException(env); 1.1380 + env->PopLocalFrame(nullptr); 1.1381 +} 1.1382 + 1.1383 +void GeckoJavaSampler::StartJavaProfiling(int32_t a0, int32_t a1) { 1.1384 + JNIEnv *env = GetJNIForThread(); 1.1385 + if (env->PushLocalFrame(0) != 0) { 1.1386 + AndroidBridge::HandleUncaughtException(env); 1.1387 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1388 + } 1.1389 + 1.1390 + env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jStartJavaProfiling, a0, a1); 1.1391 + AndroidBridge::HandleUncaughtException(env); 1.1392 + env->PopLocalFrame(nullptr); 1.1393 +} 1.1394 + 1.1395 +void GeckoJavaSampler::StopJavaProfiling() { 1.1396 + JNIEnv *env = GetJNIForThread(); 1.1397 + if (env->PushLocalFrame(0) != 0) { 1.1398 + AndroidBridge::HandleUncaughtException(env); 1.1399 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1400 + } 1.1401 + 1.1402 + env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jStopJavaProfiling); 1.1403 + AndroidBridge::HandleUncaughtException(env); 1.1404 + env->PopLocalFrame(nullptr); 1.1405 +} 1.1406 + 1.1407 +void GeckoJavaSampler::UnpauseJavaProfiling() { 1.1408 + JNIEnv *env = GetJNIForThread(); 1.1409 + if (env->PushLocalFrame(0) != 0) { 1.1410 + AndroidBridge::HandleUncaughtException(env); 1.1411 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1412 + } 1.1413 + 1.1414 + env->CallStaticVoidMethod(mGeckoJavaSamplerClass, jUnpauseJavaProfiling); 1.1415 + AndroidBridge::HandleUncaughtException(env); 1.1416 + env->PopLocalFrame(nullptr); 1.1417 +} 1.1418 +jclass SurfaceBits::mSurfaceBitsClass = 0; 1.1419 +jmethodID SurfaceBits::jSurfaceBits = 0; 1.1420 +jfieldID SurfaceBits::jbuffer = 0; 1.1421 +jfieldID SurfaceBits::jformat = 0; 1.1422 +jfieldID SurfaceBits::jheight = 0; 1.1423 +jfieldID SurfaceBits::jwidth = 0; 1.1424 +void SurfaceBits::InitStubs(JNIEnv *jEnv) { 1.1425 + initInit(); 1.1426 + 1.1427 + mSurfaceBitsClass = getClassGlobalRef("org/mozilla/gecko/SurfaceBits"); 1.1428 + jSurfaceBits = getMethod("<init>", "()V"); 1.1429 + jbuffer = getField("buffer", "Ljava/nio/ByteBuffer;"); 1.1430 + jformat = getField("format", "I"); 1.1431 + jheight = getField("height", "I"); 1.1432 + jwidth = getField("width", "I"); 1.1433 +} 1.1434 + 1.1435 +SurfaceBits* SurfaceBits::Wrap(jobject obj) { 1.1436 + JNIEnv *env = GetJNIForThread(); 1.1437 + SurfaceBits* ret = new SurfaceBits(obj, env); 1.1438 + env->DeleteLocalRef(obj); 1.1439 + return ret; 1.1440 +} 1.1441 + 1.1442 +SurfaceBits::SurfaceBits() { 1.1443 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1444 + if (env->PushLocalFrame(0) != 0) { 1.1445 + AndroidBridge::HandleUncaughtException(env); 1.1446 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1447 + } 1.1448 + 1.1449 + Init(env->NewObject(mSurfaceBitsClass, jSurfaceBits), env); 1.1450 + env->PopLocalFrame(nullptr); 1.1451 +} 1.1452 + 1.1453 +jobject SurfaceBits::getbuffer() { 1.1454 + JNIEnv *env = GetJNIForThread(); 1.1455 + return static_cast<jobject>(env->GetObjectField(wrapped_obj, jbuffer)); 1.1456 +} 1.1457 + 1.1458 +void SurfaceBits::setbuffer(jobject a0) { 1.1459 + JNIEnv *env = GetJNIForThread(); 1.1460 + env->SetObjectField(wrapped_obj, jbuffer, a0); 1.1461 +} 1.1462 + 1.1463 +int32_t SurfaceBits::getformat() { 1.1464 + JNIEnv *env = GetJNIForThread(); 1.1465 + return env->GetIntField(wrapped_obj, jformat); 1.1466 +} 1.1467 + 1.1468 +void SurfaceBits::setformat(int32_t a0) { 1.1469 + JNIEnv *env = GetJNIForThread(); 1.1470 + env->SetIntField(wrapped_obj, jformat, a0); 1.1471 +} 1.1472 + 1.1473 +int32_t SurfaceBits::getheight() { 1.1474 + JNIEnv *env = GetJNIForThread(); 1.1475 + return env->GetIntField(wrapped_obj, jheight); 1.1476 +} 1.1477 + 1.1478 +void SurfaceBits::setheight(int32_t a0) { 1.1479 + JNIEnv *env = GetJNIForThread(); 1.1480 + env->SetIntField(wrapped_obj, jheight, a0); 1.1481 +} 1.1482 + 1.1483 +int32_t SurfaceBits::getwidth() { 1.1484 + JNIEnv *env = GetJNIForThread(); 1.1485 + return env->GetIntField(wrapped_obj, jwidth); 1.1486 +} 1.1487 + 1.1488 +void SurfaceBits::setwidth(int32_t a0) { 1.1489 + JNIEnv *env = GetJNIForThread(); 1.1490 + env->SetIntField(wrapped_obj, jwidth, a0); 1.1491 +} 1.1492 +jclass ThumbnailHelper::mThumbnailHelperClass = 0; 1.1493 +jmethodID ThumbnailHelper::jSendThumbnail = 0; 1.1494 +void ThumbnailHelper::InitStubs(JNIEnv *jEnv) { 1.1495 + initInit(); 1.1496 + 1.1497 + mThumbnailHelperClass = getClassGlobalRef("org/mozilla/gecko/ThumbnailHelper"); 1.1498 + jSendThumbnail = getStaticMethod("notifyThumbnail", "(Ljava/nio/ByteBuffer;IZ)V"); 1.1499 +} 1.1500 + 1.1501 +ThumbnailHelper* ThumbnailHelper::Wrap(jobject obj) { 1.1502 + JNIEnv *env = GetJNIForThread(); 1.1503 + ThumbnailHelper* ret = new ThumbnailHelper(obj, env); 1.1504 + env->DeleteLocalRef(obj); 1.1505 + return ret; 1.1506 +} 1.1507 + 1.1508 +void ThumbnailHelper::SendThumbnail(jobject a0, int32_t a1, bool a2) { 1.1509 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1510 + if (env->PushLocalFrame(1) != 0) { 1.1511 + AndroidBridge::HandleUncaughtException(env); 1.1512 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1513 + } 1.1514 + 1.1515 + jvalue args[3]; 1.1516 + args[0].l = a0; 1.1517 + args[1].i = a1; 1.1518 + args[2].z = a2; 1.1519 + 1.1520 + env->CallStaticVoidMethodA(mThumbnailHelperClass, jSendThumbnail, args); 1.1521 + AndroidBridge::HandleUncaughtException(env); 1.1522 + env->PopLocalFrame(nullptr); 1.1523 +} 1.1524 +jclass DisplayPortMetrics::mDisplayPortMetricsClass = 0; 1.1525 +jmethodID DisplayPortMetrics::jDisplayPortMetrics = 0; 1.1526 +jfieldID DisplayPortMetrics::jMPosition = 0; 1.1527 +jfieldID DisplayPortMetrics::jResolution = 0; 1.1528 +void DisplayPortMetrics::InitStubs(JNIEnv *jEnv) { 1.1529 + initInit(); 1.1530 + 1.1531 + mDisplayPortMetricsClass = getClassGlobalRef("org/mozilla/gecko/gfx/DisplayPortMetrics"); 1.1532 + jDisplayPortMetrics = getMethod("<init>", "(FFFFF)V"); 1.1533 + jMPosition = getField("mPosition", "Landroid/graphics/RectF;"); 1.1534 + jResolution = getField("resolution", "F"); 1.1535 +} 1.1536 + 1.1537 +DisplayPortMetrics* DisplayPortMetrics::Wrap(jobject obj) { 1.1538 + JNIEnv *env = GetJNIForThread(); 1.1539 + DisplayPortMetrics* ret = new DisplayPortMetrics(obj, env); 1.1540 + env->DeleteLocalRef(obj); 1.1541 + return ret; 1.1542 +} 1.1543 + 1.1544 +DisplayPortMetrics::DisplayPortMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) { 1.1545 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1546 + if (env->PushLocalFrame(0) != 0) { 1.1547 + AndroidBridge::HandleUncaughtException(env); 1.1548 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1549 + } 1.1550 + 1.1551 + jvalue args[5]; 1.1552 + args[0].f = a0; 1.1553 + args[1].f = a1; 1.1554 + args[2].f = a2; 1.1555 + args[3].f = a3; 1.1556 + args[4].f = a4; 1.1557 + 1.1558 + Init(env->NewObjectA(mDisplayPortMetricsClass, jDisplayPortMetrics, args), env); 1.1559 + env->PopLocalFrame(nullptr); 1.1560 +} 1.1561 + 1.1562 +jobject DisplayPortMetrics::getMPosition() { 1.1563 + JNIEnv *env = GetJNIForThread(); 1.1564 + return static_cast<jobject>(env->GetObjectField(wrapped_obj, jMPosition)); 1.1565 +} 1.1566 + 1.1567 +jfloat DisplayPortMetrics::getResolution() { 1.1568 + JNIEnv *env = GetJNIForThread(); 1.1569 + return env->GetFloatField(wrapped_obj, jResolution); 1.1570 +} 1.1571 +jclass GLController::mGLControllerClass = 0; 1.1572 +jmethodID GLController::jCreateEGLSurfaceForCompositorWrapper = 0; 1.1573 +void GLController::InitStubs(JNIEnv *jEnv) { 1.1574 + initInit(); 1.1575 + 1.1576 + mGLControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/GLController"); 1.1577 + jCreateEGLSurfaceForCompositorWrapper = getMethod("createEGLSurfaceForCompositor", "()Ljavax/microedition/khronos/egl/EGLSurface;"); 1.1578 +} 1.1579 + 1.1580 +GLController* GLController::Wrap(jobject obj) { 1.1581 + JNIEnv *env = GetJNIForThread(); 1.1582 + GLController* ret = new GLController(obj, env); 1.1583 + env->DeleteLocalRef(obj); 1.1584 + return ret; 1.1585 +} 1.1586 + 1.1587 +jobject GLController::CreateEGLSurfaceForCompositorWrapper() { 1.1588 + JNIEnv *env = GetJNIForThread(); 1.1589 + if (env->PushLocalFrame(1) != 0) { 1.1590 + AndroidBridge::HandleUncaughtException(env); 1.1591 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1592 + } 1.1593 + 1.1594 + jobject temp = env->CallObjectMethod(wrapped_obj, jCreateEGLSurfaceForCompositorWrapper); 1.1595 + AndroidBridge::HandleUncaughtException(env); 1.1596 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1597 + return ret; 1.1598 +} 1.1599 +jclass GeckoLayerClient::mGeckoLayerClientClass = 0; 1.1600 +jmethodID GeckoLayerClient::jActivateProgram = 0; 1.1601 +jmethodID GeckoLayerClient::jContentDocumentChanged = 0; 1.1602 +jmethodID GeckoLayerClient::jCreateFrame = 0; 1.1603 +jmethodID GeckoLayerClient::jDeactivateProgram = 0; 1.1604 +jmethodID GeckoLayerClient::jGetDisplayPort = 0; 1.1605 +jmethodID GeckoLayerClient::jIsContentDocumentDisplayed = 0; 1.1606 +jmethodID GeckoLayerClient::jProgressiveUpdateCallback = 0; 1.1607 +jmethodID GeckoLayerClient::jSetFirstPaintViewport = 0; 1.1608 +jmethodID GeckoLayerClient::jSetPageRect = 0; 1.1609 +jmethodID GeckoLayerClient::jSyncFrameMetrics = 0; 1.1610 +jmethodID GeckoLayerClient::jSyncViewportInfo = 0; 1.1611 +void GeckoLayerClient::InitStubs(JNIEnv *jEnv) { 1.1612 + initInit(); 1.1613 + 1.1614 + mGeckoLayerClientClass = getClassGlobalRef("org/mozilla/gecko/gfx/GeckoLayerClient"); 1.1615 + jActivateProgram = getMethod("activateProgram", "()V"); 1.1616 + jContentDocumentChanged = getMethod("contentDocumentChanged", "()V"); 1.1617 + jCreateFrame = getMethod("createFrame", "()Lorg/mozilla/gecko/gfx/LayerRenderer$Frame;"); 1.1618 + jDeactivateProgram = getMethod("deactivateProgram", "()V"); 1.1619 + jGetDisplayPort = getMethod("getDisplayPort", "(ZZILorg/mozilla/gecko/gfx/ImmutableViewportMetrics;)Lorg/mozilla/gecko/gfx/DisplayPortMetrics;"); 1.1620 + jIsContentDocumentDisplayed = getMethod("isContentDocumentDisplayed", "()Z"); 1.1621 + jProgressiveUpdateCallback = getMethod("progressiveUpdateCallback", "(ZFFFFFZ)Lorg/mozilla/gecko/gfx/ProgressiveUpdateData;"); 1.1622 + jSetFirstPaintViewport = getMethod("setFirstPaintViewport", "(FFFFFFF)V"); 1.1623 + jSetPageRect = getMethod("setPageRect", "(FFFF)V"); 1.1624 + jSyncFrameMetrics = getMethod("syncFrameMetrics", "(FFFFFFFZIIIIFZ)Lorg/mozilla/gecko/gfx/ViewTransform;"); 1.1625 + jSyncViewportInfo = getMethod("syncViewportInfo", "(IIIIFZ)Lorg/mozilla/gecko/gfx/ViewTransform;"); 1.1626 +} 1.1627 + 1.1628 +GeckoLayerClient* GeckoLayerClient::Wrap(jobject obj) { 1.1629 + JNIEnv *env = GetJNIForThread(); 1.1630 + GeckoLayerClient* ret = new GeckoLayerClient(obj, env); 1.1631 + env->DeleteLocalRef(obj); 1.1632 + return ret; 1.1633 +} 1.1634 + 1.1635 +void GeckoLayerClient::ActivateProgram() { 1.1636 + JNIEnv *env = GetJNIForThread(); 1.1637 + if (env->PushLocalFrame(0) != 0) { 1.1638 + AndroidBridge::HandleUncaughtException(env); 1.1639 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1640 + } 1.1641 + 1.1642 + env->CallVoidMethod(wrapped_obj, jActivateProgram); 1.1643 + AndroidBridge::HandleUncaughtException(env); 1.1644 + env->PopLocalFrame(nullptr); 1.1645 +} 1.1646 + 1.1647 +void GeckoLayerClient::ContentDocumentChanged() { 1.1648 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1649 + if (env->PushLocalFrame(0) != 0) { 1.1650 + AndroidBridge::HandleUncaughtException(env); 1.1651 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1652 + } 1.1653 + 1.1654 + env->CallVoidMethod(wrapped_obj, jContentDocumentChanged); 1.1655 + AndroidBridge::HandleUncaughtException(env); 1.1656 + env->PopLocalFrame(nullptr); 1.1657 +} 1.1658 + 1.1659 +jobject GeckoLayerClient::CreateFrame() { 1.1660 + JNIEnv *env = GetJNIForThread(); 1.1661 + if (env->PushLocalFrame(1) != 0) { 1.1662 + AndroidBridge::HandleUncaughtException(env); 1.1663 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1664 + } 1.1665 + 1.1666 + jobject temp = env->CallObjectMethod(wrapped_obj, jCreateFrame); 1.1667 + AndroidBridge::HandleUncaughtException(env); 1.1668 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1669 + return ret; 1.1670 +} 1.1671 + 1.1672 +void GeckoLayerClient::DeactivateProgram() { 1.1673 + JNIEnv *env = GetJNIForThread(); 1.1674 + if (env->PushLocalFrame(0) != 0) { 1.1675 + AndroidBridge::HandleUncaughtException(env); 1.1676 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1677 + } 1.1678 + 1.1679 + env->CallVoidMethod(wrapped_obj, jDeactivateProgram); 1.1680 + AndroidBridge::HandleUncaughtException(env); 1.1681 + env->PopLocalFrame(nullptr); 1.1682 +} 1.1683 + 1.1684 +jobject GeckoLayerClient::GetDisplayPort(bool a0, bool a1, int32_t a2, jobject a3) { 1.1685 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1686 + if (env->PushLocalFrame(2) != 0) { 1.1687 + AndroidBridge::HandleUncaughtException(env); 1.1688 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1689 + } 1.1690 + 1.1691 + jvalue args[4]; 1.1692 + args[0].z = a0; 1.1693 + args[1].z = a1; 1.1694 + args[2].i = a2; 1.1695 + args[3].l = a3; 1.1696 + 1.1697 + jobject temp = env->CallObjectMethodA(wrapped_obj, jGetDisplayPort, args); 1.1698 + AndroidBridge::HandleUncaughtException(env); 1.1699 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1700 + return ret; 1.1701 +} 1.1702 + 1.1703 +bool GeckoLayerClient::IsContentDocumentDisplayed() { 1.1704 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1705 + if (env->PushLocalFrame(0) != 0) { 1.1706 + AndroidBridge::HandleUncaughtException(env); 1.1707 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1708 + } 1.1709 + 1.1710 + bool temp = env->CallBooleanMethod(wrapped_obj, jIsContentDocumentDisplayed); 1.1711 + AndroidBridge::HandleUncaughtException(env); 1.1712 + env->PopLocalFrame(nullptr); 1.1713 + return temp; 1.1714 +} 1.1715 + 1.1716 +jobject GeckoLayerClient::ProgressiveUpdateCallback(bool a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, bool a6) { 1.1717 + JNIEnv *env = GetJNIForThread(); 1.1718 + if (env->PushLocalFrame(1) != 0) { 1.1719 + AndroidBridge::HandleUncaughtException(env); 1.1720 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1721 + } 1.1722 + 1.1723 + jvalue args[7]; 1.1724 + args[0].z = a0; 1.1725 + args[1].f = a1; 1.1726 + args[2].f = a2; 1.1727 + args[3].f = a3; 1.1728 + args[4].f = a4; 1.1729 + args[5].f = a5; 1.1730 + args[6].z = a6; 1.1731 + 1.1732 + jobject temp = env->CallObjectMethodA(wrapped_obj, jProgressiveUpdateCallback, args); 1.1733 + AndroidBridge::HandleUncaughtException(env); 1.1734 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1735 + return ret; 1.1736 +} 1.1737 + 1.1738 +void GeckoLayerClient::SetFirstPaintViewport(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6) { 1.1739 + JNIEnv *env = GetJNIForThread(); 1.1740 + if (env->PushLocalFrame(0) != 0) { 1.1741 + AndroidBridge::HandleUncaughtException(env); 1.1742 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1743 + } 1.1744 + 1.1745 + jvalue args[7]; 1.1746 + args[0].f = a0; 1.1747 + args[1].f = a1; 1.1748 + args[2].f = a2; 1.1749 + args[3].f = a3; 1.1750 + args[4].f = a4; 1.1751 + args[5].f = a5; 1.1752 + args[6].f = a6; 1.1753 + 1.1754 + env->CallVoidMethodA(wrapped_obj, jSetFirstPaintViewport, args); 1.1755 + AndroidBridge::HandleUncaughtException(env); 1.1756 + env->PopLocalFrame(nullptr); 1.1757 +} 1.1758 + 1.1759 +void GeckoLayerClient::SetPageRect(jfloat a0, jfloat a1, jfloat a2, jfloat a3) { 1.1760 + JNIEnv *env = GetJNIForThread(); 1.1761 + if (env->PushLocalFrame(0) != 0) { 1.1762 + AndroidBridge::HandleUncaughtException(env); 1.1763 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1764 + } 1.1765 + 1.1766 + jvalue args[4]; 1.1767 + args[0].f = a0; 1.1768 + args[1].f = a1; 1.1769 + args[2].f = a2; 1.1770 + args[3].f = a3; 1.1771 + 1.1772 + env->CallVoidMethodA(wrapped_obj, jSetPageRect, args); 1.1773 + AndroidBridge::HandleUncaughtException(env); 1.1774 + env->PopLocalFrame(nullptr); 1.1775 +} 1.1776 + 1.1777 +jobject GeckoLayerClient::SyncFrameMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, bool a7, int32_t a8, int32_t a9, int32_t a10, int32_t a11, jfloat a12, bool a13) { 1.1778 + JNIEnv *env = GetJNIForThread(); 1.1779 + if (env->PushLocalFrame(1) != 0) { 1.1780 + AndroidBridge::HandleUncaughtException(env); 1.1781 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1782 + } 1.1783 + 1.1784 + jvalue args[14]; 1.1785 + args[0].f = a0; 1.1786 + args[1].f = a1; 1.1787 + args[2].f = a2; 1.1788 + args[3].f = a3; 1.1789 + args[4].f = a4; 1.1790 + args[5].f = a5; 1.1791 + args[6].f = a6; 1.1792 + args[7].z = a7; 1.1793 + args[8].i = a8; 1.1794 + args[9].i = a9; 1.1795 + args[10].i = a10; 1.1796 + args[11].i = a11; 1.1797 + args[12].f = a12; 1.1798 + args[13].z = a13; 1.1799 + 1.1800 + jobject temp = env->CallObjectMethodA(wrapped_obj, jSyncFrameMetrics, args); 1.1801 + AndroidBridge::HandleUncaughtException(env); 1.1802 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1803 + return ret; 1.1804 +} 1.1805 + 1.1806 +jobject GeckoLayerClient::SyncViewportInfo(int32_t a0, int32_t a1, int32_t a2, int32_t a3, jfloat a4, bool a5) { 1.1807 + JNIEnv *env = GetJNIForThread(); 1.1808 + if (env->PushLocalFrame(1) != 0) { 1.1809 + AndroidBridge::HandleUncaughtException(env); 1.1810 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1811 + } 1.1812 + 1.1813 + jvalue args[6]; 1.1814 + args[0].i = a0; 1.1815 + args[1].i = a1; 1.1816 + args[2].i = a2; 1.1817 + args[3].i = a3; 1.1818 + args[4].f = a4; 1.1819 + args[5].z = a5; 1.1820 + 1.1821 + jobject temp = env->CallObjectMethodA(wrapped_obj, jSyncViewportInfo, args); 1.1822 + AndroidBridge::HandleUncaughtException(env); 1.1823 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1824 + return ret; 1.1825 +} 1.1826 +jclass ImmutableViewportMetrics::mImmutableViewportMetricsClass = 0; 1.1827 +jmethodID ImmutableViewportMetrics::jImmutableViewportMetrics = 0; 1.1828 +void ImmutableViewportMetrics::InitStubs(JNIEnv *jEnv) { 1.1829 + initInit(); 1.1830 + 1.1831 + mImmutableViewportMetricsClass = getClassGlobalRef("org/mozilla/gecko/gfx/ImmutableViewportMetrics"); 1.1832 + jImmutableViewportMetrics = getMethod("<init>", "(FFFFFFFFFFFFF)V"); 1.1833 +} 1.1834 + 1.1835 +ImmutableViewportMetrics* ImmutableViewportMetrics::Wrap(jobject obj) { 1.1836 + JNIEnv *env = GetJNIForThread(); 1.1837 + ImmutableViewportMetrics* ret = new ImmutableViewportMetrics(obj, env); 1.1838 + env->DeleteLocalRef(obj); 1.1839 + return ret; 1.1840 +} 1.1841 + 1.1842 +ImmutableViewportMetrics::ImmutableViewportMetrics(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4, jfloat a5, jfloat a6, jfloat a7, jfloat a8, jfloat a9, jfloat a10, jfloat a11, jfloat a12) { 1.1843 + JNIEnv *env = GetJNIForThread(); 1.1844 + if (env->PushLocalFrame(0) != 0) { 1.1845 + AndroidBridge::HandleUncaughtException(env); 1.1846 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1847 + } 1.1848 + 1.1849 + jvalue args[13]; 1.1850 + args[0].f = a0; 1.1851 + args[1].f = a1; 1.1852 + args[2].f = a2; 1.1853 + args[3].f = a3; 1.1854 + args[4].f = a4; 1.1855 + args[5].f = a5; 1.1856 + args[6].f = a6; 1.1857 + args[7].f = a7; 1.1858 + args[8].f = a8; 1.1859 + args[9].f = a9; 1.1860 + args[10].f = a10; 1.1861 + args[11].f = a11; 1.1862 + args[12].f = a12; 1.1863 + 1.1864 + Init(env->NewObjectA(mImmutableViewportMetricsClass, jImmutableViewportMetrics, args), env); 1.1865 + env->PopLocalFrame(nullptr); 1.1866 +} 1.1867 +jclass LayerView::mLayerViewClass = 0; 1.1868 +jmethodID LayerView::jRegisterCompositorWrapper = 0; 1.1869 +void LayerView::InitStubs(JNIEnv *jEnv) { 1.1870 + initInit(); 1.1871 + 1.1872 + mLayerViewClass = getClassGlobalRef("org/mozilla/gecko/gfx/LayerView"); 1.1873 + jRegisterCompositorWrapper = getStaticMethod("registerCxxCompositor", "()Lorg/mozilla/gecko/gfx/GLController;"); 1.1874 +} 1.1875 + 1.1876 +LayerView* LayerView::Wrap(jobject obj) { 1.1877 + JNIEnv *env = GetJNIForThread(); 1.1878 + LayerView* ret = new LayerView(obj, env); 1.1879 + env->DeleteLocalRef(obj); 1.1880 + return ret; 1.1881 +} 1.1882 + 1.1883 +jobject LayerView::RegisterCompositorWrapper() { 1.1884 + JNIEnv *env = GetJNIForThread(); 1.1885 + if (env->PushLocalFrame(1) != 0) { 1.1886 + AndroidBridge::HandleUncaughtException(env); 1.1887 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1888 + } 1.1889 + 1.1890 + jobject temp = env->CallStaticObjectMethod(mLayerViewClass, jRegisterCompositorWrapper); 1.1891 + AndroidBridge::HandleUncaughtException(env); 1.1892 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.1893 + return ret; 1.1894 +} 1.1895 +jclass NativePanZoomController::mNativePanZoomControllerClass = 0; 1.1896 +jmethodID NativePanZoomController::jPostDelayedCallbackWrapper = 0; 1.1897 +jmethodID NativePanZoomController::jRequestContentRepaintWrapper = 0; 1.1898 +void NativePanZoomController::InitStubs(JNIEnv *jEnv) { 1.1899 + initInit(); 1.1900 + 1.1901 + mNativePanZoomControllerClass = getClassGlobalRef("org/mozilla/gecko/gfx/NativePanZoomController"); 1.1902 + jPostDelayedCallbackWrapper = getMethod("postDelayedCallback", "(J)V"); 1.1903 + jRequestContentRepaintWrapper = getMethod("requestContentRepaint", "(FFFFF)V"); 1.1904 +} 1.1905 + 1.1906 +NativePanZoomController* NativePanZoomController::Wrap(jobject obj) { 1.1907 + JNIEnv *env = GetJNIForThread(); 1.1908 + NativePanZoomController* ret = new NativePanZoomController(obj, env); 1.1909 + env->DeleteLocalRef(obj); 1.1910 + return ret; 1.1911 +} 1.1912 + 1.1913 +void NativePanZoomController::PostDelayedCallbackWrapper(int64_t a0) { 1.1914 + JNIEnv *env = GetJNIForThread(); 1.1915 + if (env->PushLocalFrame(0) != 0) { 1.1916 + AndroidBridge::HandleUncaughtException(env); 1.1917 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1918 + } 1.1919 + 1.1920 + env->CallVoidMethod(wrapped_obj, jPostDelayedCallbackWrapper, a0); 1.1921 + AndroidBridge::HandleUncaughtException(env); 1.1922 + env->PopLocalFrame(nullptr); 1.1923 +} 1.1924 + 1.1925 +void NativePanZoomController::RequestContentRepaintWrapper(jfloat a0, jfloat a1, jfloat a2, jfloat a3, jfloat a4) { 1.1926 + JNIEnv *env = GetJNIForThread(); 1.1927 + if (env->PushLocalFrame(0) != 0) { 1.1928 + AndroidBridge::HandleUncaughtException(env); 1.1929 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1930 + } 1.1931 + 1.1932 + jvalue args[5]; 1.1933 + args[0].f = a0; 1.1934 + args[1].f = a1; 1.1935 + args[2].f = a2; 1.1936 + args[3].f = a3; 1.1937 + args[4].f = a4; 1.1938 + 1.1939 + env->CallVoidMethodA(wrapped_obj, jRequestContentRepaintWrapper, args); 1.1940 + AndroidBridge::HandleUncaughtException(env); 1.1941 + env->PopLocalFrame(nullptr); 1.1942 +} 1.1943 +jclass ProgressiveUpdateData::mProgressiveUpdateDataClass = 0; 1.1944 +jmethodID ProgressiveUpdateData::jProgressiveUpdateData = 0; 1.1945 +jmethodID ProgressiveUpdateData::jsetViewport = 0; 1.1946 +jfieldID ProgressiveUpdateData::jabort = 0; 1.1947 +jfieldID ProgressiveUpdateData::jheight = 0; 1.1948 +jfieldID ProgressiveUpdateData::jscale = 0; 1.1949 +jfieldID ProgressiveUpdateData::jwidth = 0; 1.1950 +jfieldID ProgressiveUpdateData::jx = 0; 1.1951 +jfieldID ProgressiveUpdateData::jy = 0; 1.1952 +void ProgressiveUpdateData::InitStubs(JNIEnv *jEnv) { 1.1953 + initInit(); 1.1954 + 1.1955 + mProgressiveUpdateDataClass = getClassGlobalRef("org/mozilla/gecko/gfx/ProgressiveUpdateData"); 1.1956 + jProgressiveUpdateData = getMethod("<init>", "()V"); 1.1957 + jsetViewport = getMethod("setViewport", "(Lorg/mozilla/gecko/gfx/ImmutableViewportMetrics;)V"); 1.1958 + jabort = getField("abort", "Z"); 1.1959 + jheight = getField("height", "F"); 1.1960 + jscale = getField("scale", "F"); 1.1961 + jwidth = getField("width", "F"); 1.1962 + jx = getField("x", "F"); 1.1963 + jy = getField("y", "F"); 1.1964 +} 1.1965 + 1.1966 +ProgressiveUpdateData* ProgressiveUpdateData::Wrap(jobject obj) { 1.1967 + JNIEnv *env = GetJNIForThread(); 1.1968 + ProgressiveUpdateData* ret = new ProgressiveUpdateData(obj, env); 1.1969 + env->DeleteLocalRef(obj); 1.1970 + return ret; 1.1971 +} 1.1972 + 1.1973 +ProgressiveUpdateData::ProgressiveUpdateData() { 1.1974 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1975 + if (env->PushLocalFrame(0) != 0) { 1.1976 + AndroidBridge::HandleUncaughtException(env); 1.1977 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1978 + } 1.1979 + 1.1980 + Init(env->NewObject(mProgressiveUpdateDataClass, jProgressiveUpdateData), env); 1.1981 + env->PopLocalFrame(nullptr); 1.1982 +} 1.1983 + 1.1984 +void ProgressiveUpdateData::setViewport(jobject a0) { 1.1985 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.1986 + if (env->PushLocalFrame(1) != 0) { 1.1987 + AndroidBridge::HandleUncaughtException(env); 1.1988 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.1989 + } 1.1990 + 1.1991 + env->CallVoidMethod(wrapped_obj, jsetViewport, a0); 1.1992 + AndroidBridge::HandleUncaughtException(env); 1.1993 + env->PopLocalFrame(nullptr); 1.1994 +} 1.1995 + 1.1996 +bool ProgressiveUpdateData::getabort() { 1.1997 + JNIEnv *env = GetJNIForThread(); 1.1998 + return env->GetBooleanField(wrapped_obj, jabort); 1.1999 +} 1.2000 + 1.2001 +void ProgressiveUpdateData::setabort(bool a0) { 1.2002 + JNIEnv *env = GetJNIForThread(); 1.2003 + env->SetBooleanField(wrapped_obj, jabort, a0); 1.2004 +} 1.2005 + 1.2006 +jfloat ProgressiveUpdateData::getheight() { 1.2007 + JNIEnv *env = GetJNIForThread(); 1.2008 + return env->GetFloatField(wrapped_obj, jheight); 1.2009 +} 1.2010 + 1.2011 +void ProgressiveUpdateData::setheight(jfloat a0) { 1.2012 + JNIEnv *env = GetJNIForThread(); 1.2013 + env->SetFloatField(wrapped_obj, jheight, a0); 1.2014 +} 1.2015 + 1.2016 +jfloat ProgressiveUpdateData::getscale() { 1.2017 + JNIEnv *env = GetJNIForThread(); 1.2018 + return env->GetFloatField(wrapped_obj, jscale); 1.2019 +} 1.2020 + 1.2021 +void ProgressiveUpdateData::setscale(jfloat a0) { 1.2022 + JNIEnv *env = GetJNIForThread(); 1.2023 + env->SetFloatField(wrapped_obj, jscale, a0); 1.2024 +} 1.2025 + 1.2026 +jfloat ProgressiveUpdateData::getwidth() { 1.2027 + JNIEnv *env = GetJNIForThread(); 1.2028 + return env->GetFloatField(wrapped_obj, jwidth); 1.2029 +} 1.2030 + 1.2031 +void ProgressiveUpdateData::setwidth(jfloat a0) { 1.2032 + JNIEnv *env = GetJNIForThread(); 1.2033 + env->SetFloatField(wrapped_obj, jwidth, a0); 1.2034 +} 1.2035 + 1.2036 +jfloat ProgressiveUpdateData::getx() { 1.2037 + JNIEnv *env = GetJNIForThread(); 1.2038 + return env->GetFloatField(wrapped_obj, jx); 1.2039 +} 1.2040 + 1.2041 +void ProgressiveUpdateData::setx(jfloat a0) { 1.2042 + JNIEnv *env = GetJNIForThread(); 1.2043 + env->SetFloatField(wrapped_obj, jx, a0); 1.2044 +} 1.2045 + 1.2046 +jfloat ProgressiveUpdateData::gety() { 1.2047 + JNIEnv *env = GetJNIForThread(); 1.2048 + return env->GetFloatField(wrapped_obj, jy); 1.2049 +} 1.2050 + 1.2051 +void ProgressiveUpdateData::sety(jfloat a0) { 1.2052 + JNIEnv *env = GetJNIForThread(); 1.2053 + env->SetFloatField(wrapped_obj, jy, a0); 1.2054 +} 1.2055 +jclass ViewTransform::mViewTransformClass = 0; 1.2056 +jmethodID ViewTransform::jViewTransform = 0; 1.2057 +jfieldID ViewTransform::jfixedLayerMarginBottom = 0; 1.2058 +jfieldID ViewTransform::jfixedLayerMarginLeft = 0; 1.2059 +jfieldID ViewTransform::jfixedLayerMarginRight = 0; 1.2060 +jfieldID ViewTransform::jfixedLayerMarginTop = 0; 1.2061 +jfieldID ViewTransform::joffsetX = 0; 1.2062 +jfieldID ViewTransform::joffsetY = 0; 1.2063 +jfieldID ViewTransform::jscale = 0; 1.2064 +jfieldID ViewTransform::jx = 0; 1.2065 +jfieldID ViewTransform::jy = 0; 1.2066 +void ViewTransform::InitStubs(JNIEnv *jEnv) { 1.2067 + initInit(); 1.2068 + 1.2069 + mViewTransformClass = getClassGlobalRef("org/mozilla/gecko/gfx/ViewTransform"); 1.2070 + jViewTransform = getMethod("<init>", "(FFF)V"); 1.2071 + jfixedLayerMarginBottom = getField("fixedLayerMarginBottom", "F"); 1.2072 + jfixedLayerMarginLeft = getField("fixedLayerMarginLeft", "F"); 1.2073 + jfixedLayerMarginRight = getField("fixedLayerMarginRight", "F"); 1.2074 + jfixedLayerMarginTop = getField("fixedLayerMarginTop", "F"); 1.2075 + joffsetX = getField("offsetX", "F"); 1.2076 + joffsetY = getField("offsetY", "F"); 1.2077 + jscale = getField("scale", "F"); 1.2078 + jx = getField("x", "F"); 1.2079 + jy = getField("y", "F"); 1.2080 +} 1.2081 + 1.2082 +ViewTransform* ViewTransform::Wrap(jobject obj) { 1.2083 + JNIEnv *env = GetJNIForThread(); 1.2084 + ViewTransform* ret = new ViewTransform(obj, env); 1.2085 + env->DeleteLocalRef(obj); 1.2086 + return ret; 1.2087 +} 1.2088 + 1.2089 +ViewTransform::ViewTransform(jfloat a0, jfloat a1, jfloat a2) { 1.2090 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2091 + if (env->PushLocalFrame(0) != 0) { 1.2092 + AndroidBridge::HandleUncaughtException(env); 1.2093 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2094 + } 1.2095 + 1.2096 + jvalue args[3]; 1.2097 + args[0].f = a0; 1.2098 + args[1].f = a1; 1.2099 + args[2].f = a2; 1.2100 + 1.2101 + Init(env->NewObjectA(mViewTransformClass, jViewTransform, args), env); 1.2102 + env->PopLocalFrame(nullptr); 1.2103 +} 1.2104 + 1.2105 +jfloat ViewTransform::getfixedLayerMarginBottom() { 1.2106 + JNIEnv *env = GetJNIForThread(); 1.2107 + return env->GetFloatField(wrapped_obj, jfixedLayerMarginBottom); 1.2108 +} 1.2109 + 1.2110 +void ViewTransform::setfixedLayerMarginBottom(jfloat a0) { 1.2111 + JNIEnv *env = GetJNIForThread(); 1.2112 + env->SetFloatField(wrapped_obj, jfixedLayerMarginBottom, a0); 1.2113 +} 1.2114 + 1.2115 +jfloat ViewTransform::getfixedLayerMarginLeft() { 1.2116 + JNIEnv *env = GetJNIForThread(); 1.2117 + return env->GetFloatField(wrapped_obj, jfixedLayerMarginLeft); 1.2118 +} 1.2119 + 1.2120 +void ViewTransform::setfixedLayerMarginLeft(jfloat a0) { 1.2121 + JNIEnv *env = GetJNIForThread(); 1.2122 + env->SetFloatField(wrapped_obj, jfixedLayerMarginLeft, a0); 1.2123 +} 1.2124 + 1.2125 +jfloat ViewTransform::getfixedLayerMarginRight() { 1.2126 + JNIEnv *env = GetJNIForThread(); 1.2127 + return env->GetFloatField(wrapped_obj, jfixedLayerMarginRight); 1.2128 +} 1.2129 + 1.2130 +void ViewTransform::setfixedLayerMarginRight(jfloat a0) { 1.2131 + JNIEnv *env = GetJNIForThread(); 1.2132 + env->SetFloatField(wrapped_obj, jfixedLayerMarginRight, a0); 1.2133 +} 1.2134 + 1.2135 +jfloat ViewTransform::getfixedLayerMarginTop() { 1.2136 + JNIEnv *env = GetJNIForThread(); 1.2137 + return env->GetFloatField(wrapped_obj, jfixedLayerMarginTop); 1.2138 +} 1.2139 + 1.2140 +void ViewTransform::setfixedLayerMarginTop(jfloat a0) { 1.2141 + JNIEnv *env = GetJNIForThread(); 1.2142 + env->SetFloatField(wrapped_obj, jfixedLayerMarginTop, a0); 1.2143 +} 1.2144 + 1.2145 +jfloat ViewTransform::getoffsetX() { 1.2146 + JNIEnv *env = GetJNIForThread(); 1.2147 + return env->GetFloatField(wrapped_obj, joffsetX); 1.2148 +} 1.2149 + 1.2150 +void ViewTransform::setoffsetX(jfloat a0) { 1.2151 + JNIEnv *env = GetJNIForThread(); 1.2152 + env->SetFloatField(wrapped_obj, joffsetX, a0); 1.2153 +} 1.2154 + 1.2155 +jfloat ViewTransform::getoffsetY() { 1.2156 + JNIEnv *env = GetJNIForThread(); 1.2157 + return env->GetFloatField(wrapped_obj, joffsetY); 1.2158 +} 1.2159 + 1.2160 +void ViewTransform::setoffsetY(jfloat a0) { 1.2161 + JNIEnv *env = GetJNIForThread(); 1.2162 + env->SetFloatField(wrapped_obj, joffsetY, a0); 1.2163 +} 1.2164 + 1.2165 +jfloat ViewTransform::getscale() { 1.2166 + JNIEnv *env = GetJNIForThread(); 1.2167 + return env->GetFloatField(wrapped_obj, jscale); 1.2168 +} 1.2169 + 1.2170 +void ViewTransform::setscale(jfloat a0) { 1.2171 + JNIEnv *env = GetJNIForThread(); 1.2172 + env->SetFloatField(wrapped_obj, jscale, a0); 1.2173 +} 1.2174 + 1.2175 +jfloat ViewTransform::getx() { 1.2176 + JNIEnv *env = GetJNIForThread(); 1.2177 + return env->GetFloatField(wrapped_obj, jx); 1.2178 +} 1.2179 + 1.2180 +void ViewTransform::setx(jfloat a0) { 1.2181 + JNIEnv *env = GetJNIForThread(); 1.2182 + env->SetFloatField(wrapped_obj, jx, a0); 1.2183 +} 1.2184 + 1.2185 +jfloat ViewTransform::gety() { 1.2186 + JNIEnv *env = GetJNIForThread(); 1.2187 + return env->GetFloatField(wrapped_obj, jy); 1.2188 +} 1.2189 + 1.2190 +void ViewTransform::sety(jfloat a0) { 1.2191 + JNIEnv *env = GetJNIForThread(); 1.2192 + env->SetFloatField(wrapped_obj, jy, a0); 1.2193 +} 1.2194 +jclass NativeZip::mNativeZipClass = 0; 1.2195 +jmethodID NativeZip::jCreateInputStream = 0; 1.2196 +void NativeZip::InitStubs(JNIEnv *jEnv) { 1.2197 + initInit(); 1.2198 + 1.2199 + mNativeZipClass = getClassGlobalRef("org/mozilla/gecko/mozglue/NativeZip"); 1.2200 + jCreateInputStream = getMethod("createInputStream", "(Ljava/nio/ByteBuffer;I)Ljava/io/InputStream;"); 1.2201 +} 1.2202 + 1.2203 +NativeZip* NativeZip::Wrap(jobject obj) { 1.2204 + JNIEnv *env = GetJNIForThread(); 1.2205 + NativeZip* ret = new NativeZip(obj, env); 1.2206 + env->DeleteLocalRef(obj); 1.2207 + return ret; 1.2208 +} 1.2209 + 1.2210 +jobject NativeZip::CreateInputStream(jobject a0, int32_t a1) { 1.2211 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2212 + if (env->PushLocalFrame(2) != 0) { 1.2213 + AndroidBridge::HandleUncaughtException(env); 1.2214 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2215 + } 1.2216 + 1.2217 + jobject temp = env->CallObjectMethod(wrapped_obj, jCreateInputStream, a0, a1); 1.2218 + AndroidBridge::HandleUncaughtException(env); 1.2219 + jobject ret = static_cast<jobject>(env->PopLocalFrame(temp)); 1.2220 + return ret; 1.2221 +} 1.2222 +jclass MatrixBlobCursor::mMatrixBlobCursorClass = 0; 1.2223 +jmethodID MatrixBlobCursor::jMatrixBlobCursor = 0; 1.2224 +jmethodID MatrixBlobCursor::jMatrixBlobCursor0 = 0; 1.2225 +jmethodID MatrixBlobCursor::jAddRow = 0; 1.2226 +jmethodID MatrixBlobCursor::jAddRow1 = 0; 1.2227 +jmethodID MatrixBlobCursor::jAddRow2 = 0; 1.2228 +void MatrixBlobCursor::InitStubs(JNIEnv *jEnv) { 1.2229 + initInit(); 1.2230 + 1.2231 + mMatrixBlobCursorClass = getClassGlobalRef("org/mozilla/gecko/sqlite/MatrixBlobCursor"); 1.2232 + jMatrixBlobCursor = getMethod("<init>", "([Ljava/lang/String;)V"); 1.2233 + jMatrixBlobCursor0 = getMethod("<init>", "([Ljava/lang/String;I)V"); 1.2234 + jAddRow = getMethod("addRow", "(Ljava/lang/Iterable;)V"); 1.2235 + jAddRow1 = getMethod("addRow", "(Ljava/util/ArrayList;I)V"); 1.2236 + jAddRow2 = getMethod("addRow", "([Ljava/lang/Object;)V"); 1.2237 +} 1.2238 + 1.2239 +MatrixBlobCursor* MatrixBlobCursor::Wrap(jobject obj) { 1.2240 + JNIEnv *env = GetJNIForThread(); 1.2241 + MatrixBlobCursor* ret = new MatrixBlobCursor(obj, env); 1.2242 + env->DeleteLocalRef(obj); 1.2243 + return ret; 1.2244 +} 1.2245 + 1.2246 +MatrixBlobCursor::MatrixBlobCursor(jobjectArray a0) { 1.2247 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2248 + if (env->PushLocalFrame(1) != 0) { 1.2249 + AndroidBridge::HandleUncaughtException(env); 1.2250 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2251 + } 1.2252 + 1.2253 + Init(env->NewObject(mMatrixBlobCursorClass, jMatrixBlobCursor, a0), env); 1.2254 + env->PopLocalFrame(nullptr); 1.2255 +} 1.2256 + 1.2257 +MatrixBlobCursor::MatrixBlobCursor(jobjectArray a0, int32_t a1) { 1.2258 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2259 + if (env->PushLocalFrame(1) != 0) { 1.2260 + AndroidBridge::HandleUncaughtException(env); 1.2261 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2262 + } 1.2263 + 1.2264 + Init(env->NewObject(mMatrixBlobCursorClass, jMatrixBlobCursor0, a0, a1), env); 1.2265 + env->PopLocalFrame(nullptr); 1.2266 +} 1.2267 + 1.2268 +void MatrixBlobCursor::AddRow(jobject a0) { 1.2269 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2270 + if (env->PushLocalFrame(1) != 0) { 1.2271 + AndroidBridge::HandleUncaughtException(env); 1.2272 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2273 + } 1.2274 + 1.2275 + env->CallVoidMethod(wrapped_obj, jAddRow, a0); 1.2276 + AndroidBridge::HandleUncaughtException(env); 1.2277 + env->PopLocalFrame(nullptr); 1.2278 +} 1.2279 + 1.2280 +void MatrixBlobCursor::AddRow(jobject a0, int32_t a1) { 1.2281 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2282 + if (env->PushLocalFrame(1) != 0) { 1.2283 + AndroidBridge::HandleUncaughtException(env); 1.2284 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2285 + } 1.2286 + 1.2287 + env->CallVoidMethod(wrapped_obj, jAddRow1, a0, a1); 1.2288 + AndroidBridge::HandleUncaughtException(env); 1.2289 + env->PopLocalFrame(nullptr); 1.2290 +} 1.2291 + 1.2292 +void MatrixBlobCursor::AddRow(jobjectArray a0) { 1.2293 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2294 + if (env->PushLocalFrame(1) != 0) { 1.2295 + AndroidBridge::HandleUncaughtException(env); 1.2296 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2297 + } 1.2298 + 1.2299 + env->CallVoidMethod(wrapped_obj, jAddRow2, a0); 1.2300 + AndroidBridge::HandleUncaughtException(env); 1.2301 + env->PopLocalFrame(nullptr); 1.2302 +} 1.2303 +jclass SQLiteBridgeException::mSQLiteBridgeExceptionClass = 0; 1.2304 +jmethodID SQLiteBridgeException::jSQLiteBridgeException = 0; 1.2305 +jmethodID SQLiteBridgeException::jSQLiteBridgeException0 = 0; 1.2306 +jfieldID SQLiteBridgeException::jserialVersionUID = 0; 1.2307 +void SQLiteBridgeException::InitStubs(JNIEnv *jEnv) { 1.2308 + initInit(); 1.2309 + 1.2310 + mSQLiteBridgeExceptionClass = getClassGlobalRef("org/mozilla/gecko/sqlite/SQLiteBridgeException"); 1.2311 + jSQLiteBridgeException = getMethod("<init>", "()V"); 1.2312 + jSQLiteBridgeException0 = getMethod("<init>", "(Ljava/lang/String;)V"); 1.2313 + jserialVersionUID = getStaticField("serialVersionUID", "J"); 1.2314 +} 1.2315 + 1.2316 +SQLiteBridgeException* SQLiteBridgeException::Wrap(jobject obj) { 1.2317 + JNIEnv *env = GetJNIForThread(); 1.2318 + SQLiteBridgeException* ret = new SQLiteBridgeException(obj, env); 1.2319 + env->DeleteLocalRef(obj); 1.2320 + return ret; 1.2321 +} 1.2322 + 1.2323 +SQLiteBridgeException::SQLiteBridgeException() { 1.2324 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2325 + if (env->PushLocalFrame(0) != 0) { 1.2326 + AndroidBridge::HandleUncaughtException(env); 1.2327 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2328 + } 1.2329 + 1.2330 + Init(env->NewObject(mSQLiteBridgeExceptionClass, jSQLiteBridgeException), env); 1.2331 + env->PopLocalFrame(nullptr); 1.2332 +} 1.2333 + 1.2334 +SQLiteBridgeException::SQLiteBridgeException(const nsAString& a0) { 1.2335 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2336 + if (env->PushLocalFrame(1) != 0) { 1.2337 + AndroidBridge::HandleUncaughtException(env); 1.2338 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2339 + } 1.2340 + 1.2341 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.2342 + 1.2343 + Init(env->NewObject(mSQLiteBridgeExceptionClass, jSQLiteBridgeException0, j0), env); 1.2344 + env->PopLocalFrame(nullptr); 1.2345 +} 1.2346 + 1.2347 +int64_t SQLiteBridgeException::getserialVersionUID() { 1.2348 + JNIEnv *env = GetJNIForThread(); 1.2349 + return env->GetStaticLongField(mSQLiteBridgeExceptionClass, jserialVersionUID); 1.2350 +} 1.2351 +jclass Clipboard::mClipboardClass = 0; 1.2352 +jmethodID Clipboard::jClearText = 0; 1.2353 +jmethodID Clipboard::jGetClipboardTextWrapper = 0; 1.2354 +jmethodID Clipboard::jHasText = 0; 1.2355 +jmethodID Clipboard::jSetClipboardText = 0; 1.2356 +void Clipboard::InitStubs(JNIEnv *jEnv) { 1.2357 + initInit(); 1.2358 + 1.2359 + mClipboardClass = getClassGlobalRef("org/mozilla/gecko/util/Clipboard"); 1.2360 + jClearText = getStaticMethod("clearText", "()V"); 1.2361 + jGetClipboardTextWrapper = getStaticMethod("getText", "()Ljava/lang/String;"); 1.2362 + jHasText = getStaticMethod("hasText", "()Z"); 1.2363 + jSetClipboardText = getStaticMethod("setText", "(Ljava/lang/CharSequence;)V"); 1.2364 +} 1.2365 + 1.2366 +Clipboard* Clipboard::Wrap(jobject obj) { 1.2367 + JNIEnv *env = GetJNIForThread(); 1.2368 + Clipboard* ret = new Clipboard(obj, env); 1.2369 + env->DeleteLocalRef(obj); 1.2370 + return ret; 1.2371 +} 1.2372 + 1.2373 +void Clipboard::ClearText() { 1.2374 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2375 + if (env->PushLocalFrame(0) != 0) { 1.2376 + AndroidBridge::HandleUncaughtException(env); 1.2377 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2378 + } 1.2379 + 1.2380 + env->CallStaticVoidMethod(mClipboardClass, jClearText); 1.2381 + AndroidBridge::HandleUncaughtException(env); 1.2382 + env->PopLocalFrame(nullptr); 1.2383 +} 1.2384 + 1.2385 +jstring Clipboard::GetClipboardTextWrapper() { 1.2386 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2387 + if (env->PushLocalFrame(1) != 0) { 1.2388 + AndroidBridge::HandleUncaughtException(env); 1.2389 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2390 + } 1.2391 + 1.2392 + jobject temp = env->CallStaticObjectMethod(mClipboardClass, jGetClipboardTextWrapper); 1.2393 + AndroidBridge::HandleUncaughtException(env); 1.2394 + jstring ret = static_cast<jstring>(env->PopLocalFrame(temp)); 1.2395 + return ret; 1.2396 +} 1.2397 + 1.2398 +bool Clipboard::HasText() { 1.2399 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2400 + if (env->PushLocalFrame(0) != 0) { 1.2401 + AndroidBridge::HandleUncaughtException(env); 1.2402 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2403 + } 1.2404 + 1.2405 + bool temp = env->CallStaticBooleanMethod(mClipboardClass, jHasText); 1.2406 + AndroidBridge::HandleUncaughtException(env); 1.2407 + env->PopLocalFrame(nullptr); 1.2408 + return temp; 1.2409 +} 1.2410 + 1.2411 +void Clipboard::SetClipboardText(const nsAString& a0) { 1.2412 + JNIEnv *env = AndroidBridge::GetJNIEnv(); 1.2413 + if (env->PushLocalFrame(1) != 0) { 1.2414 + AndroidBridge::HandleUncaughtException(env); 1.2415 + MOZ_ASSUME_UNREACHABLE("Exception should have caused crash."); 1.2416 + } 1.2417 + 1.2418 + jstring j0 = AndroidBridge::NewJavaString(env, a0); 1.2419 + 1.2420 + env->CallStaticVoidMethod(mClipboardClass, jSetClipboardText, j0); 1.2421 + AndroidBridge::HandleUncaughtException(env); 1.2422 + env->PopLocalFrame(nullptr); 1.2423 +} 1.2424 + 1.2425 +void InitStubs(JNIEnv *jEnv) { 1.2426 + GeckoAppShell::InitStubs(jEnv); 1.2427 + JavaDomKeyLocation::InitStubs(jEnv); 1.2428 + GeckoJavaSampler::InitStubs(jEnv); 1.2429 + SurfaceBits::InitStubs(jEnv); 1.2430 + ThumbnailHelper::InitStubs(jEnv); 1.2431 + DisplayPortMetrics::InitStubs(jEnv); 1.2432 + GLController::InitStubs(jEnv); 1.2433 + GeckoLayerClient::InitStubs(jEnv); 1.2434 + ImmutableViewportMetrics::InitStubs(jEnv); 1.2435 + LayerView::InitStubs(jEnv); 1.2436 + NativePanZoomController::InitStubs(jEnv); 1.2437 + ProgressiveUpdateData::InitStubs(jEnv); 1.2438 + ViewTransform::InitStubs(jEnv); 1.2439 + NativeZip::InitStubs(jEnv); 1.2440 + MatrixBlobCursor::InitStubs(jEnv); 1.2441 + SQLiteBridgeException::InitStubs(jEnv); 1.2442 + Clipboard::InitStubs(jEnv); 1.2443 +} 1.2444 +} /* android */ 1.2445 +} /* widget */ 1.2446 +} /* mozilla */