Skip to content

Commit 0db29c1

Browse files
Update turbo-native-modules-android.md (facebook#4844)
1 parent 95942c2 commit 0db29c1

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

docs/turbo-native-modules-android.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec {
5353
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
5454
sharedPref.edit().remove(key).apply();
5555
}
56+
57+
@Override
58+
public void clear() {
59+
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
60+
sharedPref.edit().clear().apply();
61+
}
5662
}
5763
```
5864

website/versioned_docs/version-0.77/turbo-native-modules-android.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec {
5353
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
5454
sharedPref.edit().remove(key).apply();
5555
}
56+
57+
@Override
58+
public void clear() {
59+
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
60+
sharedPref.edit().clear().apply();
61+
}
5662
}
5763
```
5864

website/versioned_docs/version-0.78/turbo-native-modules-android.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec {
5353
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
5454
sharedPref.edit().remove(key).apply();
5555
}
56+
57+
@Override
58+
public void clear() {
59+
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
60+
sharedPref.edit().clear().apply();
61+
}
5662
}
5763
```
5864

website/versioned_docs/version-0.79/turbo-native-modules-android.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec {
5353
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
5454
sharedPref.edit().remove(key).apply();
5555
}
56+
57+
@Override
58+
public void clear() {
59+
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
60+
sharedPref.edit().clear().apply();
61+
}
5662
}
5763
```
5864

website/versioned_docs/version-0.81/turbo-native-modules-android.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec {
5353
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
5454
sharedPref.edit().remove(key).apply();
5555
}
56+
57+
@Override
58+
public void clear() {
59+
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
60+
sharedPref.edit().clear().apply();
61+
}
5662
}
5763
```
5864

website/versioned_docs/version-0.82/turbo-native-modules-android.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec {
5353
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
5454
sharedPref.edit().remove(key).apply();
5555
}
56+
57+
@Override
58+
public void clear() {
59+
SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE);
60+
sharedPref.edit().clear().apply();
61+
}
5662
}
5763
```
5864

0 commit comments

Comments
 (0)