Skip to content

Commit

Permalink
v2024.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cioccarellia committed Aug 21, 2024
1 parent d8d595c commit 33c7e4f
Show file tree
Hide file tree
Showing 19 changed files with 383 additions and 329 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ android {

defaultConfig {
applicationId "com.andreacioccarelli.androoster"
minSdkVersion 21
minSdkVersion 16
targetSdkVersion 35
versionCode 56
versionName "1.5.3"
versionName "1.5.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class HardwareCore {
.forName(POWER_PROFILE_CLASS)
.getMethod("getAveragePower", java.lang.String::class.java)
.invoke(mPowerProfile_, "battery.capacity") as Double
batteryCapacity.toString() + " MAh"
batteryCapacity.toString() + " MA/h"
} catch (e: Exception) {
e.printStackTrace()
"Unknown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene

lateinit var UI: UI
lateinit var DRAWER_SETTINGS: PrimaryDrawerItem
lateinit var DRAWER_BACKUP: PrimaryDrawerItem
lateinit var drawer: Drawer
var menu: Menu? = null

Expand Down Expand Up @@ -483,7 +482,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene

if (preferencesBuilder.getPreferenceBoolean(SettingStore.GENERAL.SHOW_BACKUP, false)) {
drawer.removeItem(19)
drawer.addItemAtPosition(DRAWER_BACKUP, 16)
} else {
drawer.removeItem(19)
}
Expand Down Expand Up @@ -555,11 +553,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
LicenseManager.startProActivity(this@UIBattery, this@UIBattery, drawer)
false
}
DRAWER_BACKUP = PrimaryDrawerItem().withIdentifier(19L).withName(R.string.drawer_backup).withOnDrawerItemClickListener { _, _, _ ->
startActivity(Intent(this@UIBattery, UIBackup::class.java))
false
}

DRAWER_SETTINGS = PrimaryDrawerItem().withIdentifier(20).withName(R.string.drawer_settings).withOnDrawerItemClickListener { _, _, _ ->
handleIntent(LaunchStruct.SETTINGS_ACTIVITY)
false
Expand All @@ -581,7 +574,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_black_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_black_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_black_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_black)
DRAWER_ABOUT.withIcon(R.drawable.drawer_black_about)
} else {
DRAWER_DASHBOARD.withIcon(R.drawable.drawer_white_dashboard)
Expand All @@ -598,7 +590,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_white_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_white_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_white_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_white)
DRAWER_ABOUT.withIcon(R.drawable.drawer_white_about)
}

Expand Down Expand Up @@ -627,7 +618,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand All @@ -652,7 +642,6 @@ class UIBattery : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/kotlin/com/andreacioccarelli/androoster/ui/UICpu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G

lateinit var UI: UI
lateinit var DRAWER_SETTINGS: PrimaryDrawerItem
lateinit var DRAWER_BACKUP: PrimaryDrawerItem
lateinit var drawer: Drawer
var menu: Menu? = null

Expand Down Expand Up @@ -186,7 +185,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
}
if (preferencesBuilder.getPreferenceBoolean(SettingStore.GENERAL.SHOW_BACKUP, false)) {
drawer.removeItem(19)
drawer.addItemAtPosition(DRAWER_BACKUP, 16)
} else {
drawer.removeItem(19)
}
Expand Down Expand Up @@ -260,12 +258,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
}


DRAWER_BACKUP = PrimaryDrawerItem().withIdentifier(19L).withName(R.string.drawer_backup).withOnDrawerItemClickListener { _, _, _ ->
startActivity(Intent(this@UICpu, UIBackup::class.java))
false
}


DRAWER_SETTINGS = PrimaryDrawerItem().withIdentifier(20).withName(R.string.drawer_settings).withOnDrawerItemClickListener { _, _, _ ->
handleIntent(LaunchStruct.SETTINGS_ACTIVITY)
false
Expand All @@ -288,7 +280,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_black_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_black_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_black_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_black)
DRAWER_ABOUT.withIcon(R.drawable.drawer_black_about)
} else {
DRAWER_DASHBOARD.withIcon(R.drawable.drawer_white_dashboard)
Expand All @@ -305,7 +296,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_white_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_white_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_white_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_white)
DRAWER_ABOUT.withIcon(R.drawable.drawer_white_about)
}

Expand Down Expand Up @@ -334,7 +324,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand All @@ -359,7 +348,6 @@ class UICpu : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/kotlin/com/andreacioccarelli/androoster/ui/UIDebug.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,

lateinit var UI: UI
lateinit var DRAWER_SETTINGS: PrimaryDrawerItem
lateinit var DRAWER_BACKUP: PrimaryDrawerItem
lateinit var drawer: Drawer
var menu: Menu? = null

Expand Down Expand Up @@ -234,7 +233,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,
}
if (preferencesBuilder.getPreferenceBoolean(SettingStore.GENERAL.SHOW_BACKUP, false)) {
drawer.removeItem(19)
drawer.addItemAtPosition(DRAWER_BACKUP, 16)
} else {
drawer.removeItem(19)
}
Expand Down Expand Up @@ -335,11 +333,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,
}
}

