增加权限,调整失效变量

This commit is contained in:
Ling0925 2023-01-21 23:05:35 +08:00
parent f61e294260
commit fb464b1eec
3 changed files with 6 additions and 4 deletions

View File

@ -15,6 +15,8 @@
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

View File

@ -52,8 +52,8 @@ class SearchThreadFragment : BaseFragment(), OnOrderSwitchListener {
super.onCreate(savedInstanceState)
order = SearchThreadOrder.NEW
filter = SearchThreadFilter.ONLY_THREAD
if (arguments != null) {
keyword = arguments!!.getString(ARG_KEYWORD)
if (requireArguments() != null) {
keyword = requireArguments().getString(ARG_KEYWORD)
}
}

View File

@ -44,8 +44,8 @@ class SearchUserFragment : BaseFragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (arguments != null) {
keyword = arguments!!.getString(ARG_KEYWORD)
if (requireArguments() != null) {
keyword = requireArguments().getString(ARG_KEYWORD)
}
}