File tree Expand file tree Collapse file tree 5 files changed +7
-10
lines changed
app/src/main/java/net/gsantner/opoc Expand file tree Collapse file tree 5 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1111
1212import static android .view .WindowManager .LayoutParams .FLAG_SECURE ;
1313
14- import android .content .Context ;
1514import android .os .Bundle ;
1615import android .os .Handler ;
1716import android .view .View ;
Original file line number Diff line number Diff line change @@ -145,12 +145,17 @@ public String getTitle() {
145145 protected int _defaultIconTintColor ;
146146 protected GsContextUtils _cu ;
147147
148+ @ Override
149+ public void onAttach (@ NonNull Context context ) {
150+ super .onAttach (context );
151+ _appSettings = getAppSettings (context );
152+ _cu = GsContextUtils .instance ;
153+ }
154+
148155 @ Override
149156 @ Deprecated
150157 public void onCreatePreferences (Bundle savedInstanceState , String rootKey ) {
151158 Activity activity = getActivity ();
152- _appSettings = getAppSettings (activity );
153- _cu = GsContextUtils .instance ;
154159 getPreferenceManager ().setSharedPreferencesName (getSharedPreferencesName ());
155160 addPreferencesFromResource (getPreferenceResourceForInflation ());
156161
Original file line number Diff line number Diff line change 3838import androidx .recyclerview .widget .RecyclerView ;
3939import androidx .swiperefreshlayout .widget .SwipeRefreshLayout ;
4040
41- import net .gsantner .markor .ApplicationObject ;
4241import net .gsantner .markor .R ;
4342import net .gsantner .markor .format .FormatRegistry ;
4443import net .gsantner .markor .frontend .FileInfoDialog ;
Original file line number Diff line number Diff line change @@ -35,13 +35,11 @@ public boolean isAppCurrentVersionFirstStart(boolean doSet) {
3535import android .annotation .SuppressLint ;
3636import android .content .Context ;
3737import android .content .SharedPreferences ;
38- import android .os .Build ;
3938import android .text .TextUtils ;
4039
4140import androidx .annotation .ColorRes ;
4241import androidx .annotation .NonNull ;
4342import androidx .annotation .StringRes ;
44- import androidx .core .content .ContextCompat ;
4543
4644import java .io .File ;
4745import java .util .ArrayList ;
Original file line number Diff line number Diff line change 5858import android .net .Uri ;
5959import android .os .Build ;
6060import android .os .Environment ;
61- import android .os .IBinder ;
6261import android .os .ParcelFileDescriptor ;
6362import android .os .SystemClock ;
6463import android .os .VibrationEffect ;
9089import android .view .View ;
9190import android .view .ViewGroup ;
9291import android .view .Window ;
93- import android .view .WindowInsets ;
94- import android .view .WindowInsetsController ;
9592import android .view .WindowManager ;
96- import android .view .inputmethod .InputMethodManager ;
9793import android .webkit .MimeTypeMap ;
9894import android .webkit .WebView ;
9995import android .widget .ImageView ;
You can’t perform that action at this time.
0 commit comments