Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-base: Commit

frameworks/base


Commit MetaInfo

Revisionbf10629e34e836527a7cb855d633f6a932fed89a (tree)
Time2018-04-25 19:46:45
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

houdini: match package name by patterns

PRC apps from different markets usually have different package names.
This change tries to match them by patterns.

To test it, install the Implosion apps from Wandoujia and CoolMarket
and run them OK.

Change Summary

Incremental Difference

--- a/core/jni/abipicker/ABIPicker.cpp
+++ b/core/jni/abipicker/ABIPicker.cpp
@@ -5,6 +5,7 @@
55
66 #include <androidfw/ZipFileRO.h>
77 #include <androidfw/ZipUtils.h>
8+#include <fnmatch.h>
89
910 namespace android {
1011 #define ARR_SIZE(x) (sizeof(x)/sizeof(x[0]))
@@ -106,8 +107,8 @@ bool isInOEMWhiteList(const char* pkgName) {
106107 Vector<char*>::iterator it = cfgWhite.begin();
107108 for (; it != cfgWhite.end(); it++) {
108109 P_LOG("whitelist : %s", *it);
109- if (0 == strcmp(pkgName, *it)) {
110- ALOGI("found %s in whitelist", pkgName);
110+ if (0 == fnmatch(*it, pkgName, 0)) {
111+ ALOGI("whitelist %s by %s", pkgName, *it);
111112 result = true;
112113 break;
113114 }
@@ -128,8 +129,8 @@ bool isInOEMBlackList(const char* pkgName) {
128129
129130 Vector<char*>::iterator it = cfgBlack.begin();
130131 for (; it != cfgBlack.end(); it++) {
131- if (0 == strcmp(pkgName, *it)) {
132- ALOGI("found %s in blacklist", pkgName);
132+ if (0 == fnmatch(*it, pkgName, 0)) {
133+ ALOGI("blacklist %s by %s", pkgName, *it);
133134 result = true;
134135 break;
135136 }
Show on old repository browser