mkulesh / microMathematics

microMathematics Plus - Extended visual calculator
GNU General Public License v3.0
561 stars 68 forks source link

Some Incompatiable API Usages in APP #115

Closed PSDroid2022 closed 2 years ago

PSDroid2022 commented 2 years ago

For your app, we have found that this project has accessed the following APIs which are available only on an API level higher than the declared minSdkVersion and which are accessed without proper protection. In other words, if those APIs get called at runtime, it will trigger a NoSuchMethodError and thus result in a crash of the running application.

  1. <android.content.ContextWrapper: int checkSelfPermission(java.lang.String)>:[23,30]
    
    Error path: <com.mkulesh.micromath.utils.AppLocale$ContextWrapper: com.mkulesh.micromath.utils.AppLocale$ContextWrapper wrap(android.content.Context,java.util.Locale)>[[$i0 < 17, $i0 < 24]]--><android.content.ContextWrapper: void <init>(android.content.Context)>[]--><android.content.ContextWrapper: int checkSelfPermission(java.lang.String)>

Error path: <com.mkulesh.micromath.utils.AppLocale$ContextWrapper: void (android.content.Context)>[[]]--><android.content.ContextWrapper: void (android.content.Context)>[]--><android.content.ContextWrapper: int checkSelfPermission(java.lang.String)>


You can add an if-then check like "If(Build.VERSION.SDK_INT >= 23)" when invoking this API to prevent compatibility issues.