Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / android / java / src / org / chromium / chrome / browser / accessibility / FontSizePrefs.java
index 6878cfe..94e3b79 100644 (file)
@@ -27,7 +27,7 @@ public class FontSizePrefs implements OnSharedPreferenceChangeListener {
     public static final String PREF_TEXT_SCALE = "text_scale";
     public static final String PREF_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
 
-    private static FontSizePrefs mFontSizePrefs;
+    private static FontSizePrefs sFontSizePrefs;
     private final long mFontSizePrefsAndroidPtr;
     private final SharedPreferences mSharedPreferences;
     private final Map<Observer, FontSizePrefsObserverWrapper> mObserverMap;
@@ -96,10 +96,10 @@ public class FontSizePrefs implements OnSharedPreferenceChangeListener {
      */
     public static FontSizePrefs getInstance(Context context) {
         ThreadUtils.assertOnUiThread();
-        if (mFontSizePrefs == null) {
-            mFontSizePrefs = new FontSizePrefs(context);
+        if (sFontSizePrefs == null) {
+            sFontSizePrefs = new FontSizePrefs(context);
         }
-        return mFontSizePrefs;
+        return sFontSizePrefs;
     }
 
     /**
@@ -170,11 +170,6 @@ public class FontSizePrefs implements OnSharedPreferenceChangeListener {
         return nativeGetForceEnableZoom(mFontSizePrefsAndroidPtr);
     }
 
-    public void destroy() {
-        mSharedPreferences.unregisterOnSharedPreferenceChangeListener(this);
-        nativeDestroy(mFontSizePrefsAndroidPtr);
-    }
-
     private native void nativeAddObserver(long nativeFontSizePrefsAndroid,
             long nativeObserverPtr);
 
@@ -183,8 +178,6 @@ public class FontSizePrefs implements OnSharedPreferenceChangeListener {
 
     private native long nativeInit();
 
-    private native void nativeDestroy(long nativeFontSizePrefsAndroid);
-
     private native void nativeSetFontScaleFactor(long nativeFontSizePrefsAndroid, float font);
 
     private native float nativeGetFontScaleFactor(long nativeFontSizePrefsAndroid);