diff --git a/NOTICE.md b/NOTICE.md index 8f8f410..047be4e 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -250,6 +250,16 @@ limitations under the License. > Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0 +## commonmark-java + +> https://github.com/atlassian/commonmark-java + +Copyright (c) 2015-2019 Atlassian and others. + +BSD (2-clause) licensed, see LICENSE.txt file. + +> BSD (2-clause): https://opensource.org/licenses/BSD-2-Clause + ## logger > https://github.com/orhanobut/logger diff --git a/README.md b/README.md index e62750d..9cc1417 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ ![录制回放](assets/replay.gif) -**[游戏录制回放使用视频](videos/游戏自动化.mp4)** +**[游戏录制回放使用视频](https://gw.alipayobjects.com/mdn/rms_e29b5f/afts/file/A*ym07T6nACDIAAAAAAAAAAABkARQnAQ)** -**[Native应用录制回放使用视频](videos/垃圾邮件处理.mov)** +**[Native应用录制回放使用视频](https://gw.alipayobjects.com/os/basement_prod/3472d35c-bd57-4c82-8112-5dcde42fcb32.mov)** Soloπ拥有录制操作的能力,用户只需要通过Soloπ执行用例步骤,Soloπ就能够将用户的操作记录下来,并且支持在各个设备上进行回放,这一切都能够在手机上独立完成。详见[录制回放](../../wikis/RecordCase)一篇。 @@ -21,9 +21,9 @@ Soloπ拥有录制操作的能力,用户只需要通过Soloπ执行用例步 ![性能工具](assets/performance.gif) -**[性能工具使用视频](videos/性能工具.mov)** +**[性能工具使用视频](https://gw.alipayobjects.com/os/basement_prod/1996390b-9ec8-4046-8ce8-459afa05d6c5.mov)** -**[响应耗时计算使用视频](videos/响应耗时计算.mov)** +**[响应耗时计算使用视频](https://gw.alipayobjects.com/os/basement_prod/4e82ca85-13fc-4de2-82ff-a9079344f5ef.mov)** Soloπ能够记录待测应用的各项指标,你可以在悬浮窗中观察实时更新的数据,也可以对性能数据进行录制,在录制结束后查看图表;同时,Soloπ还支持性能加压,能够对CPU、内存与网络环境进行限制,复现应用在性能较差、网络环境不佳场景下的表现。 @@ -33,7 +33,7 @@ Soloπ能够记录待测应用的各项指标,你可以在悬浮窗中观察 ![一机多控](assets/oneToMany.gif) -**[一机多控使用视频](videos/一机多控.mov)** +**[一机多控使用视频](https://gw.alipayobjects.com/os/basement_prod/971b5467-3db0-4781-86e3-15b3907323f6.mov)** Soloπ支持通过操作一台主机设备来控制多台从机设备,不需要在各个设备上分别进行重复冗杂的兼容性测试,能够极大提升兼容性测试的效率。详见[一机多控](../../wikis/OneToMany)一篇。 diff --git a/licenses/COPY.BSD2CLAUSE b/licenses/COPY.BSD2CLAUSE new file mode 100644 index 0000000..1e01141 --- /dev/null +++ b/licenses/COPY.BSD2CLAUSE @@ -0,0 +1,23 @@ +Copyright (c) 2015-2016, Atlassian Pty Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/app/build.gradle b/src/app/build.gradle index 965c8ad..44760c6 100644 --- a/src/app/build.gradle +++ b/src/app/build.gradle @@ -67,6 +67,7 @@ dependencies { implementation 'com.liulishuo.filedownloader:library:1.7.6' implementation 'com.hyman:flowlayout-lib:1.1.2' implementation 'com.yydcdut:sdlv:0.7.6' + implementation 'com.atlassian.commonmark:commonmark:0.13.0' implementation('com.theartofdev.edmodo:android-image-cropper:2.5.1') { exclude group: "com.android.support" diff --git a/src/app/src/main/assets/NOTICE.html b/src/app/src/main/assets/NOTICE.html index 1c0fe84..1229933 100644 --- a/src/app/src/main/assets/NOTICE.html +++ b/src/app/src/main/assets/NOTICE.html @@ -739,45 +739,45 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

greenDAO

https://github.com/greenrobot/greenDAO

