MuntashirAkon / AppManager

A full-featured package manager and viewer for Android
https://muntashirakon.github.io/AppManager/
Other
4.91k stars 277 forks source link

set appops by name in profile cause AM to crash. #504

Closed lyaaz closed 3 years ago

lyaaz commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behaviour:

  1. Go to 'Profile'
  2. Set a new Profile
  3. Click on 'Configurations'
  4. Click on 'app ops'
  5. type 'WRITE_SETTINGS'
  6. Click on 'save'
  7. See crash

Expected behavior successfully add appops by name.

Screenshots Screenshot_20210703-110822_App_Manager

Crash logs

java.lang.NumberFormatException: For input string: "WRITE_SETTINGS"
    at java.lang.Integer.parseInt(Integer.java:615)
    at java.lang.Integer.parseInt(Integer.java:650)
    at io.github.muntashirakon.AppManager.profiles.ProfileViewModel.setAppOps(ProfileViewModel.java:373)
    at io.github.muntashirakon.AppManager.profiles.ConfPreferences.lambda$onCreatePreferences$7$ConfPreferences(ConfPreferences.java:121)
    at io.github.muntashirakon.AppManager.profiles.-$$Lambda$ConfPreferences$nxOAvC52W7XpFlwknrzxUG96myw.onClick(Unknown Source:8)
    at io.github.muntashirakon.AppManager.types.TextInputDialogBuilder.lambda$setPositiveButton$0$TextInputDialogBuilder(TextInputDialogBuilder.java:103)
    at io.github.muntashirakon.AppManager.types.-$$Lambda$TextInputDialogBuilder$tKo_1QwVTk4yr_IK6zS88R9KqNY.onClick(Unknown Source:4)
    at androidx.appcompat.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7664)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Device Info:
App version: 2.6.2
App version code: 389
Android build version: 1624278295
Android release version: 11
Android SDK version: 30
Android build ID: RQ3A.210605.005
Device brand: Xiaomi
Device manufacturer: Xiaomi
Device name: cepheus
Device model: MI 9
Device product name: cepheus
Device hardware name: qcom
ABIs: [arm64-v8a, armeabi-v7a, armeabi]
ABIs (32bit): [armeabi-v7a, armeabi]
ABIs (64bit): [arm64-v8a]
System language: en-US
In-App Language: auto
Mode: auto

Device info

Additional context Add any other context about the problem here.

MuntashirAkon commented 3 years ago

Fixed in 854382e1