File tree Expand file tree Collapse file tree 5 files changed +39
-0
lines changed
java/com/surcumference/fingerprint Expand file tree Collapse file tree 5 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 66 <uses-permission android : name =" android.permission.INTERNET" />
77 <uses-permission android : name =" android.permission.READ_PHONE_STATE" />
88 <uses-permission android : name =" android.permission.WRITE_EXTERNAL_STORAGE" />
9+ <uses-permission android : name =" android.permission.REQUEST_INSTALL_PACKAGES" />
910
1011 <application
12+ android : name =" com.surcumference.fingerprint.XApplication"
1113 android : allowBackup =" true"
1214 android : icon =" @mipmap/ic_launcher"
1315 android : label =" @string/app_name"
4042 android : name =" .util.XPreferenceProvider"
4143 android : authorities =" com.surcumference.fingerprintpay.XPreferenceProvider"
4244 android : exported =" true" />
45+ <provider
46+ android : name =" android.support.v4.content.FileProvider"
47+ android : authorities =" com.surcumference.fingerprintpay.fileprovider"
48+ android : exported =" false"
49+ android : grantUriPermissions =" true" >
50+ <meta-data
51+ android : name =" android.support.FILE_PROVIDER_PATHS"
52+ android : resource =" @xml/file_paths" />
53+ </provider >
4354
4455 <activity-alias
4556 android : enabled =" true"
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ public class Constant {
1414 public static final String AUTHORITY_ALIPAY = "com.eg.android.AlipayGphone.asUpgradeFileProvider" ;
1515 public static final String AUTHORITY_TAOBAO = "com.taobao.taobao.interactProvider" ;
1616 public static final String AUTHORITY_QQ = "com.tencent.mobileqq.fileprovider" ;
17+ public static final String AUTHORITY_FINGERPRINT_PAY = BuildConfig .APPLICATION_ID + ".fileprovider" ;
1718 public static final String HELP_URL_WECHAT = "https://github.com/eritpchy/Xposed-Fingerprint-pay/blob/master/doc/WeChat/README.md" ;
1819 public static final String HELP_URL_ALIPAY = "https://github.com/eritpchy/Xposed-Fingerprint-pay/blob/master/doc/Alipay/README.md" ;
1920 public static final String HELP_URL_TAOBAO = "https://github.com/eritpchy/Xposed-Fingerprint-pay/blob/master/doc/Taobao/README.md" ;
Original file line number Diff line number Diff line change 1+ package com .surcumference .fingerprint ;
2+
3+ import android .app .Application ;
4+ import android .content .Context ;
5+
6+ import com .surcumference .fingerprint .bean .PluginType ;
7+ import com .surcumference .fingerprint .plugin .PluginApp ;
8+
9+ public class XApplication extends Application {
10+
11+ @ Override
12+ protected void attachBaseContext (Context base ) {
13+ super .attachBaseContext (base );
14+ PluginApp .setup (PluginType .Xposed , null );
15+ }
16+ }
Original file line number Diff line number Diff line change 55import android .support .v4 .content .FileProvider ;
66import android .text .TextUtils ;
77
8+ import com .surcumference .fingerprint .BuildConfig ;
89import com .surcumference .fingerprint .Constant ;
910import com .surcumference .fingerprint .util .log .L ;
1011
@@ -120,6 +121,8 @@ public static String getAuthorityForPackage(String packageName) {
120121 return Constant .AUTHORITY_TAOBAO ;
121122 } else if (Constant .PACKAGE_NAME_WECHAT .equals (packageName )) {
122123 return Constant .AUTHORITY_WECHAT ;
124+ } else if (BuildConfig .APPLICATION_ID .equals (packageName )) {
125+ return Constant .AUTHORITY_FINGERPRINT_PAY ;
123126 } else {
124127 throw new RuntimeException ("getAuthorityForPackage package:" + packageName + " is not support yet" );
125128 }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <paths >
3+ <files-path name =" files" path =" ." />
4+ <cache-path name =" cache" path =" ." />
5+ <external-path name =" external" path =" ." />
6+ <external-files-path name =" external-files" path =" ." />
7+ <external-cache-path name =" external-cache" path =" ." />
8+ </paths >
You can’t perform that action at this time.
0 commit comments