File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/src/main/java/com/github/kr328/clash Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import android.os.Bundle
88import android.view.View
99import androidx.activity.result.contract.ActivityResultContract
1010import androidx.appcompat.app.AppCompatActivity
11+ import androidx.core.content.getSystemService
1112import com.github.kr328.clash.common.compat.isAllowForceDarkCompat
1213import com.github.kr328.clash.common.compat.isLightNavigationBarCompat
1314import com.github.kr328.clash.common.compat.isLightStatusBarsCompat
@@ -90,9 +91,8 @@ abstract class BaseActivity<D : Design<*>> : AppCompatActivity(),
9091 super .onCreate(savedInstanceState)
9192 applyDayNight()
9293
93- // Apply excludeFromRecents setting to all app tasks
94- val am = getSystemService(Context .ACTIVITY_SERVICE ) as ActivityManager
95- am.appTasks.forEach { task ->
94+ // Apply excludeFromRecents setting to all app tasks.
95+ checkNotNull(getSystemService<ActivityManager >()).appTasks.forEach { task ->
9696 task.setExcludeFromRecents(uiStore.hideFromRecents)
9797 }
9898
You can’t perform that action at this time.
0 commit comments