Skip to content

Commit

Permalink
Merge pull request #36 from aarontharris/fixNoteAir3
Browse files Browse the repository at this point in the history
Fix Note Air 3 - Add Hidden API Bypass for SDK30+ and init RxManager from newly added …
  • Loading branch information
olup authored Jan 31, 2024
2 parents 82e3096 + cfb5472 commit 6605e88
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ dependencies {
exclude group: 'com.android.support', module: 'support-compat'
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation("org.lsposed.hiddenapibypass:hiddenapibypass:4.3") // required by onyx sdk

// used in RawInputManager.
implementation group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.2.21'
implementation group: 'io.reactivex.rxjava2', name: 'rxandroid', version: '2.1.1'
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">

<application
android:name=".NotableApp"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/java/com/olup/notable/NotableApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.olup.notable

import android.app.Application
import com.onyx.android.sdk.rx.RxManager
import org.lsposed.hiddenapibypass.HiddenApiBypass

class NotableApp : Application() {

override fun onCreate() {
super.onCreate()
RxManager.Builder.initAppContext(this)
checkHiddenApiBypass()
}

private fun checkHiddenApiBypass() {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
HiddenApiBypass.addHiddenApiExemptions("")
}
}

}

0 comments on commit 6605e88

Please sign in to comment.