From ef36a8a16c41e467b57664bdc3c5ec8fcef746c2 Mon Sep 17 00:00:00 2001 From: Wes Johnston Date: Mon, 13 Jan 2014 15:20:15 -0800 Subject: [PATCH] Bug 921112 - Prohibit proguad from erasing JNI MCC methods. r=bnicholson --- mobile/android/base/GeckoNetworkManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mobile/android/base/GeckoNetworkManager.java b/mobile/android/base/GeckoNetworkManager.java index b38fd2442c19..dff73c2cba75 100644 --- a/mobile/android/base/GeckoNetworkManager.java +++ b/mobile/android/base/GeckoNetworkManager.java @@ -5,6 +5,8 @@ package org.mozilla.gecko; +import org.mozilla.gecko.mozglue.JNITarget; + import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -352,10 +354,13 @@ public class GeckoNetworkManager extends BroadcastReceiver { return -1; } + /* These are called from javascript c-types. Avoid letting pro-guard delete them */ + @JNITarget public static int getMCC() { return getNetworkOperator(InfoType.MCC); } + @JNITarget public static int getMNC() { return getNetworkOperator(InfoType.MNC); }