mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-13 05:37:47 +02:00
Send bitmap to notifications and shortcuts
On API 23+, the platform unifies the way to handle drawable resources across processes: all drawables can be passed via Icon. This allows us to send raw bitmap to the system without the need to specify a resource ID. This means that we are allowed to NOT include these drawable resources within our stub APK, since our full APK can draw the images programmatically and send raw bitmaps to the system.
This commit is contained in:
@ -3,8 +3,7 @@ package com.topjohnwu.magisk.obfuscate;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.topjohnwu.magisk.DynAPK.*;
|
||||
import static com.topjohnwu.magisk.R.drawable.*;
|
||||
import static com.topjohnwu.magisk.DynAPK.Data;
|
||||
|
||||
public class Mapping {
|
||||
private static Map<String, String> map = new HashMap<>();
|
||||
@ -25,13 +24,6 @@ public class Mapping {
|
||||
for (Map.Entry<String, String> e : map.entrySet()) {
|
||||
data.componentMap.put(e.getValue(), e.getKey());
|
||||
}
|
||||
int[] res = new int[5];
|
||||
res[NOTIFICATION] = ic_magisk_outline;
|
||||
res[SUPERUSER] = sc_superuser;
|
||||
res[MAGISKHIDE] = sc_magiskhide;
|
||||
res[DOWNLOAD] = sc_cloud_download;
|
||||
res[MODULES] = sc_extension;
|
||||
data.resourceMap = res;
|
||||
}
|
||||
|
||||
public static String get(String name) {
|
||||
|
Reference in New Issue
Block a user