From 191d54e86aa6ba23913440a6589add2d93ef85ac Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Tue, 9 Aug 2016 17:18:02 +0900 Subject: [PATCH] Bug 1293585 - Remove more unused members in AndroidBridge after bug 1255628. r=snorp MozReview-Commit-ID: C8W4dnY2his --HG-- extra : rebase_source : 6214c05db368a9868916d6bc2e4703ff921bf997 --- widget/android/AndroidBridge.cpp | 24 ------------------------ widget/android/AndroidBridge.h | 22 ---------------------- 2 files changed, 46 deletions(-) diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp index 045f6c17dd0a..c209ca3be169 100644 --- a/widget/android/AndroidBridge.cpp +++ b/widget/android/AndroidBridge.cpp @@ -206,11 +206,6 @@ AndroidBridge::AndroidBridge() mMessageQueueMessages = jEnv->GetFieldID( msgQueueClass.Get(), "mMessages", "Landroid/os/Message;"); - mOpenedGraphicsLibraries = false; - mHasNativeBitmapAccess = false; - mHasNativeWindowAccess = false; - mHasNativeWindowFallback = false; - #ifdef MOZ_WEBSMS_BACKEND AutoJNIClass smsMessage(jEnv, "android/telephony/SmsMessage"); mAndroidSmsMessageClass = smsMessage.getGlobalRef(); @@ -224,17 +219,6 @@ AndroidBridge::AndroidBridge() ALOG_BRIDGE("Failed to find API version"); } - AutoJNIClass surface(jEnv, "android/view/Surface"); - jSurfaceClass = surface.getGlobalRef(); - if (mAPIVersion <= 8 /* Froyo */) { - jSurfacePointerField = surface.getField("mSurface", "I"); - } else if (mAPIVersion > 8 && mAPIVersion < 19 /* KitKat */) { - jSurfacePointerField = surface.getField("mNativeSurface", "I"); - } else { - // We don't know how to get this, just set it to 0 - jSurfacePointerField = 0; - } - AutoJNIClass channels(jEnv, "java/nio/channels/Channels"); jChannels = channels.getGlobalRef(); jChannelCreate = channels.getStaticMethod("newChannel", "(Ljava/io/InputStream;)Ljava/nio/channels/ReadableByteChannel;"); @@ -643,14 +627,6 @@ AndroidBridge::GetStaticStringField(const char *className, const char *fieldName return true; } -void* -AndroidBridge::GetNativeSurface(JNIEnv* env, jobject surface) { - if (!env || !mHasNativeWindowFallback || !jSurfacePointerField) - return nullptr; - - return (void*)env->GetIntField(surface, jSurfacePointerField); -} - namespace mozilla { class TracerRunnable : public Runnable{ public: diff --git a/widget/android/AndroidBridge.h b/widget/android/AndroidBridge.h index 8505c01e7313..32e5b50cd833 100644 --- a/widget/android/AndroidBridge.h +++ b/widget/android/AndroidBridge.h @@ -258,7 +258,6 @@ public: uint16_t GetScreenAngle(); int GetAPIVersion() { return mAPIVersion; } - bool IsHoneycomb() { return mAPIVersion >= 11 && mAPIVersion <= 13; } void InvalidateAndScheduleComposite(); @@ -311,14 +310,6 @@ protected: AndroidBridge(); ~AndroidBridge(); - bool mOpenedGraphicsLibraries; - void OpenGraphicsLibraries(); - void* GetNativeSurface(JNIEnv* env, jobject surface); - - bool mHasNativeBitmapAccess; - bool mHasNativeWindowAccess; - bool mHasNativeWindowFallback; - int mAPIVersion; bool QueueSmsRequest(nsIMobileMessageCallback* aRequest, uint32_t* aRequestIdOut); @@ -334,21 +325,8 @@ protected: jmethodID jClose; jmethodID jAvailable; - // other things - jmethodID jNotifyAppShellReady; - jmethodID jGetOutstandingDrawEvents; - jmethodID jPostToJavaThread; - jmethodID jCreateSurface; - jmethodID jShowSurface; - jmethodID jHideSurface; - jmethodID jDestroySurface; - jmethodID jCalculateLength; - // For native surface stuff - jclass jSurfaceClass; - jfieldID jSurfacePointerField; - // some convinient types to have around jclass jStringClass;