Copyright (C) 2012-2017 Markus Junginger, greenrobot (http://greenrobot.org)

greenDAO binaries and source code can be used according to the Apache License, Version 2.0.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

QRCodeReaderView

https://github.com/dlazaro66/QRCodeReaderView

Copyright 2017 David Lázaro

Licensed under the Apache License, Version 2.0 (the "License"); +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

greenDAO

https://github.com/greenrobot/greenDAO

Copyright (C) 2012-2017 Markus Junginger, greenrobot (http://greenrobot.org)

greenDAO binaries and source code can be used according to the Apache License, Version 2.0.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

QRCodeReaderView

https://github.com/dlazaro66/QRCodeReaderView

Copyright 2017 David Lázaro

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

FileDownloader

https://github.com/lingochamp/FileDownloader

Copyright (c) 2015 LingoChamp Inc.

Licensed under the Apache License, Version 2.0 (the "License"); +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

FileDownloader

https://github.com/lingochamp/FileDownloader

Copyright (c) 2015 LingoChamp Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

glide

https://github.com/bumptech/glide

Dual licensed under either the terms of Simplified BSD License, or alternatively under the terms of The Apache Software License, Version 2.0

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause

common-io

http://commons.apache.org/proper/commons-io/

Copyright © 2003-2018 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License"); +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

glide

https://github.com/bumptech/glide

Dual licensed under either the terms of Simplified BSD License, or alternatively under the terms of The Apache Software License, Version 2.0

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause

common-io

http://commons.apache.org/proper/commons-io/

Copyright © 2003-2018 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

logger

https://github.com/orhanobut/logger

Copyright 2018 Orhan Obut

Licensed under the Apache License, Version 2.0 (the "License"); +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

commonmark-java

https://github.com/atlassian/commonmark-java

Copyright (c) 2015-2019 Atlassian and others.

BSD (2-clause) licensed, see LICENSE.txt file.

BSD (2-clause): https://opensource.org/licenses/BSD-2-Clause

logger

https://github.com/orhanobut/logger

Copyright 2018 Orhan Obut

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

SlideAndDragListView

https://github.com/yydcdut/SlideAndDragListView

Copyright 2015 yydcdut

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

FlowLayout

https://github.com/hongyangAndroid/FlowLayout

Copyright 2015 hongyangAndroid

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

Android-Image-Cropper

https://github.com/ArthurHub/Android-Image-Cropper

Originally forked from edmodo/cropper.

Copyright 2016, Arthur Teplitzki, 2013, Edmodo, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

cropper

https://github.com/edmodo/cropper

Copyright 2013, Edmodo, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

ScreenRecorder (Modified)

https://github.com/yrom/ScreenRecorder

Copyright (c) 2014 Yrom Wang http://www.yrom.net

Licensed under the Apache License, Version 2.0 (the "License"); +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

SlideAndDragListView

https://github.com/yydcdut/SlideAndDragListView

Copyright 2015 yydcdut

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

FlowLayout

https://github.com/hongyangAndroid/FlowLayout

Copyright 2015 hongyangAndroid

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

Android-Image-Cropper

https://github.com/ArthurHub/Android-Image-Cropper

Originally forked from edmodo/cropper.

Copyright 2016, Arthur Teplitzki, 2013, Edmodo, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

cropper

https://github.com/edmodo/cropper

Copyright 2013, Edmodo, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

ScreenRecorder (Modified)

https://github.com/yrom/ScreenRecorder

Copyright (c) 2014 Yrom Wang http://www.yrom.net

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

BrokenKeyDerivation

https://android.googlesource.com/platform/development/+/master/samples/BrokenKeyDerivation?autodive=0

Copyright (C) 2007 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License"); +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

BrokenKeyDerivation

https://android.googlesource.com/platform/development/+/master/samples/BrokenKeyDerivation?autodive=0

Copyright (C) 2007 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

OpenCV

https://opencv.org

By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software.

License Agreement +limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

OpenCV

https://opencv.org

By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software.

License Agreement For Open Source Computer Vision Library -(3-clause BSD License)

Copyright (C) 2000-2019, Intel Corporation, all rights reserved.Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.Copyright (C) 2015-2016, Itseez Inc., all rights reserved.Third party copyrights are property of their respective owners.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall copyright holders or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause

FFmpeg

https://ffmpeg.org

Copyright (C) 2016 Fabrice Bellard

This library is free software; you can redistribute it and/or +(3-clause BSD License)

Copyright (C) 2000-2019, Intel Corporation, all rights reserved.Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved.Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved.Copyright (C) 2015-2016, Itseez Inc., all rights reserved.Third party copyrights are property of their respective owners.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall copyright holders or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

BSD-3-Clause: https://opensource.org/licenses/BSD-3-Clause

FFmpeg

https://ffmpeg.org

Copyright (C) 2016 Fabrice Bellard

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, @@ -785,13 +785,13 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

LGPL 2.1: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html

Minicap

https://github.com/openstf/minicap

Copyright © 2013 CyberAgent, Inc. +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

LGPL 2.1: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html

Minicap

https://github.com/openstf/minicap

Copyright © 2013 CyberAgent, Inc. Copyright © 2016 The OpenSTF Project

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

部分SVG图片来源

https://www.iconfont.cn

+limitations under the License.

Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0

部分SVG图片来源

https://www.iconfont.cn

\ No newline at end of file diff --git a/src/app/src/main/java/com/alipay/hulu/activity/IndexActivity.java b/src/app/src/main/java/com/alipay/hulu/activity/IndexActivity.java index 8a3d6b8..c81ad6a 100644 --- a/src/app/src/main/java/com/alipay/hulu/activity/IndexActivity.java +++ b/src/app/src/main/java/com/alipay/hulu/activity/IndexActivity.java @@ -27,6 +27,8 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.webkit.WebSettings; +import android.webkit.WebView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; @@ -42,7 +44,7 @@ import com.alipay.hulu.common.service.SPService; import com.alipay.hulu.common.tools.BackgroundExecutor; import com.alipay.hulu.common.utils.ClassUtil; -import com.alipay.hulu.common.utils.DeviceInfoUtil; +import com.alipay.hulu.common.utils.ContextUtil; import com.alipay.hulu.common.utils.FileUtils; import com.alipay.hulu.common.utils.LogUtil; import com.alipay.hulu.common.utils.PermissionUtil; @@ -54,6 +56,10 @@ import com.alipay.hulu.util.UpgradeUtil; import com.alipay.hulu.util.ZipUtil; +import org.commonmark.node.Node; +import org.commonmark.parser.Parser; +import org.commonmark.renderer.html.HtmlRenderer; + import java.io.File; import java.io.FileFilter; import java.io.FilenameFilter; @@ -100,13 +106,39 @@ public void onNoUpdate() { @Override public void onNewUpdate(final GithubReleaseBean release) { + Parser parser = Parser.builder().build(); + Node document = parser.parse(release.getBody()); + + // text size 16dp + int px = ContextUtil.dip2px(IndexActivity.this, 16); + HtmlRenderer renderer = HtmlRenderer.builder().build(); + String css = "
"; + final String content = css + renderer.render(document) + ""; + runOnUiThread(new Runnable() { @Override public void run() { + WebView webView = new WebView(IndexActivity.this); + WebSettings webSettings = webView.getSettings(); + webSettings.setUseWideViewPort(true); + webSettings.setLoadWithOverviewMode(true); + webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); + webView.loadData(content, null, null); new AlertDialog.Builder(IndexActivity.this).setTitle("发现新版本: " + release.getTag_name()) - .setMessage(release.getBody()) + .setView(webView) .setPositiveButton("前往更新", new DialogInterface.OnClickListener() { - @Override + public void onClick(DialogInterface dialog, int which) { Uri uri = Uri.parse(release.getHtml_url()); Intent intent = new Intent(Intent.ACTION_VIEW, uri); diff --git a/src/app/src/main/java/com/alipay/hulu/fragment/ReplayListFragment.java b/src/app/src/main/java/com/alipay/hulu/fragment/ReplayListFragment.java index 03898bb..8751082 100644 --- a/src/app/src/main/java/com/alipay/hulu/fragment/ReplayListFragment.java +++ b/src/app/src/main/java/com/alipay/hulu/fragment/ReplayListFragment.java @@ -50,6 +50,7 @@ import com.alipay.hulu.common.utils.LogUtil; import com.alipay.hulu.common.utils.MiscUtil; import com.alipay.hulu.common.utils.PermissionUtil; +import com.alipay.hulu.common.utils.StringUtil; import com.alipay.hulu.replay.OperationStepProvider; import com.alipay.hulu.replay.RepeatStepProvider; import com.alipay.hulu.service.CaseReplayManager; @@ -250,20 +251,38 @@ private void editCase(int position) { private void deleteCase(final int position) { AlertDialog dialog = new AlertDialog.Builder(getContext(), R.style.SimpleDialogTheme) .setCancelable(false) - .setMessage("删除此用例?") - .setPositiveButton("确定", new DialogInterface.OnClickListener() { + .setMessage(R.string.replay__delete_case) + .setPositiveButton(R.string.constant__confirm, new DialogInterface.OnClickListener() { @Override - public void onClick(DialogInterface dialog, int which) { + public void onClick(final DialogInterface dialog, int which) { final RecordCaseInfo recordCaseInfo = (RecordCaseInfo) mAdapter.getItem(position); if (recordCaseInfo == null) { return; } - GreenDaoManager.getInstance().getRecordCaseInfoDao().deleteByKey(recordCaseInfo.getId()); - InjectorService.g().pushMessage(NewRecordActivity.NEED_REFRESH_LOCAL_CASES_LIST); - dialog.dismiss(); + // delete step file + BackgroundExecutor.execute(new Runnable() { + @Override + public void run() { + String operationLog = recordCaseInfo.getOperationLog(); + if (!StringUtil.isEmpty(operationLog)) { + GeneralOperationLogBean logBean = JSON.parseObject(operationLog, GeneralOperationLogBean.class); + if (logBean != null && !StringUtil.isEmpty(logBean.getStorePath())) { + File steps = new File(logBean.getStorePath()); + if (steps.exists()) { + FileUtils.deleteFile(steps); + } + } + } + GreenDaoManager.getInstance().getRecordCaseInfoDao().deleteByKey(recordCaseInfo.getId()); + InjectorService.g().pushMessage(NewRecordActivity.NEED_REFRESH_LOCAL_CASES_LIST); + + dialog.dismiss(); + } + }); + } - }).setNegativeButton("取消", new DialogInterface.OnClickListener() { + }).setNegativeButton(R.string.constant__cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); @@ -404,7 +423,7 @@ public void onPermissionResult(final boolean result, String reason) { private void initEmptyView(View view) { mEmptyView = view.findViewById(R.id.empty_view_container); mEmptyTextView = (TextView) view.findViewById(R.id.empty_text); - mEmptyTextView.setText("您还没有录制用例哦"); + mEmptyTextView.setText(R.string.record__no_local_case); } /** diff --git a/src/app/src/main/res/values/strings.xml b/src/app/src/main/res/values/strings.xml index 882b5c6..c5deee7 100644 --- a/src/app/src/main/res/values/strings.xml +++ b/src/app/src/main/res/values/strings.xml @@ -124,4 +124,5 @@ 用例名不能为空 录制回放 免责声明 + 删除此用例? diff --git a/src/common/src/main/java/com/alipay/hulu/common/tools/CmdTools.java b/src/common/src/main/java/com/alipay/hulu/common/tools/CmdTools.java index ceae41f..7e04d50 100644 --- a/src/common/src/main/java/com/alipay/hulu/common/tools/CmdTools.java +++ b/src/common/src/main/java/com/alipay/hulu/common/tools/CmdTools.java @@ -713,7 +713,7 @@ private static String execSafeCmd(String cmd, int retryCount) { if (ERROR_NO_CONNECTION.equals(result) || ERROR_CONNECTION_ILLEGAL_STATE.equals(result)) { generateConnection(); MiscUtil.sleep(2000); - } else if (ERROR_CONNECTION_COMMON_EXCEPTION.equals("result")) { + } else if (ERROR_CONNECTION_COMMON_EXCEPTION.equals(result)) { MiscUtil.sleep(2000); } else { break; diff --git "a/videos/\344\270\200\346\234\272\345\244\232\346\216\247.mov" "b/videos/\344\270\200\346\234\272\345\244\232\346\216\247.mov" deleted file mode 100644 index b94c9c9..0000000 Binary files "a/videos/\344\270\200\346\234\272\345\244\232\346\216\247.mov" and /dev/null differ diff --git "a/videos/\345\223\215\345\272\224\350\200\227\346\227\266\350\256\241\347\256\227.mov" "b/videos/\345\223\215\345\272\224\350\200\227\346\227\266\350\256\241\347\256\227.mov" deleted file mode 100644 index 3a6d60d..0000000 Binary files "a/videos/\345\223\215\345\272\224\350\200\227\346\227\266\350\256\241\347\256\227.mov" and /dev/null differ diff --git "a/videos/\345\236\203\345\234\276\351\202\256\344\273\266\345\244\204\347\220\206.mov" "b/videos/\345\236\203\345\234\276\351\202\256\344\273\266\345\244\204\347\220\206.mov" deleted file mode 100644 index 0f28377..0000000 Binary files "a/videos/\345\236\203\345\234\276\351\202\256\344\273\266\345\244\204\347\220\206.mov" and /dev/null differ diff --git "a/videos/\346\200\247\350\203\275\345\267\245\345\205\267.mov" "b/videos/\346\200\247\350\203\275\345\267\245\345\205\267.mov" deleted file mode 100644 index 11a984c..0000000 Binary files "a/videos/\346\200\247\350\203\275\345\267\245\345\205\267.mov" and /dev/null differ diff --git "a/videos/\346\270\270\346\210\217\350\207\252\345\212\250\345\214\226.mp4" "b/videos/\346\270\270\346\210\217\350\207\252\345\212\250\345\214\226.mp4" deleted file mode 100644 index f49bc50..0000000 Binary files "a/videos/\346\270\270\346\210\217\350\207\252\345\212\250\345\214\226.mp4" and /dev/null differ