Skip to content

Commit

Permalink
upgrade version to 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriel committed May 29, 2017
1 parent fb991a9 commit c0af44e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
10 changes: 5 additions & 5 deletions README-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ allprojects {

```gradle
dependencies {
debugCompile 'com.exyui.android:debug-bottle-runtime:1.1.0'
debugCompile 'com.exyui.android:debug-bottle-runtime:1.1.1'
// Javaの場合はこうして構築します
releaseCompile 'com.exyui.android:debug-bottle-noop-java:1.1.0'
testCompile 'com.exyui.android:debug-bottle-noop-java:1.1.0'
releaseCompile 'com.exyui.android:debug-bottle-noop-java:1.1.1'
testCompile 'com.exyui.android:debug-bottle-noop-java:1.1.1'
// Kotlinの場合はこうして構築します
releaseCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.0'
testCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.0'
releaseCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.1'
testCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.1'
compile 'com.android.support:appcompat-v7:23.2.0+'
}
Expand Down
12 changes: 6 additions & 6 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Debug Bottle中编译进了Leak Canary,所有Leak Canary的功能都可以使
加入了支持Kotlin的Block Canary,可以监控UI线程卡死。

[<img src="screenshots/ui-blocks.png"/>](screenshots/raw/network-sniffer-2.png)
[<img src="screenshots/block-canary-demo.gif" width="225" height="400" />](screenshots/raw/block-canary-demo.gif)
[<img src="scree1nshots/block-canary-demo.gif" width="225" height="400" />](screenshots/raw/block-canary-demo.gif)

#### 进入一切Activity并注入参数
简单的Activity/Runnable入口。可以随心所欲进入任何一个Activity,使用任何参数,甚至可以向App中注入想要测试的Intent。
Expand Down Expand Up @@ -97,15 +97,15 @@ allprojects {
然后在主模块中(Application类所在模块)加入依赖:
```gradle
dependencies {
debugCompile 'com.exyui.android:debug-bottle-runtime:1.1.0'
debugCompile 'com.exyui.android:debug-bottle-runtime:1.1.1'
// 如果你的工程是Java工程,使用此依赖
releaseCompile 'com.exyui.android:debug-bottle-noop-java:1.1.0'
testCompile 'com.exyui.android:debug-bottle-noop-java:1.1.0'
releaseCompile 'com.exyui.android:debug-bottle-noop-java:1.1.1'
testCompile 'com.exyui.android:debug-bottle-noop-java:1.1.1'
// 如果你的工程是Kotlin工程,使用此依赖
releaseCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.0'
testCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.0'
releaseCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.1'
testCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.1'
compile 'com.android.support:appcompat-v7:23.2.0+'
}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ Edit and add dependencies in your app module:

```gradle
dependencies {
debugCompile 'com.exyui.android:debug-bottle-runtime:1.1.0'
debugCompile 'com.exyui.android:debug-bottle-runtime:1.1.1'
// Use this in your Java project
releaseCompile 'com.exyui.android:debug-bottle-noop-java:1.1.0'
testCompile 'com.exyui.android:debug-bottle-noop-java:1.1.0'
releaseCompile 'com.exyui.android:debug-bottle-noop-java:1.1.1'
testCompile 'com.exyui.android:debug-bottle-noop-java:1.1.1'
// Use this in your Kotlin project
releaseCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.0'
testCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.0'
releaseCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.1'
testCompile 'com.exyui.android:debug-bottle-noop-kotlin:1.1.1'
compile 'com.android.support:appcompat-v7:23.2.0+'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,38 +95,38 @@ class __Block private constructor() {
private val EMPTY_IMEI = "empty_imei"

fun newInstance(): __Block {
val block = __Block()
val context = __CanaryCoreMgr.context?.context
if (block.versionName == null || block.versionName!!.length == 0) {
try {
val info = context?.packageManager?.getPackageInfo(context.packageName, 0)
block.versionCode = info?.versionCode?: 0
block.versionName = info?.versionName
} catch (e: Throwable) {
Log.e(TAG, NEW_INSTANCE, e)
return __Block().apply {
val context = __CanaryCoreMgr.context?.context
if (versionName?.isEmpty()?: false) {
try {
val info = context?.packageManager?.getPackageInfo(context.packageName, 0)
versionCode = info?.versionCode?: 0
versionName = info?.versionName
} catch (e: Throwable) {
Log.e(TAG, NEW_INSTANCE, e)
}

}

}
if (imei?.isEmpty()?: false) {
try {
imei = (context?.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager).deviceId
} catch (e: Exception) {
Log.e(TAG, NEW_INSTANCE, e)
imei = EMPTY_IMEI
}

if (block.imei == null || block.imei!!.length == 0) {
try {
block.imei = (context?.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager).deviceId
} catch (e: Exception) {
Log.e(TAG, NEW_INSTANCE, e)
block.imei = EMPTY_IMEI
}

qualifier = __CanaryCoreMgr.context?.qualifier?: ""
apiLevel = "${Build.VERSION.SDK_INT} ${Build.VERSION.RELEASE}"
model = Build.MODEL
uid = __CanaryCoreMgr.context?.uid?: ""
cpuCoreNum = PerformanceUtils.numCores
processName = __ProcessUtils.myProcessName()
network = __CanaryCoreMgr.context?.networkType?: ""
freeMemory = PerformanceUtils.freeMemory.toString()
totalMemory = PerformanceUtils.totalMemory.toString()
}
block.qualifier = __CanaryCoreMgr.context?.qualifier?: ""
block.apiLevel = "${Build.VERSION.SDK_INT} ${Build.VERSION.RELEASE}"
block.model = Build.MODEL
block.uid = __CanaryCoreMgr.context?.uid?: ""
block.cpuCoreNum = PerformanceUtils.numCores
block.processName = __ProcessUtils.myProcessName()
block.network = __CanaryCoreMgr.context?.networkType?: ""
block.freeMemory = PerformanceUtils.freeMemory.toString()
block.totalMemory = PerformanceUtils.totalMemory.toString()
return block
}

/**
Expand Down

0 comments on commit c0af44e

Please sign in to comment.