forked from zhengcx/MethodTraceMan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.实现无侵入性集成MethodTraceMan 2.优化MethodTraceMan内存占用问题
- Loading branch information
1 parent
e910697
commit 9075933
Showing
8 changed files
with
97 additions
and
26 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include ':app' | ||
include ':app', ':tracemanui' | ||
//include ':app', ':tracemanui',':tracemanplugin', ':tracemanui-noop' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="cn.cxzheng.tracemanui"/> | ||
package="cn.cxzheng.tracemanui"> | ||
|
||
<application> | ||
<provider | ||
android:name=".TraceManProvider" | ||
android:authorities="${applicationId}.contentprovider" | ||
android:exported="false" /> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
tracemanui/src/main/java/cn/cxzheng/tracemanui/TraceManProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package cn.cxzheng.tracemanui | ||
|
||
import android.content.ContentProvider | ||
import android.content.ContentValues | ||
import android.database.Cursor | ||
import android.net.Uri | ||
|
||
/** | ||
* Create by cxzheng on 2019-12-08 | ||
*/ | ||
class TraceManProvider : ContentProvider() { | ||
override fun insert(uri: Uri, values: ContentValues?): Uri? { | ||
return null | ||
} | ||
|
||
override fun query( | ||
uri: Uri, | ||
projection: Array<String>?, | ||
selection: String?, | ||
selectionArgs: Array<String>?, | ||
sortOrder: String? | ||
): Cursor? { | ||
return null | ||
} | ||
|
||
override fun update( | ||
uri: Uri, | ||
values: ContentValues?, | ||
selection: String?, | ||
selectionArgs: Array<String>? | ||
): Int { | ||
return 0 | ||
} | ||
|
||
override fun delete(uri: Uri, selection: String?, selectionArgs: Array<String>?): Int { | ||
return 0 | ||
} | ||
|
||
override fun getType(uri: Uri): String? { | ||
return null | ||
} | ||
|
||
override fun onCreate(): Boolean { | ||
MethodTraceServerManager.startService(context) | ||
return true | ||
} | ||
} |