X-Git-Url: http://nitlanguage.org diff --git a/lib/android/shared_preferences/shared_preferences_api11.nit b/lib/android/shared_preferences/shared_preferences_api11.nit index 4a87478..cb55acc 100644 --- a/lib/android/shared_preferences/shared_preferences_api11.nit +++ b/lib/android/shared_preferences/shared_preferences_api11.nit @@ -15,13 +15,14 @@ # limitations under the License. # Refines shared_preferences module to add API 11 services -module shared_preferences_api11 +module shared_preferences_api11 is min_api_version(11) import shared_preferences in "Java" `{ import java.util.HashSet; import java.util.Set; + import android.content.Context; `} redef extern class NativeSharedPreferences @@ -66,16 +67,15 @@ redef class SharedPreferences end # File access mode - private fun multi_process_mode: Int in "Java" `{ return Content.MODE_MULTI_PROCESS; `} + private fun multi_process_mode: Int in "Java" `{ return Context.MODE_MULTI_PROCESS; `} # Returns the `HashSet[JavaString]` value corresponding the given key or `null` if none # # User has to manage local stack deallocation himself # - # Example : - # ~~~ - # var a_hash_set = shared_preferences.string_set("A key") - # ... + # ~~~nitish + # var a_hash_set = app.shared_preferences.string_set("A key") + # # ... # for element in a_hash_set do element.delete_local_ref # ~~~ fun string_set(key: String): HashSet[JavaString] @@ -91,10 +91,9 @@ redef class SharedPreferences # # User has to manage local stack deallocation himself # - # Example : - # ~~~ + # ~~~nitish # var foo = new HashSet[JavaString] - # shared_preferences.add_string_set("A key", foo) + # app.shared_preferences.add_string_set("A key", foo) # for element in foo do element.delete_local_ref # ~~~ fun add_string_set(key: String, value: HashSet[JavaString]): SharedPreferences