mirror of
https://github.com/DroidPluginTeam/DroidPlugin.git
synced 2026-10-16 20:20:33 +08:00
@@ -1,29 +1,13 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
dependencies {
|
||||
provided fileTree(dir: 'lib', include: '*.jar')
|
||||
compile fileTree(dir: 'libs', include: '*.jar')
|
||||
compileOnly fileTree(dir: 'lib', include: '*.jar')
|
||||
implementation fileTree(dir: 'libs', include: '*.jar')
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['src']
|
||||
aidl.srcDirs = ['src']
|
||||
renderscript.srcDirs = ['src']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
|
||||
instrumentTest.setRoot('tests')
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
@@ -33,6 +17,9 @@ android {
|
||||
|
||||
// 建议改为自己的 packageName + .droidplugin_stub ,防止跟其它本插件使用者冲突
|
||||
def authorityName = "com.morgoo.droidplugin_stub"
|
||||
minSdkVersion 9
|
||||
versionCode 1
|
||||
versionName '1.0'
|
||||
|
||||
buildConfigField "String", "AUTHORITY_NAME", "\"${authorityName}\""
|
||||
manifestPlaceholders = [
|
||||
|
||||
-2
@@ -29,8 +29,6 @@
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="9" />
|
||||
|
||||
<!--预申请很多权限。也是为了插件使用-->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
+2
-2
@@ -365,7 +365,7 @@ public class PluginCallback implements Handler.Callback {
|
||||
ActivityInfo targetActivityInfo = PluginManager.getInstance().getActivityInfo(targetComponentName, 0);
|
||||
if (targetActivityInfo != null) {
|
||||
|
||||
if (targetComponentName != null && targetComponentName.getClassName().startsWith(".")) {
|
||||
if (targetComponentName != null && targetComponentName.getClassName().startsWith("")) {
|
||||
targetIntent.setClassName(targetComponentName.getPackageName(), targetComponentName.getPackageName() + targetComponentName.getClassName());
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ public class PluginCallback implements Handler.Callback {
|
||||
ResolveInfo info = pm.resolveActivity(targetIntent, 0);
|
||||
if (info != null) {
|
||||
String name = info.activityInfo.name;
|
||||
if (name != null && name.startsWith(".")) {
|
||||
if (name != null && name.startsWith("")) {
|
||||
name = info.activityInfo.packageName + info.activityInfo.name;
|
||||
}
|
||||
return ShortcutProxyActivity.class.getName().equals(name);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user