Skip to content

Commit

Permalink
Merge pull request #31 from judemanutd/bugfix/fallback
Browse files Browse the repository at this point in the history
Bufix and fallback for asus
  • Loading branch information
judemanutd authored Jan 12, 2020
2 parents 133964f + 2544ce5 commit 4e7ed07
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Add this to your module's `build.gradle` file:
```groovy
dependencies {
// ... other dependencies
implementation 'com.github.judemanutd:autostarter:1.0.6'
implementation 'com.github.judemanutd:autostarter:1.0.7'
}
```

Expand All @@ -42,7 +42,7 @@ dependencies {
<dependency>
<groupId>com.github.judemanutd</groupId>
<artifactId>autostarter</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<type>pom</type>
</dependency>
```
Expand Down
6 changes: 3 additions & 3 deletions autostarter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ext {
siteUrl = 'https://github.com/judemanutd/AutoStarter'
gitUrl = 'https://github.com/judemanutd/AutoStarter.git'

libraryVersion = '1.0.6'
libraryVersion = '1.0.7'

developerId = 'judemanutd'
developerName = 'Jude Fernandes'
Expand All @@ -31,8 +31,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 29
versionCode 6
versionName "1.0.6"
versionCode 7
versionName "1.0.7"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class AutoStartPermissionHelper private constructor() {
private val BRAND_ASUS = "asus"
private val PACKAGE_ASUS_MAIN = "com.asus.mobilemanager"
private val PACKAGE_ASUS_COMPONENT = "com.asus.mobilemanager.powersaver.PowerSaverSettings"
private val PACKAGE_ASUS_COMPONENT_FALLBACK = "com.asus.mobilemanager.autostart.AutoStartActivity"

/***
* Honor
Expand Down Expand Up @@ -147,7 +148,12 @@ class AutoStartPermissionHelper private constructor() {
startIntent(context, PACKAGE_ASUS_MAIN, PACKAGE_ASUS_COMPONENT)
} catch (e: Exception) {
e.printStackTrace()
return false
try {
startIntent(context, PACKAGE_ASUS_MAIN, PACKAGE_ASUS_COMPONENT_FALLBACK)
} catch (ex: Exception) {
ex.printStackTrace()
return false
}
}
} else {
return false
Expand Down Expand Up @@ -198,7 +204,6 @@ class AutoStartPermissionHelper private constructor() {
ex.printStackTrace()
return false
}
return false
}
} else {
return false
Expand All @@ -223,9 +228,7 @@ class AutoStartPermissionHelper private constructor() {
exx.printStackTrace()
return false
}

}

}
} else {
return false
Expand All @@ -250,9 +253,7 @@ class AutoStartPermissionHelper private constructor() {
exx.printStackTrace()
return false
}

}

}
} else {
return false
Expand Down

0 comments on commit 4e7ed07

Please sign in to comment.