Buckets:
NaTo1000/termux-app-bucket / termux-shared /src /main /java /com /termux /shared /settings /preferences /AppSharedPreferences.java
| package com.termux.shared.settings.preferences; | |
| import android.content.Context; | |
| import android.content.SharedPreferences; | |
| import androidx.annotation.NonNull; | |
| import androidx.annotation.Nullable; | |
| /** A class that holds {@link SharedPreferences} objects for apps. */ | |
| public class AppSharedPreferences { | |
| /** The {@link Context} for operations. */ | |
| protected final Context mContext; | |
| /** The {@link SharedPreferences} that ideally should be created with {@link SharedPreferenceUtils#getPrivateSharedPreferences(Context, String)}. */ | |
| protected final SharedPreferences mSharedPreferences; | |
| /** The {@link SharedPreferences}that ideally should be created with {@link SharedPreferenceUtils#getPrivateAndMultiProcessSharedPreferences(Context, String)}. */ | |
| protected final SharedPreferences mMultiProcessSharedPreferences; | |
| protected AppSharedPreferences( Context context, SharedPreferences sharedPreferences) { | |
| this(context, sharedPreferences, null); | |
| } | |
| protected AppSharedPreferences( Context context, SharedPreferences sharedPreferences, | |
| SharedPreferences multiProcessSharedPreferences) { | |
| mContext = context; | |
| mSharedPreferences = sharedPreferences; | |
| mMultiProcessSharedPreferences = multiProcessSharedPreferences; | |
| } | |
| /** Get {@link #mContext}. */ | |
| public Context getContext() { | |
| return mContext; | |
| } | |
| /** Get {@link #mSharedPreferences}. */ | |
| public SharedPreferences getSharedPreferences() { | |
| return mSharedPreferences; | |
| } | |
| /** Get {@link #mMultiProcessSharedPreferences}. */ | |
| public SharedPreferences getMultiProcessSharedPreferences() { | |
| return mMultiProcessSharedPreferences; | |
| } | |
| } | |
Xet Storage Details
- Size:
- 1.79 kB
- Xet hash:
- 503620bfc9ac3175c9277411f032e9691327ef17a0e0f7e5bc63448a0f8cf127
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.