DRAWER_BACKUP = PrimaryDrawerItem().withIdentifier(19L).withName(R.string.drawer_backup).withOnDrawerItemClickListener { _, _, _ ->
startActivity(Intent(this@UIDebug, UIBackup::class.java))
false
}

DRAWER_SETTINGS = PrimaryDrawerItem().withIdentifier(20).withName(R.string.drawer_settings).withOnDrawerItemClickListener { _, _, _ ->
handleIntent(LaunchStruct.SETTINGS_ACTIVITY)
false
Expand All @@ -362,7 +355,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_black_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_black_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_black_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_black)
DRAWER_ABOUT.withIcon(R.drawable.drawer_black_about)
} else {
DRAWER_DASHBOARD.withIcon(R.drawable.drawer_white_dashboard)
Expand All @@ -379,7 +371,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_white_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_white_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_white_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_white)
DRAWER_ABOUT.withIcon(R.drawable.drawer_white_about)
}

Expand Down Expand Up @@ -408,7 +399,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand All @@ -433,7 +423,6 @@ class UIDebug : BaseActivity(), NavigationView.OnNavigationItemSelectedListener,
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene

lateinit var UI: UI
lateinit var DRAWER_SETTINGS: PrimaryDrawerItem
lateinit var DRAWER_BACKUP: PrimaryDrawerItem
lateinit var drawer: Drawer
var menu: Menu? = null

Expand Down Expand Up @@ -184,7 +183,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene

if (preferencesBuilder.getPreferenceBoolean(SettingStore.GENERAL.SHOW_BACKUP, false)) {
drawer.removeItem(19)
drawer.addItemAtPosition(DRAWER_BACKUP, 16)
} else {
drawer.removeItem(19)
}
Expand Down Expand Up @@ -254,11 +252,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
false
}

DRAWER_BACKUP = PrimaryDrawerItem().withIdentifier(19L).withName(R.string.drawer_backup).withOnDrawerItemClickListener { _, _, _ ->
startActivity(Intent(this@UIGeneral, UIBackup::class.java))
false
}

DRAWER_SETTINGS = PrimaryDrawerItem().withIdentifier(20).withName(R.string.drawer_settings).withOnDrawerItemClickListener { _, _, _ ->
handleIntent(LaunchStruct.SETTINGS_ACTIVITY)
false
Expand All @@ -279,7 +272,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_black_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_black_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_black_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_black)
DRAWER_ABOUT.withIcon(R.drawable.drawer_black_about)
} else {
DRAWER_DASHBOARD.withIcon(R.drawable.drawer_white_dashboard)
Expand All @@ -296,7 +288,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_white_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_white_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_white_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_white)
DRAWER_ABOUT.withIcon(R.drawable.drawer_white_about)
}

Expand Down Expand Up @@ -325,7 +316,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand All @@ -350,7 +340,6 @@ class UIGeneral : BaseActivity(), NavigationView.OnNavigationItemSelectedListene
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/kotlin/com/andreacioccarelli/androoster/ui/UIGps.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G

lateinit var UI: UI
lateinit var DRAWER_SETTINGS: PrimaryDrawerItem
lateinit var DRAWER_BACKUP: PrimaryDrawerItem
lateinit var drawer: Drawer
var menu: Menu? = null

Expand Down Expand Up @@ -191,7 +190,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G

if (preferencesBuilder.getPreferenceBoolean(SettingStore.GENERAL.SHOW_BACKUP, false)) {
drawer.removeItem(19)
drawer.addItemAtPosition(DRAWER_BACKUP, 16)
} else {
drawer.removeItem(19)
}
Expand Down Expand Up @@ -262,12 +260,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
}


DRAWER_BACKUP = PrimaryDrawerItem().withIdentifier(19L).withName(R.string.drawer_backup).withOnDrawerItemClickListener { _, _, _ ->
startActivity(Intent(this@UIGps, UIBackup::class.java))
false
}


DRAWER_SETTINGS = PrimaryDrawerItem().withIdentifier(20).withName(R.string.drawer_settings).withOnDrawerItemClickListener { _, _, _ ->
handleIntent(LaunchStruct.SETTINGS_ACTIVITY)
false
Expand All @@ -290,7 +282,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_black_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_black_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_black_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_black)
DRAWER_ABOUT.withIcon(R.drawable.drawer_black_about)
} else {
DRAWER_DASHBOARD.withIcon(R.drawable.drawer_white_dashboard)
Expand All @@ -307,7 +298,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_GRAPHICS.withIcon(R.drawable.drawer_white_graphic)
DRAWER_SETTINGS.withIcon(R.drawable.drawer_white_settings)
DRAWER_BUY_PRO_VERSION.withIcon(R.drawable.drawer_white_buy)
DRAWER_BACKUP.withIcon(R.drawable.drawer_backup_white)
DRAWER_ABOUT.withIcon(R.drawable.drawer_white_about)
}

Expand Down Expand Up @@ -336,7 +326,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand All @@ -361,7 +350,6 @@ class UIGps : BaseActivity(), NavigationView.OnNavigationItemSelectedListener, G
DRAWER_HARDWARE,
DRAWER_GRAPHICS,
DividerDrawerItem(),
DRAWER_BACKUP,
DRAWER_ABOUT,
DRAWER_SETTINGS
)
Expand Down
Loading

0 comments on commit 33c7e4f

Please sign in to comment.