├── .gitignore
├── .idea
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── encodings.xml
├── gradle.xml
├── markdown-navigator-enh.xml
├── markdown-navigator.xml
├── misc.xml
├── runConfigurations.xml
└── vcs.xml
├── JarSigner
├── .gitignore
├── .idea
│ ├── .gitignore
│ ├── codeStyles
│ │ └── Project.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── build.gradle
├── consumer-rules.pro
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── cn
│ │ └── janking
│ │ └── jarsigner
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ └── java
│ │ ├── com.sun.jarsigner
│ │ ├── ContentSigner.java
│ │ └── ContentSignerParameters.java
│ │ ├── compact
│ │ └── java
│ │ │ ├── lang
│ │ │ ├── InternalError.java
│ │ │ └── VirtualMachineError.java
│ │ │ ├── security
│ │ │ └── cert
│ │ │ │ └── Extension.java
│ │ │ └── util
│ │ │ └── Base64.java
│ │ ├── sun.security.tools.jarsigner
│ │ ├── Main.java
│ │ ├── Resources.java
│ │ ├── Resources_zh_CN.java
│ │ └── TimestampedSigner.java
│ │ └── sun
│ │ ├── misc
│ │ ├── CharacterEncoder.java
│ │ ├── HexDumpEncoder.java
│ │ ├── IOUtils.java
│ │ ├── JavaIOAccess.java
│ │ ├── SharedSecrets.java
│ │ ├── Unsafe.java
│ │ └── VM.java
│ │ ├── net
│ │ └── www
│ │ │ └── ParseUtil.java
│ │ ├── nio
│ │ └── cs
│ │ │ └── ThreadLocalCoders.java
│ │ ├── reflect
│ │ ├── CallerSensitive.java
│ │ └── Reflection.java
│ │ ├── security
│ │ ├── action
│ │ │ ├── GetBooleanAction.java
│ │ │ └── GetPropertyAction.java
│ │ ├── jca
│ │ │ ├── ProviderConfig.java
│ │ │ ├── ProviderList.java
│ │ │ ├── Providers.java
│ │ │ └── ServiceId.java
│ │ ├── pkcs
│ │ │ ├── ContentInfo.java
│ │ │ ├── PKCS7_1.java
│ │ │ ├── PKCS9Attribute.java
│ │ │ ├── PKCS9Attributes.java
│ │ │ ├── ParsingException.java
│ │ │ ├── SignerInfo.java
│ │ │ └── SigningCertificateInfo.java
│ │ ├── provider
│ │ │ ├── X509Factory.java
│ │ │ └── certpath
│ │ │ │ ├── X509CertPath.java
│ │ │ │ └── X509CertificatePair.java
│ │ ├── timestamp
│ │ │ ├── HttpTimestamper.java
│ │ │ ├── TSRequest.java
│ │ │ ├── TSResponse.java
│ │ │ ├── TimestampToken.java
│ │ │ └── Timestamper.java
│ │ ├── tools
│ │ │ ├── KeyStoreUtil.java
│ │ │ └── PathList.java
│ │ ├── util
│ │ │ ├── BitArray.java
│ │ │ ├── ByteArrayLexOrder.java
│ │ │ ├── ByteArrayTagOrder.java
│ │ │ ├── Cache.java
│ │ │ ├── CompactSignatureFileVerifier.java
│ │ │ ├── Debug.java
│ │ │ ├── DerEncoder.java
│ │ │ ├── DerIndefLenConverter.java
│ │ │ ├── DerInputBuffer.java
│ │ │ ├── DerInputStream.java
│ │ │ ├── DerOutputStream.java
│ │ │ ├── DerValue.java
│ │ │ ├── ManifestDigester.java
│ │ │ ├── ObjectIdentifier.java
│ │ │ ├── Password.java
│ │ │ └── PropertyExpander.java
│ │ └── x509
│ │ │ ├── AVA.java
│ │ │ ├── AccessDescription.java
│ │ │ ├── AlgorithmId.java
│ │ │ ├── AttributeNameEnumeration.java
│ │ │ ├── AuthorityInfoAccessExtension.java
│ │ │ ├── AuthorityKeyIdentifierExtension.java
│ │ │ ├── BasicConstraintsExtension.java
│ │ │ ├── CRLDistributionPointsExtension.java
│ │ │ ├── CRLExtensions.java
│ │ │ ├── CRLNumberExtension.java
│ │ │ ├── CRLReasonCodeExtension.java
│ │ │ ├── CertAttrSet.java
│ │ │ ├── CertificateAlgorithmId.java
│ │ │ ├── CertificateExtensions.java
│ │ │ ├── CertificateIssuerExtension.java
│ │ │ ├── CertificatePoliciesExtension.java
│ │ │ ├── CertificatePolicyId.java
│ │ │ ├── CertificatePolicyMap.java
│ │ │ ├── CertificateSerialNumber.java
│ │ │ ├── CertificateValidity.java
│ │ │ ├── CertificateVersion.java
│ │ │ ├── CertificateX509Key.java
│ │ │ ├── DNSName.java
│ │ │ ├── DeltaCRLIndicatorExtension.java
│ │ │ ├── DistributionPoint.java
│ │ │ ├── DistributionPointName.java
│ │ │ ├── EDIPartyName.java
│ │ │ ├── ExtendedKeyUsageExtension.java
│ │ │ ├── Extension.java
│ │ │ ├── FreshestCRLExtension.java
│ │ │ ├── GeneralName.java
│ │ │ ├── GeneralNameInterface.java
│ │ │ ├── GeneralNames.java
│ │ │ ├── GeneralSubtree.java
│ │ │ ├── GeneralSubtrees.java
│ │ │ ├── IPAddressName.java
│ │ │ ├── InhibitAnyPolicyExtension.java
│ │ │ ├── InvalidityDateExtension.java
│ │ │ ├── IssuerAlternativeNameExtension.java
│ │ │ ├── IssuingDistributionPointExtension.java
│ │ │ ├── KeyIdentifier.java
│ │ │ ├── KeyUsageExtension.java
│ │ │ ├── NameConstraintsExtension.java
│ │ │ ├── NetscapeCertTypeExtension.java
│ │ │ ├── OCSPNoCheckExtension.java
│ │ │ ├── OIDMap.java
│ │ │ ├── OIDName.java
│ │ │ ├── OtherName.java
│ │ │ ├── PKIXExtensions.java
│ │ │ ├── PolicyConstraintsExtension.java
│ │ │ ├── PolicyInformation.java
│ │ │ ├── PolicyMappingsExtension.java
│ │ │ ├── PrivateKeyUsageExtension.java
│ │ │ ├── RDN.java
│ │ │ ├── RFC822Name.java
│ │ │ ├── ReasonFlags.java
│ │ │ ├── SerialNumber.java
│ │ │ ├── SubjectAlternativeNameExtension.java
│ │ │ ├── SubjectInfoAccessExtension.java
│ │ │ ├── SubjectKeyIdentifierExtension.java
│ │ │ ├── URIName.java
│ │ │ ├── UniqueIdentity.java
│ │ │ ├── X400Address.java
│ │ │ ├── X500Name.java
│ │ │ ├── X509AttributeName.java
│ │ │ ├── X509CRLEntryImpl.java
│ │ │ ├── X509CRLImpl.java
│ │ │ ├── X509CertImpl.java
│ │ │ ├── X509CertInfo.java
│ │ │ └── X509Key.java
│ │ └── util
│ │ └── calendar
│ │ ├── AbstractCalendar.java
│ │ ├── BaseCalendar.java
│ │ ├── CalendarDate.java
│ │ ├── CalendarSystem.java
│ │ ├── CalendarUtils.java
│ │ ├── Era.java
│ │ ├── Gregorian.java
│ │ ├── ImmutableGregorianDate.java
│ │ ├── LocalGregorianCalendar.java
│ │ ├── ZoneInfo.java
│ │ └── ZoneInfoFile.java
│ └── test
│ └── java
│ └── cn
│ └── janking
│ └── jarsigner
│ └── ExampleUnitTest.java
├── README.assets
├── Screenshot_20200407-135626.jpg
├── Screenshot_20200407-135639.jpg
├── Screenshot_20200413-155923.jpg
└── Screenshot_20200413-155925.jpg
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
├── signing.gradle
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── janking
│ │ └── webDroid
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── assets
│ │ ├── key
│ │ │ └── webdroid.jks
│ │ └── template
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── config.json
│ │ │ ├── ic_demo_app.png
│ │ │ ├── ic_music.png
│ │ │ ├── ic_news.png
│ │ │ ├── ic_picture.png
│ │ │ └── ic_search.png
│ ├── java
│ │ └── cn
│ │ │ └── janking
│ │ │ └── webDroid
│ │ │ ├── MyApplication.kt
│ │ │ ├── activity
│ │ │ ├── BaseActivity.kt
│ │ │ ├── CreatorActivity.kt
│ │ │ └── WebDroidActivity.kt
│ │ │ ├── adapter
│ │ │ ├── BasicPagerAdapter.kt
│ │ │ ├── ItemTouchHelperCallback.kt
│ │ │ ├── OnMoveAndSwipedListener.kt
│ │ │ └── TabListRVAdapter.kt
│ │ │ ├── constant
│ │ │ ├── PathConstants.kt
│ │ │ ├── PermissionConstants.java
│ │ │ └── WebConstants.kt
│ │ │ ├── event
│ │ │ └── event.kt
│ │ │ ├── helper
│ │ │ ├── DialogHelper.kt
│ │ │ └── PermissionHelper.kt
│ │ │ ├── layout
│ │ │ ├── EditAppLayout.kt
│ │ │ ├── EditLayout.kt
│ │ │ └── EditTabLayout.kt
│ │ │ ├── model
│ │ │ └── Config.kt
│ │ │ ├── util
│ │ │ ├── ActivityUtils.java
│ │ │ ├── AdaptScreenUtils.java
│ │ │ ├── AppUtils.java
│ │ │ ├── BuildUtils.kt
│ │ │ ├── ColorUtils.java
│ │ │ ├── ConsoleUtils.kt
│ │ │ ├── DialogUtils.kt
│ │ │ ├── FileUtils.kt
│ │ │ ├── LogUtils.java
│ │ │ ├── OpenUtils.kt
│ │ │ ├── PermissionUtils.java
│ │ │ ├── RomUtils.java
│ │ │ ├── SPUtils.java
│ │ │ ├── ScreenUtils.java
│ │ │ ├── ShellUtils.java
│ │ │ ├── SpanUtils.java
│ │ │ ├── ThreadUtils.java
│ │ │ ├── ThrowableUtils.java
│ │ │ ├── UriUtils.java
│ │ │ ├── Utils.java
│ │ │ ├── WebUtils.kt
│ │ │ └── ZipUtils.java
│ │ │ └── web
│ │ │ ├── FilePathChooserCallback.kt
│ │ │ ├── WebBox.kt
│ │ │ ├── WebConfig.kt
│ │ │ ├── WebFragment.kt
│ │ │ ├── WebVideoPlayer.kt
│ │ │ ├── extend
│ │ │ ├── WebChromeClientExtend.kt
│ │ │ ├── WebDownloadExtend.kt
│ │ │ ├── WebViewClientExtend.kt
│ │ │ ├── WebViewLongClickExtend.kt
│ │ │ └── WebViewSettingExtend.kt
│ │ │ ├── lifecycle
│ │ │ ├── WebLifeCycle.java
│ │ │ └── WebLifeCycleImpl.kt
│ │ │ └── view
│ │ │ ├── LollipopFixedWebView.kt
│ │ │ └── NestedScrollWebView.kt
│ └── res
│ │ ├── anim
│ │ └── anim_recycler_item_show.xml
│ │ ├── drawable
│ │ ├── ic_add_primary.xml
│ │ ├── ic_close_white_24dp.xml
│ │ ├── ic_info_outline_black_24dp.xml
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_default.png
│ │ ├── ic_search.png
│ │ ├── ic_settings_black_24dp.xml
│ │ ├── ic_tab_0.png
│ │ ├── ic_tab_1.png
│ │ ├── ic_tab_2.png
│ │ ├── ic_tab_3.png
│ │ ├── ic_tab_4.png
│ │ ├── ic_tab_default.png
│ │ ├── image_avatar_default.png
│ │ └── img_author_avatar.jpg
│ │ ├── layout
│ │ ├── activity_creator.xml
│ │ ├── activity_webdroid.xml
│ │ ├── item_tab_list.xml
│ │ ├── layout_edit_app.xml
│ │ ├── layout_edit_tab.xml
│ │ ├── layout_image_dialog_fullscreen.xml
│ │ ├── layout_nav.xml
│ │ ├── layout_nav_header.xml
│ │ ├── layout_text_dialog_fullscreen.xml
│ │ └── layout_webview.xml
│ │ ├── menu
│ │ ├── drawer_main.xml
│ │ ├── menu_bottom.xml
│ │ ├── menu_creator.xml
│ │ └── menu_webdroid.xml
│ │ ├── values
│ │ ├── arrays.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── util_code_provider_paths.xml
│ └── test
│ └── java
│ └── com
│ └── janking
│ └── webDroid
│ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── janking.jks
├── settings.gradle
└── xmlparser
├── .gitignore
├── build.gradle
├── consumer-rules.pro
├── proguard-rules.pro
└── src
├── androidTest
└── java
│ └── luyao
│ └── parser
│ └── ExampleInstrumentedTest.java
├── main
├── AndroidManifest.xml
└── java
│ ├── cn
│ └── janking
│ │ └── AXMLTool
│ │ ├── XmlProcessor.java
│ │ └── util
│ │ ├── ByteUtils.java
│ │ └── ManifestUtils.java
│ └── luyao
│ └── parser
│ └── parser
│ ├── utils
│ ├── BytesReader.java
│ ├── Reader.java
│ ├── TransformUtils.java
│ └── Utils.java
│ └── xml
│ ├── XmlParser.java
│ └── bean
│ ├── Attribute.java
│ ├── NameSpace.java
│ ├── Xml.java
│ └── chunk
│ ├── Chunk.java
│ ├── EndNameSpaceChunk.java
│ ├── EndTagChunk.java
│ ├── StartNameSpaceChunk.java
│ └── StartTagChunk.java
└── test
└── java
└── luyao
└── parser
└── ExampleUnitTest.java
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
9 |
11 | InternalError with no detail message.
40 | */
41 | public InternalError() {
42 | super();
43 | }
44 |
45 | /**
46 | * Constructs an InternalError with the specified
47 | * detail message.
48 | *
49 | * @param message the detail message.
50 | */
51 | public InternalError(String message) {
52 | super(message);
53 | }
54 |
55 |
56 | /**
57 | * Constructs an {@code InternalError} with the specified detail
58 | * message and cause.
Note that the detail message associated
59 | * with {@code cause} is not automatically incorporated in
60 | * this error's detail message.
61 | *
62 | * @param message the detail message (which is saved for later retrieval
63 | * by the {@link #getMessage()} method).
64 | * @param cause the cause (which is saved for later retrieval by the
65 | * {@link #getCause()} method). (A {@code null} value is
66 | * permitted, and indicates that the cause is nonexistent or
67 | * unknown.)
68 | * @since 1.8
69 | */
70 | public InternalError(String message, Throwable cause) {
71 | super(message, cause);
72 | }
73 |
74 | /**
75 | * Constructs an {@code InternalError} with the specified cause
76 | * and a detail message of {@code (cause==null ? null :
77 | * cause.toString())} (which typically contains the class and
78 | * detail message of {@code cause}).
79 | *
80 | * @param cause the cause (which is saved for later retrieval by the
81 | * {@link #getCause()} method). (A {@code null} value is
82 | * permitted, and indicates that the cause is nonexistent or
83 | * unknown.)
84 | * @since 1.8
85 | */
86 | public InternalError(Throwable cause) {
87 | super(cause);
88 | }
89 |
90 | }
91 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/compact/java/lang/VirtualMachineError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package compact.java.lang;
27 |
28 | /**
29 | * Thrown to indicate that the Java Virtual Machine is broken or has
30 | * run out of resources necessary for it to continue operating.
31 | *
32 | *
33 | * @author Frank Yellin
34 | * @since JDK1.0
35 | */
36 | abstract public class VirtualMachineError extends Error {
37 | private static final long serialVersionUID = 4161983926571568670L;
38 |
39 | /**
40 | * Constructs a VirtualMachineError with no detail message.
41 | */
42 | public VirtualMachineError() {
43 | super();
44 | }
45 |
46 | /**
47 | * Constructs a VirtualMachineError with the specified
48 | * detail message.
49 | *
50 | * @param message the detail message.
51 | */
52 | public VirtualMachineError(String message) {
53 | super(message);
54 | }
55 |
56 | /**
57 | * Constructs a {@code VirtualMachineError} with the specified
58 | * detail message and cause.
Note that the detail message 59 | * associated with {@code cause} is not automatically 60 | * incorporated in this error's detail message. 61 | * 62 | * @param message the detail message (which is saved for later retrieval 63 | * by the {@link #getMessage()} method). 64 | * @param cause the cause (which is saved for later retrieval by the 65 | * {@link #getCause()} method). (A {@code null} value is 66 | * permitted, and indicates that the cause is nonexistent or 67 | * unknown.) 68 | * @since 1.8 69 | */ 70 | public VirtualMachineError(String message, Throwable cause) { 71 | super(message, cause); 72 | } 73 | 74 | /** 75 | * Constructs an a {@code VirtualMachineError} with the specified 76 | * cause and a detail message of {@code (cause==null ? null : 77 | * cause.toString())} (which typically contains the class and 78 | * detail message of {@code cause}). 79 | * 80 | * @param cause the cause (which is saved for later retrieval by the 81 | * {@link #getCause()} method). (A {@code null} value is 82 | * permitted, and indicates that the cause is nonexistent or 83 | * unknown.) 84 | * @since 1.8 85 | */ 86 | public VirtualMachineError(Throwable cause) { 87 | super(cause); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /JarSigner/src/main/java/compact/java/security/cert/Extension.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | package compact.java.security.cert; 27 | 28 | import java.io.IOException; 29 | import java.io.OutputStream; 30 | 31 | /** 32 | * This interface represents an X.509 extension. 33 | * 34 | *
35 | * Extensions provide a means of associating additional attributes with users 36 | * or public keys and for managing a certification hierarchy. The extension 37 | * format also allows communities to define private extensions to carry 38 | * information unique to those communities. 39 | * 40 | *
41 | * Each extension contains an object identifier, a criticality setting 42 | * indicating whether it is a critical or a non-critical extension, and 43 | * and an ASN.1 DER-encoded value. Its ASN.1 definition is: 44 | * 45 | *
46 | *
47 | * Extension ::= SEQUENCE {
48 | * extnId OBJECT IDENTIFIER,
49 | * critical BOOLEAN DEFAULT FALSE,
50 | * extnValue OCTET STRING
51 | * -- contains a DER encoding of a value
52 | * -- of the type registered for use with
53 | * -- the extnId object identifier value
54 | * }
55 | *
56 | *
57 | *
58 | *
59 | * This interface is designed to provide access to a single extension,
60 | * unlike {@link java.security.cert.X509Extension} which is more suitable
61 | * for accessing a set of extensions.
62 | *
63 | * @since 1.7
64 | */
65 | public interface Extension {
66 |
67 | /**
68 | * Gets the extensions's object identifier.
69 | *
70 | * @return the object identifier as a String
71 | */
72 | String getId();
73 |
74 | /**
75 | * Gets the extension's criticality setting.
76 | *
77 | * @return true if this is a critical extension.
78 | */
79 | boolean isCritical();
80 |
81 | /**
82 | * Gets the extensions's DER-encoded value. Note, this is the bytes
83 | * that are encoded as an OCTET STRING. It does not include the OCTET
84 | * STRING tag and length.
85 | *
86 | * @return a copy of the extension's value, or {@code null} if no
87 | * extension value is present.
88 | */
89 | byte[] getValue();
90 |
91 | /**
92 | * Generates the extension's DER encoding and writes it to the output
93 | * stream.
94 | *
95 | * @param out the output stream
96 | * @exception IOException on encoding or output error.
97 | * @exception NullPointerException if {@code out} is {@code null}.
98 | */
99 | void encode(OutputStream out) throws IOException;
100 | }
101 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/misc/IOUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | /**
27 | * IOUtils: A collection of IO-related public static methods.
28 | */
29 |
30 | package sun.misc;
31 |
32 | import java.io.EOFException;
33 | import java.io.IOException;
34 | import java.io.InputStream;
35 | import java.util.Arrays;
36 |
37 | public class IOUtils {
38 |
39 | /**
40 | * Read up to length of bytes from in
41 | * until EOF is detected.
42 | * @param in input stream, must not be null
43 | * @param length number of bytes to read, -1 or Integer.MAX_VALUE means
44 | * read as much as possible
45 | * @param readAll if true, an EOFException will be thrown if not enough
46 | * bytes are read. Ignored when length is -1 or Integer.MAX_VALUE
47 | * @return bytes read
48 | * @throws IOException Any IO error or a premature EOF is detected
49 | */
50 | public static byte[] readFully(InputStream is, int length, boolean readAll)
51 | throws IOException {
52 | byte[] output = {};
53 | if (length == -1) length = Integer.MAX_VALUE;
54 | int pos = 0;
55 | while (pos < length) {
56 | int bytesToRead;
57 | if (pos >= output.length) { // Only expand when there's no room
58 | bytesToRead = Math.min(length - pos, output.length + 1024);
59 | if (output.length < pos + bytesToRead) {
60 | output = Arrays.copyOf(output, pos + bytesToRead);
61 | }
62 | } else {
63 | bytesToRead = output.length - pos;
64 | }
65 | int cc = is.read(output, pos, bytesToRead);
66 | if (cc < 0) {
67 | if (readAll && length != Integer.MAX_VALUE) {
68 | throw new EOFException("Detect premature EOF");
69 | } else {
70 | if (output.length != pos) {
71 | output = Arrays.copyOf(output, pos);
72 | }
73 | break;
74 | }
75 | }
76 | pos += cc;
77 | }
78 | return output;
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/misc/JavaIOAccess.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.misc;
27 | import java.io.Console;
28 | import java.nio.charset.Charset;
29 |
30 | public interface JavaIOAccess {
31 | public Console console();
32 | public Charset charset();
33 | }
34 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/misc/SharedSecrets.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.misc;
27 |
28 | import java.io.Console;
29 |
30 | /** A repository of "shared secrets", which are a mechanism for
31 | calling implementation-private methods in another package without
32 | using reflection. A package-private class implements a public
33 | interface and provides the ability to call package-private methods
34 | within that package; the object implementing that interface is
35 | provided through a third package to which access is restricted.
36 | This framework avoids the primary disadvantage of using reflection
37 | for this purpose, namely the loss of compile-time checking. */
38 |
39 | public class SharedSecrets {
40 | private static final Unsafe unsafe = Unsafe.getUnsafe();
41 | private static JavaIOAccess javaIOAccess;
42 |
43 |
44 | public static JavaIOAccess getJavaIOAccess() {
45 | if (javaIOAccess == null) {
46 | unsafe.ensureClassInitialized(Console.class);
47 | }
48 | return javaIOAccess;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/reflect/CallerSensitive.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.reflect;
27 |
28 | import java.lang.annotation.Retention;
29 | import java.lang.annotation.RetentionPolicy;
30 | import java.lang.annotation.Target;
31 |
32 | import static java.lang.annotation.ElementType.METHOD;
33 |
34 | /**
35 | * A method annotated @CallerSensitive is sensitive to its calling class,
36 | * via {@link sun.reflect.Reflection#getCallerClass Reflection.getCallerClass},
37 | * or via some equivalent.
38 | *
39 | * @author John R. Rose
40 | */
41 | @Retention(RetentionPolicy.RUNTIME)
42 | @Target({METHOD})
43 | public @interface CallerSensitive {
44 | }
45 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/security/action/GetBooleanAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.security.action;
27 |
28 | /**
29 | * A convenience class for retrieving the boolean value of a system property
30 | * as a privileged action.
31 | *
32 | *
An instance of this class can be used as the argument of
33 | * AccessController.doPrivileged.
34 | *
35 | *
The following code retrieves the boolean value of the system
36 | * property named "prop" as a privileged action:
37 | * 38 | *
39 | * boolean b = java.security.AccessController.doPrivileged
40 | * (new GetBooleanAction("prop")).booleanValue();
41 | *
42 | *
43 | * @author Roland Schemers
44 | * @see java.security.PrivilegedAction
45 | * @see java.security.AccessController
46 | * @since 1.2
47 | */
48 |
49 | public class GetBooleanAction
50 | implements java.security.PrivilegedActionBoolean value of the system property.
68 | */
69 | public Boolean run() {
70 | return Boolean.getBoolean(theProp);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/security/action/GetPropertyAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.security.action;
27 |
28 | /**
29 | * A convenience class for retrieving the string value of a system
30 | * property as a privileged action.
31 | *
32 | * An instance of this class can be used as the argument of
33 | * AccessController.doPrivileged.
34 | *
35 | *
The following code retrieves the value of the system
36 | * property named "prop" as a privileged action:
37 | * 38 | *
39 | * String s = java.security.AccessController.doPrivileged
40 | * (new GetPropertyAction("prop"));
41 | *
42 | *
43 | * @author Roland Schemers
44 | * @see java.security.PrivilegedAction
45 | * @see java.security.AccessController
46 | * @since 1.2
47 | */
48 |
49 | public class GetPropertyAction
50 | implements java.security.PrivilegedActionClassCastException
51 | * if either argument is not a byte array.
52 | */
53 | public final int compare( byte[] bytes1, byte[] bytes2) {
54 | int diff;
55 | for (int i = 0; i < bytes1.length && i < bytes2.length; i++) {
56 | diff = (bytes1[i] & 0xFF) - (bytes2[i] & 0xFF);
57 | if (diff != 0) {
58 | return diff;
59 | }
60 | }
61 | // if array entries are equal till the first ends, then the
62 | // longer is "bigger"
63 | return bytes1.length - bytes2.length;
64 | }
65 |
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/security/util/ByteArrayTagOrder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 |
27 | /**
28 | * ByteArrayTagOrder: a class for comparing two DER encodings by the
29 | * order of their tags.
30 | *
31 | * @author D. N. Hoover
32 | */
33 |
34 | package sun.security.util;
35 |
36 | import java.util.Comparator;
37 |
38 | public class ByteArrayTagOrder implements ComparatorClassCastException
51 | * if either argument is not a byte array.
52 | */
53 |
54 | public final int compare(byte[] bytes1, byte[] bytes2) {
55 | // tag order is same as byte order ignoring any difference in
56 | // the constructivity bit (0x02)
57 | return (bytes1[0] | 0x20) - (bytes2[0] | 0x20);
58 | }
59 |
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/security/util/DerEncoder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1997, 1999, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.security.util;
27 |
28 | import java.io.IOException;
29 | import java.io.OutputStream;
30 |
31 | /**
32 | * Interface to an object that knows how to write its own DER
33 | * encoding to an output stream.
34 | *
35 | * @author D. N. Hoover
36 | */
37 | public interface DerEncoder {
38 |
39 | /**
40 | * DER encode this object and write the results to a stream.
41 | *
42 | * @param out the stream on which the DER encoding is written.
43 | */
44 | public void derEncode(OutputStream out)
45 | throws IOException;
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/JarSigner/src/main/java/sun/security/x509/AttributeNameEnumeration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 | *
5 | * This code is free software; you can redistribute it and/or modify it
6 | * under the terms of the GNU General Public License version 2 only, as
7 | * published by the Free Software Foundation. Oracle designates this
8 | * particular file as subject to the "Classpath" exception as provided
9 | * by Oracle in the LICENSE file that accompanied this code.
10 | *
11 | * This code is distributed in the hope that it will be useful, but WITHOUT
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 | * version 2 for more details (a copy is included in the LICENSE file that
15 | * accompanied this code).
16 | *
17 | * You should have received a copy of the GNU General Public License version
18 | * 2 along with this work; if not, write to the Free Software Foundation,
19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 | *
21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 | * or visit www.oracle.com if you need additional information or have any
23 | * questions.
24 | */
25 |
26 | package sun.security.x509;
27 |
28 | import java.util.Vector;
29 |
30 | /**
31 | * This class provides the Enumeration implementation used
32 | * by all the X509 certificate attributes to return the attribute
33 | * names contained within them.
34 | *
35 | * @author Amit Kapoor
36 | * @author Hemma Prafullchandra
37 | */
38 | public class AttributeNameEnumeration extends Vector
36 | * The extension identifies how delta CRL information for a
37 | * complete CRL is obtained.
38 | *
39 | *
40 | * The extension is defined in Section 5.2.6 of
41 | * Internet X.509 PKI Certific
42 | ate and Certificate Revocation List (CRL) Profile.
43 | *
44 | *
45 | * Its ASN.1 definition is as follows:
46 | *
47 | * id-ce-freshestCRL OBJECT IDENTIFIER ::= { id-ce 46 }
48 | *
49 | * FreshestCRL ::= CRLDistributionPoints
50 | *
51 | *
52 | * @since 1.6
53 | */
54 | public class FreshestCRLExtension extends CRLDistributionPointsExtension {
55 |
56 | /**
57 | * Attribute name.
58 | */
59 | public static final String NAME = "FreshestCRL";
60 |
61 | /**
62 | * Creates a freshest CRL extension.
63 | * The criticality is set to false.
64 | *
65 | * @param distributionPoints the list of delta CRL distribution points.
66 | */
67 | public FreshestCRLExtension(List


7 |
8 | ### 注意
9 |
10 | * 下载[RELEASE安装包](https://github.com/JankingWon/WebDroid/releases)直接安装或导入工程使用
11 | * **本应用**支持 Android7.0 至 Android9.0 使用
12 | * **生成的应用**支持 Android5.0 至 Android10.0使用
13 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | def signingFilePath = 'signing.gradle'
8 | def performSigning = file(signingFilePath).exists()
9 | if (performSigning) {
10 | apply from: signingFilePath
11 | }
12 |
13 | android {
14 | compileSdkVersion 28
15 | buildToolsVersion "28.0.3"
16 | defaultConfig {
17 | minSdkVersion 21
18 | targetSdkVersion 28
19 | versionCode 1
20 | versionName "1.0"
21 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
22 | }
23 | if (performSigning) {
24 | signingConfigs {
25 | release {
26 | storeFile file(project.signing.storeFilePath)
27 | storePassword project.signing.storePassword
28 | keyAlias project.signing.keyAlias
29 | keyPassword project.signing.keyPassword
30 | v1SigningEnabled true
31 | v2SigningEnabled true
32 | }
33 | }
34 | }
35 | buildTypes {
36 | release {
37 | minifyEnabled false
38 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
39 | if (performSigning) {
40 | signingConfig signingConfigs.release
41 | }
42 | }
43 | }
44 | compileOptions {
45 | targetCompatibility 1.8
46 | sourceCompatibility 1.8
47 | }
48 |
49 | }
50 |
51 | tasks.withType(JavaCompile) {
52 | options.encoding = "UTF-8"
53 | }
54 |
55 | dependencies {
56 | implementation project(path: ':xmlparser')
57 | implementation project(path: ':jarsigner')
58 | //MaterialDesign
59 | implementation 'com.google.android.material:material:1.2.0-alpha05'
60 | //EventBus
61 | implementation 'org.greenrobot:eventbus:3.2.0'
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | // compact
64 | implementation 'androidx.appcompat:appcompat:1.1.0'
65 | implementation 'androidx.core:core-ktx:1.2.0'
66 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
67 | //Gson
68 | implementation 'com.google.code.gson:gson:2.8.6'
69 | //Glide
70 | implementation 'com.github.bumptech.glide:glide:4.11.0'
71 | //Downloader
72 | implementation 'com.download.library:Downloader:4.1.3'
73 | annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
74 | testImplementation 'junit:junit:4.12'
75 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
76 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
77 | }
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/signing.gradle:
--------------------------------------------------------------------------------
1 | ext.signing = [
2 | storeFilePath : '../janking.jks',
3 | storePassword : '123456',
4 | keyAlias : 'janking',
5 | keyPassword :'123456',
6 | ]
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/janking/webDroid/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package cn.janking.webDroid
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("cn.janking.webDroid", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 | * author: Blankj
12 | * blog : http://blankj.com
13 | * time : 2019/02/12
14 | * desc : utils about exception
15 | *
16 | */
17 | public class ThrowableUtils {
18 |
19 | private static final String LINE_SEP = System.getProperty("line.separator");
20 |
21 | private ThrowableUtils() {
22 | throw new UnsupportedOperationException("u can't instantiate me...");
23 | }
24 |
25 | public static String getFullStackTrace(Throwable throwable) {
26 | final List