Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
MSkjel committed Jun 4, 2019
1 parent 78c5ebf commit d6d1c44
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
applicationId "tw.fatminmin.xposed.minminguard"
minSdkVersion 14
targetSdkVersion 28
versionCode 69
versionCode 70
versionName "2.0.9"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public void run()
}
}

private static DisplayMetrics metrics = new DisplayMetrics();;

private static float convertPixelsToDp(float px)
{
if(Main.resources == null)
return 0;

DisplayMetrics metrics = Main.resources.getDisplayMetrics();
if(Main.resources != null)
metrics = Main.resources.getDisplayMetrics();

return px / (metrics.densityDpi / 160f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,6 @@ public void onRefresh()
});

refresh(true);

//Workaround for EdXposed
try
{
if (Main.resources == null)
Main.resources = getResources();
}
catch(Exception e)
{

}
}

@Override
Expand Down

0 comments on commit d6d1c44

Please sign in to comment.