Allow custom update channels

This commit is contained in:
topjohnwu
2017-11-20 03:09:08 +08:00
parent eed2816491
commit a8f124704d
8 changed files with 63 additions and 29 deletions

View File

@@ -244,4 +244,10 @@ public class Utils {
}
}
}
public static int dpInPx(int dp) {
Context context = MagiskManager.get();
float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5);
}
}