mirror of
https://github.com/iweizime/StepChanger.git
synced 2026-10-17 05:30:29 +08:00
fix a crash bug caused by load/store button id in details_activity
This commit is contained in:
@@ -235,9 +235,17 @@ public class StepData {
|
||||
|
||||
if (mSuAvailable) {
|
||||
if (isRead && canRead()) {
|
||||
((Activity) mContext).findViewById(mLoadButtonId).performClick();
|
||||
try {
|
||||
((Activity) mContext).findViewById(mLoadButtonId).performClick();
|
||||
} catch (NullPointerException e) {
|
||||
((Activity) mContext).findViewById(R.id.details_load_button).performClick();
|
||||
}
|
||||
} else if (canWrite()) {
|
||||
((Activity) mContext).findViewById(mStoreButtonId).performClick();
|
||||
try {
|
||||
((Activity) mContext).findViewById(mStoreButtonId).performClick();
|
||||
} catch (NullPointerException e) {
|
||||
((Activity) mContext).findViewById(R.id.details_store_button).performClick();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(mContext)
|
||||
|
||||
Reference in New Issue
Block a user