File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
sample/src/main/java/com/xdandroid/sample/misc/server Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 10
10
*/
11
11
public class TargetActivity extends Activity {
12
12
13
- /* @SuppressWarnings("unchecked")
13
+ /* static final List<String> WHITE_LIST_APPS = Arrays.asList(
14
+ "com.breel.wallpapers",
15
+ "com.github.shadowsocks",
16
+ "com.xdandroid.kill",
17
+ "com.xdandroid.server",
18
+ "me.piebridge.brevent",
19
+
20
+ "com.alibaba.android.rimet",
21
+ "com.bearyinnovative.horcrux",
22
+ "com.tencent.mm",
23
+ "com.tencent.tim",
24
+ "com.alibaba.alimei"
25
+ );
26
+
27
+ @SuppressWarnings("unchecked")
14
28
@Override
15
29
protected void onCreate(Bundle savedInstanceState) {
16
30
super.onCreate(savedInstanceState);
@@ -34,6 +48,7 @@ protected void onCreate(Bundle savedInstanceState) {
34
48
} catch (Exception e) { return null; }
35
49
})
36
50
.filter(Objects::nonNull)
51
+ .filter(appInfo -> !WHITE_LIST_APPS.contains(appInfo.packageName))
37
52
.forEach(appInfo -> {
38
53
if (appInfo.targetSdkVersion >= Build.VERSION_CODES.M) appInfo.targetSdkVersion = Build.VERSION.SDK_INT;
39
54
if (appInfo.targetSdkVersion <= Build.VERSION_CODES.LOLLIPOP_MR1) appInfo.targetSdkVersion = Build.VERSION_CODES.LOLLIPOP_MR1;
You can’t perform that action at this time.
0 commit comments