Skip to content

Commit

Permalink
Refactor: Remove unnecessary nullability from context parameter
Browse files Browse the repository at this point in the history
Signed-off-by: DrDisagree <[email protected]>
  • Loading branch information
Mahmud0808 committed Nov 22, 2024
1 parent f71a327 commit 6a57e72
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import de.robv.android.xposed.callbacks.XC_LayoutInflated
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@SuppressLint("DiscouragedApi")
class BackgroundChip(context: Context?) : ModPack(context!!) {
class BackgroundChip(context: Context) : ModPack(context) {

private val mQsStatusIconsContainer = LinearLayout(mContext)
private var mShowSBClockBg = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@Suppress("unused")
@SuppressLint("DiscouragedApi")
class BatteryStyleManager(context: Context?) : ModPack(context!!) {
class BatteryStyleManager(context: Context) : ModPack(context) {

private var defaultLandscapeBatteryEnabled = false
private var frameColor = Color.WHITE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import de.robv.android.xposed.XposedHelpers.getIntField
import de.robv.android.xposed.XposedHelpers.getObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage

class ControllersProvider(context: Context?) : ModPack(context!!) {
class ControllersProvider(context: Context) : ModPack(context) {

private var mBluetoothEnabled = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit

@SuppressLint("DiscouragedApi")
class DepthWallpaper(context: Context?) : ModPack(context!!) {
class DepthWallpaper(context: Context) : ModPack(context) {

private var showDepthWallpaper = false
private var showFadingAnimation = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import java.util.concurrent.TimeUnit
import kotlin.math.max

@SuppressLint("DiscouragedApi")
class DepthWallpaperA14(context: Context?) : ModPack(context!!) {
class DepthWallpaperA14(context: Context) : ModPack(context) {

private var showDepthWallpaper = false
private var showCustomImages = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ import java.util.concurrent.TimeUnit


@SuppressLint("DiscouragedApi")
class HeaderClock(context: Context?) : ModPack(context!!) {
class HeaderClock(context: Context) : ModPack(context) {

private var appContext: Context? = null
private var showHeaderClock = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit

@SuppressLint("DiscouragedApi")
class HeaderClockA14(context: Context?) : ModPack(context!!) {
class HeaderClockA14(context: Context) : ModPack(context) {

private var appContext: Context? = null
private var showHeaderClock = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import java.io.File
import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit

class HeaderImage(context: Context?) : ModPack(context!!) {
class HeaderImage(context: Context) : ModPack(context) {

private var showHeaderImage = false
private var imageHeight = 140
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import de.robv.android.xposed.XposedHelpers.callMethod
import de.robv.android.xposed.XposedHelpers.findClass
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

class IconUpdater(context: Context?) : ModPack(context!!) {
class IconUpdater(context: Context) : ModPack(context) {

private var launcherModel: Any? = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import java.util.concurrent.Executors
import java.util.concurrent.TimeUnit

@SuppressLint("DiscouragedApi")
class LockscreenClock(context: Context?) : ModPack(context!!) {
class LockscreenClock(context: Context) : ModPack(context) {

private var showLockscreenClock = false
private var showDepthWallpaper = false // was used in android 13 and below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import de.robv.android.xposed.XposedHelpers.findClass
import de.robv.android.xposed.XposedHelpers.getObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage

class LockscreenWeather(context: Context?) : ModPack(context!!) {
class LockscreenWeather(context: Context) : ModPack(context) {

private var customLockscreenClock = false
private var weatherEnabled = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import de.robv.android.xposed.XposedHelpers.findClassIfExists
import de.robv.android.xposed.XposedHelpers.getObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage

class LockscreenWidgets(context: Context?) : ModPack(context!!) {
class LockscreenWidgets(context: Context) : ModPack(context) {

// Parent
private var mStatusViewContainer: ViewGroup? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import de.robv.android.xposed.callbacks.XC_LayoutInflated
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@SuppressLint("DiscouragedApi")
class Miscellaneous(context: Context?) : ModPack(context!!) {
class Miscellaneous(context: Context) : ModPack(context) {

private var hideQsCarrierGroup = false
private var hideStatusIcons = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ import kotlin.properties.Delegates
import kotlin.random.Random

@Suppress("DiscouragedApi")
class OpQsHeader(context: Context?) : ModPack(context!!) {
class OpQsHeader(context: Context) : ModPack(context) {

// Preferences
private var showOpQsHeaderView = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import de.robv.android.xposed.XposedHelpers.setObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam


class QSTransparency(context: Context?) : ModPack(context!!) {
class QSTransparency(context: Context) : ModPack(context) {

private val keyguardAlpha = 0.85f
private var qsTransparencyActive = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import de.robv.android.xposed.XposedHelpers.setObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@SuppressLint("DiscouragedApi")
class QuickSettings(context: Context?) : ModPack(context!!) {
class QuickSettings(context: Context) : ModPack(context) {

private var fixQsTileColor = true
private var fixNotificationColor = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import de.robv.android.xposed.callbacks.XC_LayoutInflated
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@SuppressLint("DiscouragedApi")
class Statusbar(context: Context?) : ModPack(context!!) {
class Statusbar(context: Context) : ModPack(context) {

private var mColoredStatusbarIcon = false
private var sbClockSizeSwitch = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import de.robv.android.xposed.XposedBridge
import de.robv.android.xposed.XposedHelpers
import de.robv.android.xposed.callbacks.XC_LoadPackage

class ThemeChange(context: Context?) : ModPack(context!!) {
class ThemeChange(context: Context) : ModPack(context) {

private val mThemeChangedListeners = ArrayList<OnThemeChangedListener>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import kotlin.math.ceil
import kotlin.properties.Delegates

@SuppressLint("DiscouragedApi", "DefaultLocale")
class VolumePanel(context: Context?) : ModPack(context!!) {
class VolumePanel(context: Context) : ModPack(context) {

private var showPercentage = false
private var showWarning = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import de.robv.android.xposed.XposedHelpers.setObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@SuppressLint("DiscouragedApi")
class QSBlackThemeA13(context: Context?) : ModPack(context!!) {
class QSBlackThemeA13(context: Context) : ModPack(context) {

private var mBehindColors: Any? = null
private var isDark: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam


@SuppressLint("DiscouragedApi")
class QSBlackThemeA14(context: Context?) : ModPack(context!!) {
class QSBlackThemeA14(context: Context) : ModPack(context) {

private var mBehindColors: Any? = null
private var isDark: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import kotlin.math.max
import kotlin.math.min

@SuppressLint("DiscouragedApi")
class QSFluidThemeA13(context: Context?) : ModPack(context!!) {
class QSFluidThemeA13(context: Context) : ModPack(context) {

val colorActive = intArrayOf(
mContext.resources.getColor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import kotlin.math.max
import kotlin.math.min

@SuppressLint("DiscouragedApi")
class QSFluidThemeA14(context: Context?) : ModPack(context!!) {
class QSFluidThemeA14(context: Context) : ModPack(context) {

private var wasDark: Boolean = SystemUtils.isDarkMode
private var mSlider: SeekBar? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import de.robv.android.xposed.XposedHelpers.setObjectField
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

@SuppressLint("DiscouragedApi")
class QSLightThemeA12(context: Context?) : ModPack(context!!) {
class QSLightThemeA12(context: Context) : ModPack(context) {

private var mBehindColors: Any? = null
private var isDark: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam
import java.util.Arrays

@SuppressLint("DiscouragedApi")
class QSLightThemeA13(context: Context?) : ModPack(context!!) {
class QSLightThemeA13(context: Context) : ModPack(context) {

private var mBehindColors: Any? = null
private var isDark: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import java.util.Arrays
import java.util.function.Consumer

@SuppressLint("DiscouragedApi")
class QSLightThemeA14(context: Context?) : ModPack(context!!) {
class QSLightThemeA14(context: Context) : ModPack(context) {

private var mBehindColors: Any? = null
private var isDark: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.drdisagree.iconify.common.Const.SYSTEMUI_PACKAGE
import com.drdisagree.iconify.xposed.ModPack
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam

class HookCheck(context: Context?) : ModPack(context!!) {
class HookCheck(context: Context) : ModPack(context) {

private var intentFilter = IntentFilter()
private var broadcastRegistered = false
Expand Down

0 comments on commit 6a57e72

Please sign in to comment.