diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 4f16f68..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,22 +0,0 @@
-/bin
-/gen
-/library/bin
-/library/gen
-/library/.project
-/library/.classpath
-local.properties
-.DS_Store
-
-# generated files
-bin/
-gen/
-build/
-
-# Intellij project files
-*.iml
-*.ipr
-*.iws
-.idea/
-.gradle/
-
-library/gradle.properties
diff --git a/LICENSE-GPL b/LICENSE-GPL
deleted file mode 100644
index 8df7762..0000000
--- a/LICENSE-GPL
+++ /dev/null
@@ -1,279 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
diff --git a/LICENSE-MIT b/LICENSE-MIT
deleted file mode 100644
index 63ecc8b..0000000
--- a/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 Automattic Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
index 7a4b02d..3017a23 100644
--- a/README.md
+++ b/README.md
@@ -1,70 +1,25 @@
-* * *
+# Android-PasscodeLock Development Repository
-**Not Maintained!**
-*This project is no longer being actively maintained. Use at your own risk!*
+Development and release artifacts are published in this repository.
-* * *
+## Example usage in Android Studio
-# App passcode library for Android
+Add the development repository to the `repositories` section of your `build.gradle`.
-An app passcode protection implementation, which allows user to protect the app with a four digit code.
-
-Once enabled a four-digit passcode needs to be entered any time your mobile app is launched. This way your app is safe even if your smartphone or tablet falls into the wrong hands.
-
-**Note: This library doesn't add any extra protection to your data. App data will not be encrypted, the library just adds a pin lock screen that makes the app safe even if your kids put their hands on the device :)**
-
-## Example Usage
-
-Add it as a maven dependency in your build.gradle file. PasscodeLock is hosted on the maven central repository.
-
-* In your build.gradle:
```groovy
-dependencies {
- // use the latest 1.x version
- compile 'org.wordpress:passcodelock:1.+'
+// add the repo to your
+repositories {
+ mavenCentral()
+ maven { url "http://wordpress-mobile.github.io/android-passcodelock"}
}
```
-* Edit your `AndroidManifest.xml` and declare the following activities:
-```xml
-
-
-
-
-```
-
-* Add the following line in `onCreate` of your App file:
-```java
-AppLockManager.getInstance().enableDefaultAppLockIfAvailable(this);
-```
-
-* In your project you need to use `PasscodePreferenceFragment` in your Preference Activity. See [SettingsActivity][2] as a usage reference. Optionally, you may pass an argument that tells it whether or not to inflate its own preferences, this is only needed if you plan on [providing the preferences](https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/res/xml/settings.xml#L39) via [PasscodePreferenceFragment#setPreferences](https://github.com/wordpress-mobile/PasscodeLock-Android/blob/develop/library/src/org/wordpress/passcodelock/PasscodePreferenceFragment.java#L50).
-## Customization
+Add the dependency to the `dependencies` section of your `build.gradle`.
-If you want to customize the pinlock icon, the one available in the unlock screen, override the `passcode_logo.xml` drawable resource.
-
-## Hack the library
-
-* Copy `gradle.properties-example` to `gradle.properties` in the `library/` directory of the project.
-
-Publish it to bintray:
-
-```shell
-$ ./gradlew assemble publishToMavenLocal bintrayUpload -PbintrayUser=FIXME -PbintrayKey=FIXME -PdryRun=false
```
+// add the dependency
+dependencies {
+ compile 'org.wordpress:android-passcodelock:0.0.1'
+}
-## Apps that use this library
-- [WordPress for Android][1]
-
-## License
-Dual licensed under MIT, and GPL.
-
-[1]: https://github.com/wordpress-mobile/WordPress-Android
-
-[2]: https://github.com/wordpress-mobile/WordPress-Android/blob/develop/WordPress/src/main/java/org/wordpress/android/ui/prefs/SettingsActivity.java
+```
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index 930a0cd..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-repositories {
- google()
-}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 5838598..0000000
Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 91f21f2..0000000
--- a/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Mon Jul 22 9:08:50 MDT 2019
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
diff --git a/gradlew b/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..e69de29
diff --git a/library/.classpath b/library/.classpath
deleted file mode 100644
index 5176974..0000000
--- a/library/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/library/.project b/library/.project
deleted file mode 100644
index 8c1ab26..0000000
--- a/library/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
- library
-
-
-
-
-
- com.android.ide.eclipse.adt.ResourceManagerBuilder
-
-
-
-
- com.android.ide.eclipse.adt.PreCompilerBuilder
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- com.android.ide.eclipse.adt.ApkBuilder
-
-
-
-
-
- com.android.ide.eclipse.adt.AndroidNature
- org.eclipse.jdt.core.javanature
-
-
diff --git a/library/AndroidManifest.xml b/library/AndroidManifest.xml
deleted file mode 100644
index 5653b17..0000000
--- a/library/AndroidManifest.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/library/build.gradle b/library/build.gradle
deleted file mode 100644
index 68bfe1c..0000000
--- a/library/build.gradle
+++ /dev/null
@@ -1,73 +0,0 @@
-buildscript {
- dependencies {
- classpath 'com.android.tools.build:gradle:3.4.2'
- classpath 'com.novoda:bintray-release:0.9.1'
- }
-
- repositories {
- google()
- jcenter()
- maven { url 'https://maven.google.com' }
- }
-}
-
-apply plugin: 'com.android.library'
-apply plugin: 'maven'
-apply plugin: 'com.novoda.bintray-release'
-
-repositories {
- google()
- jcenter()
- maven { url 'https://maven.google.com' }
-}
-
-dependencies {
- implementation 'androidx.appcompat:appcompat:1.0.2'
- implementation 'androidx.preference:preference:1.0.0'
-}
-
-android {
- publishNonDefault true
- compileSdkVersion 28
- buildToolsVersion "28.0.3"
-
- defaultConfig {
- minSdkVersion 14
- targetSdkVersion 28
- versionCode 4
- versionName "2.0.2"
- }
-
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = ['src']
- resources.srcDirs = ['src']
- aidl.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- }
- }
-}
-
-android.buildTypes.all { buildType ->
- project.properties.any { property ->
- if (property.key.toLowerCase().startsWith("passcodelock.")) {
- buildType.buildConfigField "String", property.key.replace("passcodelock.", "").replace(".", "_").toUpperCase(), "\"${property.value}\""
- }
- }
-}
-
-publish {
- userOrg = 'wordpress-mobile'
- groupId = 'org.wordpress'
- uploadName = 'passcodelock'
- artifactId = 'passcodelock'
- desc = 'Android library that provides passcode lock to your app'
- publishVersion = android.defaultConfig.versionName
- licences = ['MIT', 'GPL-2.0']
- website = 'https://github.com/wordpress-mobile/PasscodeLock-Android'
- dryRun = 'false'
- autoPublish = 'true'
-}
diff --git a/library/gradle.properties-example b/library/gradle.properties-example
deleted file mode 100644
index 4b0a238..0000000
--- a/library/gradle.properties-example
+++ /dev/null
@@ -1,13 +0,0 @@
-android.enableJetifier=true
-android.useAndroidX=true
-
-passcodelock.password_preference_key=passcode_lock_prefs_password_key
-passcodelock.password_enc_secret=5-maggio-2002-Karel-Poborsky
-passcodelock.fingerprint_enabled_key=passcode_lock_prefs_fingerprint_enabled_key
-
-ossrhUsername=hello
-ossrhPassword=world
-
-signing.keyId=byebye
-signing.password=secret
-signing.secretKeyRingFile=/home/user/secret.gpg
diff --git a/library/lint.xml b/library/lint.xml
deleted file mode 100644
index ee0eead..0000000
--- a/library/lint.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/library/project.properties b/library/project.properties
deleted file mode 100644
index 484dab0..0000000
--- a/library/project.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-17
-android.library=true
diff --git a/library/res/anim/cycle_5.xml b/library/res/anim/cycle_5.xml
deleted file mode 100644
index 4dfe175..0000000
--- a/library/res/anim/cycle_5.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
diff --git a/library/res/anim/do_nothing.xml b/library/res/anim/do_nothing.xml
deleted file mode 100644
index 4c8f1d9..0000000
--- a/library/res/anim/do_nothing.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
diff --git a/library/res/anim/shake.xml b/library/res/anim/shake.xml
deleted file mode 100644
index 628940f..0000000
--- a/library/res/anim/shake.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
diff --git a/library/res/anim/slide_up.xml b/library/res/anim/slide_up.xml
deleted file mode 100644
index 7c6821e..0000000
--- a/library/res/anim/slide_up.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
diff --git a/library/res/drawable-hdpi/ic_backspace_white_24dp.png b/library/res/drawable-hdpi/ic_backspace_white_24dp.png
deleted file mode 100755
index fac63ff..0000000
Binary files a/library/res/drawable-hdpi/ic_backspace_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-hdpi/ic_fingerprint_white_24dp.png b/library/res/drawable-hdpi/ic_fingerprint_white_24dp.png
deleted file mode 100755
index 384d4eb..0000000
Binary files a/library/res/drawable-hdpi/ic_fingerprint_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-mdpi/ic_backspace_white_24dp.png b/library/res/drawable-mdpi/ic_backspace_white_24dp.png
deleted file mode 100755
index 7baee21..0000000
Binary files a/library/res/drawable-mdpi/ic_backspace_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-mdpi/ic_fingerprint_white_24dp.png b/library/res/drawable-mdpi/ic_fingerprint_white_24dp.png
deleted file mode 100755
index c583b22..0000000
Binary files a/library/res/drawable-mdpi/ic_fingerprint_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-xhdpi/ic_backspace_white_24dp.png b/library/res/drawable-xhdpi/ic_backspace_white_24dp.png
deleted file mode 100755
index b54dc1a..0000000
Binary files a/library/res/drawable-xhdpi/ic_backspace_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-xhdpi/ic_fingerprint_white_24dp.png b/library/res/drawable-xhdpi/ic_fingerprint_white_24dp.png
deleted file mode 100755
index ae36f69..0000000
Binary files a/library/res/drawable-xhdpi/ic_fingerprint_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-xxhdpi/ic_backspace_white_24dp.png b/library/res/drawable-xxhdpi/ic_backspace_white_24dp.png
deleted file mode 100755
index 7414d81..0000000
Binary files a/library/res/drawable-xxhdpi/ic_backspace_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-xxhdpi/ic_fingerprint_white_24dp.png b/library/res/drawable-xxhdpi/ic_fingerprint_white_24dp.png
deleted file mode 100755
index d95e95f..0000000
Binary files a/library/res/drawable-xxhdpi/ic_fingerprint_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-xxxhdpi/ic_backspace_white_24dp.png b/library/res/drawable-xxxhdpi/ic_backspace_white_24dp.png
deleted file mode 100755
index 441873e..0000000
Binary files a/library/res/drawable-xxxhdpi/ic_backspace_white_24dp.png and /dev/null differ
diff --git a/library/res/drawable-xxxhdpi/ic_fingerprint_white_24dp.png b/library/res/drawable-xxxhdpi/ic_fingerprint_white_24dp.png
deleted file mode 100755
index d453c3d..0000000
Binary files a/library/res/drawable-xxxhdpi/ic_fingerprint_white_24dp.png and /dev/null differ
diff --git a/library/res/layout-sw600dp/app_passcode_keyboard.xml b/library/res/layout-sw600dp/app_passcode_keyboard.xml
deleted file mode 100644
index 05d2886..0000000
--- a/library/res/layout-sw600dp/app_passcode_keyboard.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/res/layout/app_passcode_keyboard.xml b/library/res/layout/app_passcode_keyboard.xml
deleted file mode 100644
index cbaed58..0000000
--- a/library/res/layout/app_passcode_keyboard.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/res/values-sw600dp/bools.xml b/library/res/values-sw600dp/bools.xml
deleted file mode 100644
index 6a5d167..0000000
--- a/library/res/values-sw600dp/bools.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- true
-
-
diff --git a/library/res/values-xlarge/bools.xml b/library/res/values-xlarge/bools.xml
deleted file mode 100644
index 6a5d167..0000000
--- a/library/res/values-xlarge/bools.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- true
-
-
diff --git a/library/res/values/bools.xml b/library/res/values/bools.xml
deleted file mode 100644
index ba24ca8..0000000
--- a/library/res/values/bools.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- false
-
-
diff --git a/library/res/values/colors.xml b/library/res/values/colors.xml
deleted file mode 100644
index 57a7ef6..0000000
--- a/library/res/values/colors.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- #ff444444
- #ff5f5f5f
- #ffcccccc
- #ffe5e5e5
-
- @color/gray_e5
- @android:color/black
- @android:color/black
- @color/gray_c
- @android:color/white
- @color/gray_5f
- @color/gray_4
- @android:color/black
-
-
diff --git a/library/res/values/dimens.xml b/library/res/values/dimens.xml
deleted file mode 100644
index 6c02fe8..0000000
--- a/library/res/values/dimens.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- 24sp
- 1dp
- 18dp
-
-
diff --git a/library/res/values/strings.xml b/library/res/values/strings.xml
deleted file mode 100644
index cb923a2..0000000
--- a/library/res/values/strings.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
- PIN
- Manage passcode
- Enter your old passcode
- Re-enter your passcode
- Change passcode
- Passcode set
- Wrong passcode, please try again.
- Passcode lock
- Turn passcode off
- Turn passcode on
-
- Enter your passcode
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-
-
- turn_passcode_on_off
- change_passcode
-
- Delete
- Fingerprint authentication supported
-
-
diff --git a/library/res/values/styles.xml b/library/res/values/styles.xml
deleted file mode 100644
index c40ba93..0000000
--- a/library/res/values/styles.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/library/res/xml/passcode_preferences.xml b/library/res/xml/passcode_preferences.xml
deleted file mode 100644
index 62b4439..0000000
--- a/library/res/xml/passcode_preferences.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/library/src/org/wordpress/passcodelock/AbstractAppLock.java b/library/src/org/wordpress/passcodelock/AbstractAppLock.java
deleted file mode 100644
index dd9f660..0000000
--- a/library/src/org/wordpress/passcodelock/AbstractAppLock.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.annotation.TargetApi;
-import android.app.Application;
-import android.os.Build;
-
-/**
- * Interface for AppLock implementations.
- *
- * There are situations where the AppLock should not be required within an app. Methods for tracking
- * exempt {@link android.app.Activity}'s are provided and sub-class implementations are expected to
- * comply with requested exemptions.
- * @see #isExemptActivity(String)
- * @see #setExemptActivities(String[])
- * @see #getExemptActivities()
- *
- * Applications can request a one-time delay in locking the app. This can be useful for activities
- * that launch external applications with the expectation that the user will return to the calling
- * application shortly.
- */
-@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
-public abstract class AbstractAppLock implements Application.ActivityLifecycleCallbacks {
- public static final String FINGERPRINT_VERIFICATION_BYPASS = "fingerprint-bypass__";
- public static final int DEFAULT_TIMEOUT_S = 2;
- public static final int EXTENDED_TIMEOUT_S = 60;
-
- private int mLockTimeout = DEFAULT_TIMEOUT_S;
- private String[] mExemptActivities;
-
- public boolean isExemptActivity(String name) {
- if (name == null) return false;
- for (String activityName : getExemptActivities()) {
- if (name.equals(activityName)) return true;
- }
- return false;
- }
-
- public void setExemptActivities(String[] exemptActivities) {
- mExemptActivities = exemptActivities;
- }
-
- public String[] getExemptActivities() {
- if (mExemptActivities == null) setExemptActivities(new String[0]);
- return mExemptActivities;
- }
-
- public void setOneTimeTimeout(int timeout) {
- mLockTimeout = timeout;
- }
-
- public int getTimeout() {
- return mLockTimeout;
- }
-
- protected boolean isFingerprintPassword(String password) {
- return FINGERPRINT_VERIFICATION_BYPASS.equals(password);
- }
-
- /**
- * Whether the fingerprint unlocking should be available as option in the unlock screen.
- * Default is true, but implementation can override this and make their choice.
- *
- * Note that this doesn't affect system setting, the device must already have fingerprint unlock
- * available and correctly working.
- *
- * @return true if fingerprint unlock should be enabled on the lock screen
- */
- public boolean isFingerprintEnabled() {
- return true;
- }
-
- // Stub methods to avoid sub-classes to override to many unused methods.
- public boolean enableFingerprint() {
- return true;
- }
- public boolean disableFingerprint() {
- return false;
- }
-
- public abstract void enable();
- public abstract void disable();
- public abstract void forcePasswordLock();
- public abstract boolean verifyPassword(String password);
- public abstract boolean isPasswordLocked();
- public abstract boolean setPassword(String password);
-}
diff --git a/library/src/org/wordpress/passcodelock/AbstractPasscodeKeyboardActivity.java b/library/src/org/wordpress/passcodelock/AbstractPasscodeKeyboardActivity.java
deleted file mode 100644
index 5e37cc3..0000000
--- a/library/src/org/wordpress/passcodelock/AbstractPasscodeKeyboardActivity.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.app.Activity;
-import android.content.pm.ActivityInfo;
-import android.os.Bundle;
-import android.text.InputFilter;
-import android.text.Spanned;
-import android.view.HapticFeedbackConstants;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.widget.EditText;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import androidx.core.hardware.fingerprint.FingerprintManagerCompat;
-import androidx.core.os.CancellationSignal;
-
-public abstract class AbstractPasscodeKeyboardActivity extends Activity {
- public static final String KEY_MESSAGE = "message";
-
- protected EditText mPinCodeField;
- protected InputFilter[] filters = null;
- protected TextView topMessage = null;
-
- protected FingerprintManagerCompat mFingerprintManager;
- protected CancellationSignal mCancel;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- if (!getResources().getBoolean(R.bool.allow_rotation)) {
- setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
- }
-
- setContentView(R.layout.app_passcode_keyboard);
-
- topMessage = (TextView) findViewById(R.id.passcodelock_prompt);
-
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- String message = extras.getString(KEY_MESSAGE);
- if (message != null) {
- topMessage.setText(message);
- }
- }
-
- filters = new InputFilter[2];
- filters[0]= new InputFilter.LengthFilter(1);
- filters[1] = onlyNumber;
-
- mPinCodeField = (EditText)findViewById(R.id.pin_field);
-
- //setup the keyboard
- findViewById(R.id.button0).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button1).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button2).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button3).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button4).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button5).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button6).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button7).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button8).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button9).setOnClickListener(defaultButtonListener);
- findViewById(R.id.button_erase).setOnClickListener(
- new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- if (arg0.isHapticFeedbackEnabled()) {
- arg0.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
- }
-
- String curText = mPinCodeField.getText().toString();
-
- if (curText.length() > 0) {
- mPinCodeField.setText(curText.substring(0, curText.length() - 1));
- mPinCodeField.setSelection(mPinCodeField.length());
- }
- }
- });
-
- mFingerprintManager = FingerprintManagerCompat.from(this);
- }
-
- @Override
- public void onPause() {
- super.onPause();
-
- if (mCancel != null) {
- mCancel.cancel();
- }
- }
-
- protected AbstractAppLock getAppLock() {
- return AppLockManager.getInstance().getAppLock();
- }
-
- private OnClickListener defaultButtonListener = new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- int currentValue = -1;
- int id = arg0.getId();
- if (id == R.id.button0) {
- currentValue = 0;
- } else if (id == R.id.button1) {
- currentValue = 1;
- } else if (id == R.id.button2) {
- currentValue = 2;
- } else if (id == R.id.button3) {
- currentValue = 3;
- } else if (id == R.id.button4) {
- currentValue = 4;
- } else if (id == R.id.button5) {
- currentValue = 5;
- } else if (id == R.id.button6) {
- currentValue = 6;
- } else if (id == R.id.button7) {
- currentValue = 7;
- } else if (id == R.id.button8) {
- currentValue = 8;
- } else if (id == R.id.button9) {
- currentValue = 9;
- }
-
- if (arg0.isHapticFeedbackEnabled()) {
- arg0.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
- }
-
- // Add value and move focus.
- mPinCodeField.append(String.valueOf(currentValue));
- mPinCodeField.setSelection(mPinCodeField.length());
-
- if (mPinCodeField.length() >= 4) {
- onPinLockInserted();
- }
- }
- };
-
- protected void authenticationSucceeded() {
- setResult(RESULT_OK);
- finish();
- }
-
- protected void authenticationFailed() {
- Thread shake = new Thread() {
- public void run() {
- Animation shake = AnimationUtils.loadAnimation(AbstractPasscodeKeyboardActivity.this, R.anim.shake);
- findViewById(R.id.AppUnlockLinearLayout1).startAnimation(shake);
- showPasswordError();
- mPinCodeField.setText("");
- }
- };
- runOnUiThread(shake);
- }
-
- protected void showPasswordError(){
- Toast.makeText(AbstractPasscodeKeyboardActivity.this, R.string.passcode_wrong_passcode, Toast.LENGTH_SHORT).show();
- }
-
- protected abstract void onPinLockInserted();
- protected abstract FingerprintManagerCompat.AuthenticationCallback getFingerprintCallback();
-
- private InputFilter onlyNumber = new InputFilter() {
- @Override
- public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
- if (source.length() > 1) {
- return "";
- }
-
- if (source.length() == 0) {
- return null;
- }
-
- try {
- int number = Integer.parseInt(source.toString());
- if (number >= 0 && number <= 9) {
- return String.valueOf(number);
- }
-
- return "";
- } catch (NumberFormatException e) {
- return "";
- }
- }
- };
-}
diff --git a/library/src/org/wordpress/passcodelock/AppLockManager.java b/library/src/org/wordpress/passcodelock/AppLockManager.java
deleted file mode 100644
index 5da851b..0000000
--- a/library/src/org/wordpress/passcodelock/AppLockManager.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.app.Application;
-
-public class AppLockManager {
- private static AppLockManager instance;
- private AbstractAppLock currentAppLocker;
-
- public static AppLockManager getInstance() {
- if (instance == null) {
- instance = new AppLockManager();
- }
- return instance;
- }
-
- public void enableDefaultAppLockIfAvailable(Application currentApp) {
- if (!DefaultAppLock.isSupportedApi()) return;
-
- if (currentAppLocker != null) {
- if (currentAppLocker instanceof DefaultAppLock) {
- // A previous default applocker is already in place
- // No need to re-enable it
- return;
- }
- // A previous NON-default applockr is in place. Disable it.
- currentAppLocker.disable();
- }
-
- currentAppLocker = new DefaultAppLock(currentApp);
- currentAppLocker.enable();
- }
-
- public boolean isDefaultLock() {
- return getAppLock() != null && getAppLock() instanceof DefaultAppLock;
- }
-
- /**
- * @return true when an App lock is available. It could be either a the Default App lock on
- * Android-v14 or higher, or a non default App lock
- */
- public boolean isAppLockFeatureEnabled() {
- return getAppLock() != null && (!isDefaultLock() || DefaultAppLock.isSupportedApi());
- }
-
- public void setCurrentAppLock(AbstractAppLock newAppLocker) {
- if( currentAppLocker != null ) {
- currentAppLocker.disable(); //disable the old applocker if available
- }
- currentAppLocker = newAppLocker;
- }
-
- public AbstractAppLock getAppLock() {
- return currentAppLocker;
- }
-
- public void setExtendedTimeout(){
- if (getAppLock() == null) return;
- getAppLock().setOneTimeTimeout(AbstractAppLock.EXTENDED_TIMEOUT_S);
- }
-}
diff --git a/library/src/org/wordpress/passcodelock/DefaultAppLock.java b/library/src/org/wordpress/passcodelock/DefaultAppLock.java
deleted file mode 100644
index e40db5f..0000000
--- a/library/src/org/wordpress/passcodelock/DefaultAppLock.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.wordpress.passcodelock;
-
-import java.util.Date;
-
-import javax.crypto.Cipher;
-import javax.crypto.SecretKey;
-import javax.crypto.SecretKeyFactory;
-import javax.crypto.spec.DESKeySpec;
-
-import android.app.Activity;
-import android.app.Application;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.os.Build;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.text.TextUtils;
-import android.util.Base64;
-
-public class DefaultAppLock extends AbstractAppLock {
- public static boolean isSupportedApi() {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
- }
-
- private static final String UNLOCK_CLASS_NAME = PasscodeUnlockActivity.class.getName();
- private static final String OLD_PASSWORD_SALT = "sadasauidhsuyeuihdahdiauhs";
- private static final String OLD_APP_LOCK_PASSWORD_PREF_KEY = "wp_app_lock_password_key";
-
- private Application mCurrentApp;
- private SharedPreferences mSharedPreferences;
- private Date mLostFocusDate;
-
- public DefaultAppLock(Application app) {
- super();
- mCurrentApp = app;
- mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(mCurrentApp);
- }
-
- /** {@link PasscodeUnlockActivity} is always exempt. */
- @Override
- public boolean isExemptActivity(String activityName) {
- return UNLOCK_CLASS_NAME.equals(activityName) || super.isExemptActivity(activityName);
- }
-
- @Override
- public void onActivityPaused(Activity activity) {
- if (!isExemptActivity(activity.getClass().getName())) mLostFocusDate = new Date();
- }
-
- @Override
- public void onActivityResumed(Activity activity) {
- if (!isExemptActivity(activity.getClass().getName()) && shouldShowUnlockScreen()) {
- Intent i = new Intent(activity.getApplicationContext(), PasscodeUnlockActivity.class);
- i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- activity.getApplication().startActivity(i);
- }
- }
-
- @Override public void onActivityCreated(Activity arg0, Bundle arg1) {}
- @Override public void onActivityDestroyed(Activity arg0) {}
- @Override public void onActivitySaveInstanceState(Activity arg0, Bundle arg1) {}
- @Override public void onActivityStarted(Activity arg0) {}
- @Override public void onActivityStopped(Activity arg0) {}
-
- public void enable() {
- if (!isPasswordLocked()) return;
- if (isSupportedApi()) {
- mCurrentApp.unregisterActivityLifecycleCallbacks(this);
- mCurrentApp.registerActivityLifecycleCallbacks(this);
- }
- }
-
- public void disable() {
- if (isSupportedApi()) {
- mCurrentApp.unregisterActivityLifecycleCallbacks(this);
- }
- }
-
- public boolean isPasswordLocked() {
- return mSharedPreferences.contains(BuildConfig.PASSWORD_PREFERENCE_KEY) ||
- mSharedPreferences.contains(OLD_APP_LOCK_PASSWORD_PREF_KEY);
- }
-
- public boolean setPassword(String password) {
- removePasswordFromPreferences();
- if (TextUtils.isEmpty(password)) {
- disable();
- } else {
- savePasswordToPreferences(password.hashCode());
- enable();
- }
- return true;
- }
-
- @Override
- public boolean isFingerprintEnabled() {
- return mSharedPreferences.getBoolean(BuildConfig.FINGERPRINT_ENABLED_KEY, true);
- }
-
- @Override
- public boolean enableFingerprint() {
- mSharedPreferences.edit().putBoolean(BuildConfig.FINGERPRINT_ENABLED_KEY, true).apply();
- return true;
- }
-
- @Override
- public boolean disableFingerprint() {
- mSharedPreferences.edit().putBoolean(BuildConfig.FINGERPRINT_ENABLED_KEY, false).apply();
- return true;
- }
-
- public void forcePasswordLock() {
- mLostFocusDate = null;
- }
-
- public boolean verifyPassword(String password) {
- if (TextUtils.isEmpty(password)) return false;
-
- // successful fingerprint scan bypasses PIN security
- if (isFingerprintPassword(password)) {
- mLostFocusDate = new Date();
- return true;
- }
-
- String storedPassword = "";
- String securePassword = null;
- int updatedHash = -1;
-
- if (mSharedPreferences.contains(OLD_APP_LOCK_PASSWORD_PREF_KEY)) {
- // backwards compatibility
- storedPassword = getStoredLegacyPassword(OLD_APP_LOCK_PASSWORD_PREF_KEY);
- securePassword = legacyPasswordHash(password);
- } else if (mSharedPreferences.contains(BuildConfig.PASSWORD_PREFERENCE_KEY)) {
- if (shouldUpdatePassword()) {
- storedPassword = getStoredLegacyPassword(BuildConfig.PASSWORD_PREFERENCE_KEY);
- storedPassword = decryptPassword(storedPassword);
- storedPassword = stripSalt(storedPassword);
- securePassword = password;
- updatedHash = password.hashCode();
- } else {
- int storedHash = getStoredPassword();
- storedPassword = String.valueOf(storedHash);
- securePassword = String.valueOf(password.hashCode());
- }
- }
-
- if (!storedPassword.equalsIgnoreCase(securePassword)) return false;
-
- // password security updated, replace stored password with integer hash value
- if (updatedHash != -1) {
- removePasswordFromPreferences();
- savePasswordToPreferences(updatedHash);
- }
- mLostFocusDate = new Date();
- return true;
- }
-
- private String stripSalt(String saltedPassword) {
- if (TextUtils.isEmpty(saltedPassword) || saltedPassword.length() < 4) return "";
- int middle = saltedPassword.length() / 2;
- return saltedPassword.substring(middle - 2, middle + 2);
- }
-
- /** Show the unlock screen if there is a saved password and the timeout period has elapsed. */
- private boolean shouldShowUnlockScreen() {
- if(!isPasswordLocked()) return false;
- if(mLostFocusDate == null) return true;
-
- int currentTimeOut = getTimeout();
- setOneTimeTimeout(DEFAULT_TIMEOUT_S);
-
- if (timeSinceLocked() < currentTimeOut) return false;
- mLostFocusDate = null;
- return true;
- }
-
- private int getStoredPassword() {
- return mSharedPreferences.getInt(BuildConfig.PASSWORD_PREFERENCE_KEY, -1);
- }
-
- private void savePasswordToPreferences(int password) {
- mSharedPreferences.edit().putInt(BuildConfig.PASSWORD_PREFERENCE_KEY, password).apply();
- }
-
- private void removePasswordFromPreferences() {
- mSharedPreferences.edit()
- .remove(OLD_APP_LOCK_PASSWORD_PREF_KEY)
- .remove(BuildConfig.PASSWORD_PREFERENCE_KEY)
- .apply();
- }
-
- private int timeSinceLocked() {
- return Math.abs((int) ((new Date().getTime() - mLostFocusDate.getTime()) / 1000));
- }
-
- //
- // Legacy methods for backwards compatibility of passwords stored using deprecated security
- //
-
- /** Update to hash-based security if password was stored using encryption-based security. */
- private boolean shouldUpdatePassword() {
- Object storedValue = mSharedPreferences.getAll().get(BuildConfig.PASSWORD_PREFERENCE_KEY);
- return storedValue != null && storedValue instanceof String;
- }
-
- private String getStoredLegacyPassword(String key) {
- return mSharedPreferences.getString(key, "");
- }
-
- private String legacyPasswordHash(String rawPassword) {
- return StringUtils.getMd5Hash(OLD_PASSWORD_SALT + rawPassword + OLD_PASSWORD_SALT);
- }
-
- private String decryptPassword(String encryptedPwd) {
- try {
- DESKeySpec keySpec = new DESKeySpec(BuildConfig.PASSWORD_ENC_SECRET.getBytes("UTF-8"));
- SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
- SecretKey key = keyFactory.generateSecret(keySpec);
-
- byte[] encryptedWithoutB64 = Base64.decode(encryptedPwd, Base64.DEFAULT);
- Cipher cipher = Cipher.getInstance("DES");
- cipher.init(Cipher.DECRYPT_MODE, key);
- byte[] plainTextPwdBytes = cipher.doFinal(encryptedWithoutB64);
- return new String(plainTextPwdBytes);
- } catch (Exception e) {
- }
- return encryptedPwd;
- }
-}
diff --git a/library/src/org/wordpress/passcodelock/PasscodeManagePasswordActivity.java b/library/src/org/wordpress/passcodelock/PasscodeManagePasswordActivity.java
deleted file mode 100644
index f8d5485..0000000
--- a/library/src/org/wordpress/passcodelock/PasscodeManagePasswordActivity.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.os.Bundle;
-import android.view.View;
-import android.widget.TextView;
-
-import androidx.core.hardware.fingerprint.FingerprintManagerCompat;
-import androidx.core.os.CancellationSignal;
-
-public class PasscodeManagePasswordActivity extends AbstractPasscodeKeyboardActivity {
- public static final String KEY_TYPE = "type";
-
- private int type = -1;
- private String unverifiedPasscode = null;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- Bundle extras = getIntent().getExtras();
- if (extras != null) {
- type = extras.getInt(KEY_TYPE, -1);
- }
- }
-
- @Override
- public void onResume() {
- super.onResume();
-
- // Show fingerprint scanner if supported
- if (mFingerprintManager.isHardwareDetected() &&
- mFingerprintManager.hasEnrolledFingerprints() &&
- type == PasscodePreferenceFragment.DISABLE_PASSLOCK) {
- mFingerprintManager.authenticate(null, 0, mCancel = new CancellationSignal(), getFingerprintCallback(), null);
- View view = findViewById(R.id.image_fingerprint);
- view.setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- protected void onPinLockInserted() {
- String passLock = mPinCodeField.getText().toString();
- mPinCodeField.setText("");
-
- switch (type) {
- case PasscodePreferenceFragment.DISABLE_PASSLOCK:
- if (AppLockManager.getInstance().getAppLock().verifyPassword(passLock)) {
- AppLockManager.getInstance().getAppLock().setPassword(null);
- authenticationSucceeded();
- } else {
- authenticationFailed();
- }
- break;
- case PasscodePreferenceFragment.ENABLE_PASSLOCK:
- if (unverifiedPasscode == null) {
- ((TextView) findViewById(R.id.passcodelock_prompt)).setText(R.string.passcode_re_enter_passcode);
- unverifiedPasscode = passLock;
- } else {
- if (passLock.equals(unverifiedPasscode)) {
- AppLockManager.getInstance().getAppLock().setPassword(passLock);
- authenticationSucceeded();
- } else {
- unverifiedPasscode = null;
- topMessage.setText(R.string.passcodelock_prompt_message);
- authenticationFailed();
- }
- }
- break;
- case PasscodePreferenceFragment.CHANGE_PASSWORD:
- //verify old password
- if (AppLockManager.getInstance().getAppLock().verifyPassword(passLock)) {
- topMessage.setText(R.string.passcodelock_prompt_message);
- type = PasscodePreferenceFragment.ENABLE_PASSLOCK;
- } else {
- authenticationFailed();
- }
- break;
- default:
- break;
- }
- }
-
- @Override
- protected FingerprintManagerCompat.AuthenticationCallback getFingerprintCallback() {
- return new FingerprintManagerCompat.AuthenticationCallback() {
- @Override
- public void onAuthenticationError(int errMsgId, CharSequence errString) {
- super.onAuthenticationError(errMsgId, errString);
- }
-
- @Override
- public void onAuthenticationHelp(int helpMsgId, CharSequence helpString) {
- super.onAuthenticationHelp(helpMsgId, helpString);
- }
-
- @Override
- public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result) {
- super.onAuthenticationSucceeded(result);
- AppLockManager.getInstance().getAppLock().setPassword(null);
- authenticationSucceeded();
- }
-
- @Override
- public void onAuthenticationFailed() {
- super.onAuthenticationFailed();
- authenticationFailed();
- }
- };
- }
-}
diff --git a/library/src/org/wordpress/passcodelock/PasscodePreferenceFragment.java b/library/src/org/wordpress/passcodelock/PasscodePreferenceFragment.java
deleted file mode 100644
index 2d0ff18..0000000
--- a/library/src/org/wordpress/passcodelock/PasscodePreferenceFragment.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.preference.Preference;
-import android.preference.PreferenceFragment;
-import android.preference.SwitchPreference;
-
-public class PasscodePreferenceFragment extends PreferenceFragment
- implements Preference.OnPreferenceClickListener, Preference.OnPreferenceChangeListener {
- public static final String KEY_SHOULD_INFLATE = "should-inflate";
- public static final int ENABLE_PASSLOCK = 0;
- public static final int DISABLE_PASSLOCK = 1;
- public static final int CHANGE_PASSWORD = 2;
-
- private Preference mTogglePasscodePreference;
- private Preference mChangePasscodePreference;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- Bundle args = getArguments();
-
- if (args != null && args.getBoolean(KEY_SHOULD_INFLATE, true)) {
- addPreferencesFromResource(R.xml.passcode_preferences);
- mTogglePasscodePreference = findPreference(getString(R.string.pref_key_passcode_toggle));
- mChangePasscodePreference = findPreference(getString(R.string.pref_key_change_passcode));
- }
-
- refreshPreferenceState();
- }
-
- @Override
- public boolean onPreferenceClick(Preference preference) {
- String preferenceKey = preference.getKey() != null ? preference.getKey() : "";
-
- if (preferenceKey.equals(getString(R.string.pref_key_change_passcode))) {
- return handleChangePasscodeClick();
- }
-
- return false;
- }
-
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- if (newValue == null) return false;
- String preferenceKey = preference.getKey() != null ? preference.getKey() : "";
- if (!preferenceKey.equals(getString(R.string.pref_key_passcode_toggle))) {
- // Make sure we're updating the correct preference item.
- // Actually this check is not even required, since we've one item only that has set the
- // OnPreferenceChangeListener.
- return false;
- }
-
- Boolean newValueBool = (Boolean) newValue;
- boolean oldValue = ((SwitchPreference)mTogglePasscodePreference).isChecked();
- if (newValueBool == oldValue) {
- // Already updated. Do not call the setup activity.
- // This method get called twice if the click is on the row (not on the toggle visual item)
- // on devices Pre-Lollip.
- return true;
- }
-
- handlePasscodeToggleClick();
-
- return true;
- }
-
- /**
- * When the preferences are nested in a parent apps xml layout the inflated preferences will
- * need to be set.
- */
- public void setPreferences(Preference togglePreference, Preference changePreference) {
- mTogglePasscodePreference = togglePreference;
- mChangePasscodePreference = changePreference;
-
- refreshPreferenceState();
- }
-
- /**
- * Called when user requests to turn the passlock on or off.
- *
- * @return
- * always true to indicate that the request was handled
- */
- private boolean handlePasscodeToggleClick() {
- int type = AppLockManager.getInstance().getAppLock().isPasswordLocked()
- ? DISABLE_PASSLOCK : ENABLE_PASSLOCK;
- Intent i = new Intent(getActivity(), PasscodeManagePasswordActivity.class);
- i.putExtra(PasscodeManagePasswordActivity.KEY_TYPE, type);
- startActivityForResult(i, type);
-
- return true;
- }
-
- /**
- * Called when user requests to change passcode.
- *
- * @return
- * always true to indicate that the request was handled
- */
- private boolean handleChangePasscodeClick() {
- Intent i = new Intent(getActivity(), PasscodeManagePasswordActivity.class);
- i.putExtra(PasscodeManagePasswordActivity.KEY_TYPE, CHANGE_PASSWORD);
- i.putExtra(AbstractPasscodeKeyboardActivity.KEY_MESSAGE,
- getString(R.string.passcode_enter_old_passcode));
- startActivityForResult(i, CHANGE_PASSWORD);
-
- return true;
- }
-
- /**
- * Helper method to setup preference properties
- */
- private void refreshPreferenceState() {
- if (mTogglePasscodePreference != null && mChangePasscodePreference != null) {
- mChangePasscodePreference.setOnPreferenceClickListener(this);
- mTogglePasscodePreference.setOnPreferenceChangeListener(this);
-
- if (AppLockManager.getInstance().getAppLock().isPasswordLocked()) {
- mTogglePasscodePreference.setTitle(R.string.passcode_turn_off);
- mChangePasscodePreference.setEnabled(true);
- } else {
- mTogglePasscodePreference.setTitle(R.string.passcode_turn_on);
- mChangePasscodePreference.setEnabled(false);
- }
- }
- }
-}
diff --git a/library/src/org/wordpress/passcodelock/PasscodePreferenceFragmentCompat.java b/library/src/org/wordpress/passcodelock/PasscodePreferenceFragmentCompat.java
deleted file mode 100644
index 64676e2..0000000
--- a/library/src/org/wordpress/passcodelock/PasscodePreferenceFragmentCompat.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.content.Intent;
-import android.os.Bundle;
-
-import androidx.preference.Preference;
-import androidx.preference.PreferenceFragmentCompat;
-
-public class PasscodePreferenceFragmentCompat extends PreferenceFragmentCompat
- implements Preference.OnPreferenceClickListener {
- public static final String KEY_SHOULD_INFLATE = "should-inflate";
- public static final int ENABLE_PASSLOCK = 0;
- public static final int DISABLE_PASSLOCK = 1;
- public static final int CHANGE_PASSWORD = 2;
-
- private Preference mTogglePasscodePreference;
- private Preference mChangePasscodePreference;
-
- @Override
- public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
- Bundle args = getArguments();
-
- if (args != null && args.getBoolean(KEY_SHOULD_INFLATE, true)) {
- addPreferencesFromResource(R.xml.passcode_preferences);
- mTogglePasscodePreference = findPreference(getString(R.string.pref_key_passcode_toggle));
- mChangePasscodePreference = findPreference(getString(R.string.pref_key_change_passcode));
- }
-
- refreshPreferenceState();
- }
-
- @Override
- public boolean onPreferenceClick(Preference preference) {
- String preferenceKey = preference.getKey() != null ? preference.getKey() : "";
-
- if (preferenceKey.equals(getString(R.string.pref_key_passcode_toggle))) {
- return handlePasscodeToggleClick();
- } else if (preferenceKey.equals(getString(R.string.pref_key_change_passcode))) {
- return handleChangePasscodeClick();
- }
-
- return false;
- }
-
- /**
- * When the preferences are nested in a parent apps xml layout the inflated preferences will
- * need to be set.
- */
- public void setPreferences(Preference togglePreference, Preference changePreference) {
- mTogglePasscodePreference = togglePreference;
- mChangePasscodePreference = changePreference;
-
- refreshPreferenceState();
- }
-
- /**
- * Called when user requests to turn the passlock on or off.
- *
- * @return
- * always true to indicate that the request was handled
- */
- private boolean handlePasscodeToggleClick() {
- int type = AppLockManager.getInstance().getAppLock().isPasswordLocked()
- ? DISABLE_PASSLOCK : ENABLE_PASSLOCK;
- Intent i = new Intent(getActivity(), PasscodeManagePasswordActivity.class);
- i.putExtra(PasscodeManagePasswordActivity.KEY_TYPE, type);
- startActivityForResult(i, type);
-
- return true;
- }
-
- /**
- * Called when user requests to change passcode.
- *
- * @return
- * always true to indicate that the request was handled
- */
- private boolean handleChangePasscodeClick() {
- Intent i = new Intent(getActivity(), PasscodeManagePasswordActivity.class);
- i.putExtra(PasscodeManagePasswordActivity.KEY_TYPE, CHANGE_PASSWORD);
- i.putExtra(AbstractPasscodeKeyboardActivity.KEY_MESSAGE,
- getString(R.string.passcode_enter_old_passcode));
- startActivityForResult(i, CHANGE_PASSWORD);
-
- return true;
- }
-
- /**
- * Helper method to setup preference properties
- */
- private void refreshPreferenceState() {
- if (mTogglePasscodePreference != null && mChangePasscodePreference != null) {
- mTogglePasscodePreference.setOnPreferenceClickListener(this);
- mChangePasscodePreference.setOnPreferenceClickListener(this);
-
- if (AppLockManager.getInstance().getAppLock().isPasswordLocked()) {
- mTogglePasscodePreference.setTitle(R.string.passcode_turn_off);
- mChangePasscodePreference.setEnabled(true);
- } else {
- mTogglePasscodePreference.setTitle(R.string.passcode_turn_on);
- mChangePasscodePreference.setEnabled(false);
- }
- }
- }
-}
diff --git a/library/src/org/wordpress/passcodelock/PasscodeUnlockActivity.java b/library/src/org/wordpress/passcodelock/PasscodeUnlockActivity.java
deleted file mode 100644
index bc1bc7e..0000000
--- a/library/src/org/wordpress/passcodelock/PasscodeUnlockActivity.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.wordpress.passcodelock;
-
-import android.content.Intent;
-import android.view.View;
-
-import androidx.core.hardware.fingerprint.FingerprintManagerCompat;
-import androidx.core.os.CancellationSignal;
-
-public class PasscodeUnlockActivity extends AbstractPasscodeKeyboardActivity {
- @Override
- public void onResume() {
- super.onResume();
-
- if (isFingerprintSupportedAndEnabled()) {
- mCancel = new CancellationSignal();
- mFingerprintManager.authenticate(null, 0, mCancel, getFingerprintCallback(), null);
- View view = findViewById(R.id.image_fingerprint);
- view.setVisibility(View.VISIBLE);
- }
- }
-
- @Override
- public void onBackPressed() {
- getAppLock().forcePasswordLock();
- Intent i = new Intent();
- i.setAction(Intent.ACTION_MAIN);
- i.addCategory(Intent.CATEGORY_HOME);
- startActivity(i);
- finish();
- }
-
- @Override
- protected void onPinLockInserted() {
- String passLock = mPinCodeField.getText().toString();
- if (getAppLock().verifyPassword(passLock)) {
- authenticationSucceeded();
- } else {
- authenticationFailed();
- }
- }
-
- @Override
- protected FingerprintManagerCompat.AuthenticationCallback getFingerprintCallback() {
- return new FingerprintManagerCompat.AuthenticationCallback() {
- @Override
- public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult result) {
- // without the call to verifyPassword the unlock screen will show multiple times
- getAppLock().verifyPassword(AbstractAppLock.FINGERPRINT_VERIFICATION_BYPASS);
- authenticationSucceeded();
- }
-
- @Override
- public void onAuthenticationFailed() {
- authenticationFailed();
- }
-
- @Override public void onAuthenticationError(int errMsgId, CharSequence errString) { }
- @Override public void onAuthenticationHelp(int helpMsgId, CharSequence helpString) { }
- };
- }
-
- private boolean isFingerprintSupportedAndEnabled() {
- return mFingerprintManager.isHardwareDetected() &&
- mFingerprintManager.hasEnrolledFingerprints() &&
- getAppLock().isFingerprintEnabled();
- }
-}
diff --git a/library/src/org/wordpress/passcodelock/StringUtils.java b/library/src/org/wordpress/passcodelock/StringUtils.java
deleted file mode 100644
index 83e7905..0000000
--- a/library/src/org/wordpress/passcodelock/StringUtils.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.wordpress.passcodelock;
-
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-import android.util.Log;
-
-public class StringUtils {
- public static String getMd5Hash(String input) {
- try {
- MessageDigest md = MessageDigest.getInstance("MD5");
- byte[] messageDigest = md.digest(input.getBytes());
- BigInteger number = new BigInteger(1, messageDigest);
- String md5 = number.toString(16);
-
- while (md5.length() < 32)
- md5 = "0" + md5;
-
- return md5;
- } catch (NoSuchAlgorithmException e) {
- Log.e("MD5", e.getLocalizedMessage());
- return null;
- }
- }
-}
diff --git a/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar
new file mode 100644
index 0000000..a841894
Binary files /dev/null and b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar differ
diff --git a/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar.md5 b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar.md5
new file mode 100644
index 0000000..4991dae
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar.md5
@@ -0,0 +1 @@
+f5c109530e4dafa86effedb1fd941b04
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar.sha1 b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar.sha1
new file mode 100644
index 0000000..69332d0
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.aar.sha1
@@ -0,0 +1 @@
+b9a6541eb582aae77c18752f46c1f3a8f0d6c53a
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom
new file mode 100644
index 0000000..2829f40
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom
@@ -0,0 +1,9 @@
+
+
+ 4.0.0
+ org.wordpress
+ android-passcodelock
+ 0.0.1
+ aar
+
diff --git a/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom.md5 b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom.md5
new file mode 100644
index 0000000..f9fb118
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom.md5
@@ -0,0 +1 @@
+e82de4ced3186b9d6e52c7ae2e12ec6d
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom.sha1 b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom.sha1
new file mode 100644
index 0000000..d15fd99
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.1/android-passcodelock-0.0.1.pom.sha1
@@ -0,0 +1 @@
+909e336d6ffe897fb2e10b6ab22506db9ed78fd6
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar
new file mode 100644
index 0000000..c1a25f4
Binary files /dev/null and b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar differ
diff --git a/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar.md5 b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar.md5
new file mode 100644
index 0000000..3cf4b01
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar.md5
@@ -0,0 +1 @@
+80dc015572393a666d22704d73467291
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar.sha1 b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar.sha1
new file mode 100644
index 0000000..bb1f608
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.aar.sha1
@@ -0,0 +1 @@
+75188e6db5f5093f9a1acd2575de07fbc1ccb1a8
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom
new file mode 100644
index 0000000..81f226f
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom
@@ -0,0 +1,9 @@
+
+
+ 4.0.0
+ org.wordpress
+ android-passcodelock
+ 0.0.3
+ aar
+
diff --git a/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom.md5 b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom.md5
new file mode 100644
index 0000000..72037e1
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom.md5
@@ -0,0 +1 @@
+03586256c13b53da1b7cc270cdcb6af4
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom.sha1 b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom.sha1
new file mode 100644
index 0000000..df68140
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.3/android-passcodelock-0.0.3.pom.sha1
@@ -0,0 +1 @@
+d50346108b7dea918e9df3a129a82e89da578487
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar
new file mode 100644
index 0000000..ceab667
Binary files /dev/null and b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar differ
diff --git a/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar.md5 b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar.md5
new file mode 100644
index 0000000..111c736
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar.md5
@@ -0,0 +1 @@
+dd4f75cccc6980209ae5277d3eb8e363
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar.sha1 b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar.sha1
new file mode 100644
index 0000000..98a2641
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.aar.sha1
@@ -0,0 +1 @@
+274ce30f11d6e8b1584e82e1a97dbe67ba63f1f3
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom
new file mode 100644
index 0000000..c73215e
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom
@@ -0,0 +1,9 @@
+
+
+ 4.0.0
+ org.wordpress
+ android-passcodelock
+ 0.0.5
+ aar
+
diff --git a/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom.md5 b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom.md5
new file mode 100644
index 0000000..40511b5
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom.md5
@@ -0,0 +1 @@
+8bdf90a5757d4a17c7530a221d0002f2
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom.sha1 b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom.sha1
new file mode 100644
index 0000000..5c932ed
--- /dev/null
+++ b/org/wordpress/android-passcodelock/0.0.5/android-passcodelock-0.0.5.pom.sha1
@@ -0,0 +1 @@
+d2273fd16ab566186e79896bc41e1c8f669eee21
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/maven-metadata.xml b/org/wordpress/android-passcodelock/maven-metadata.xml
new file mode 100644
index 0000000..8548ae9
--- /dev/null
+++ b/org/wordpress/android-passcodelock/maven-metadata.xml
@@ -0,0 +1,14 @@
+
+
+ org.wordpress
+ android-passcodelock
+
+ 0.0.5
+
+ 0.0.1
+ 0.0.3
+ 0.0.5
+
+ 20140318164705
+
+
diff --git a/org/wordpress/android-passcodelock/maven-metadata.xml.md5 b/org/wordpress/android-passcodelock/maven-metadata.xml.md5
new file mode 100644
index 0000000..25dd235
--- /dev/null
+++ b/org/wordpress/android-passcodelock/maven-metadata.xml.md5
@@ -0,0 +1 @@
+2ccfd1647368cc234428920bd272642b
\ No newline at end of file
diff --git a/org/wordpress/android-passcodelock/maven-metadata.xml.sha1 b/org/wordpress/android-passcodelock/maven-metadata.xml.sha1
new file mode 100644
index 0000000..4d7908e
--- /dev/null
+++ b/org/wordpress/android-passcodelock/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+84defa82a369621507bdfd1aa27382700d855c31
\ No newline at end of file
diff --git a/sample/.gitignore b/sample/.gitignore
deleted file mode 100644
index 7c044b3..0000000
--- a/sample/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.DS_Store
-
-bin/
-gen/
-build/
-
-*.iml
-*.ipr
-*.iws
-.idea/
-.gradle/
diff --git a/sample/build.gradle b/sample/build.gradle
deleted file mode 100644
index e9093dc..0000000
--- a/sample/build.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-apply plugin: 'com.android.application'
-
-android {
- compileSdkVersion 28
- buildToolsVersion "28.0.3"
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-
- defaultConfig {
- applicationId "org.wordpress.passcodelock.sample"
- minSdkVersion 14
- targetSdkVersion 28
- versionCode 1
- versionName "1.0"
- }
-}
-
-buildscript {
- dependencies {
- classpath 'com.android.tools.build:gradle:3.4.2'
- }
-
- repositories {
- google()
- jcenter()
- maven { url 'https://maven.google.com' }
- }
-}
-
-dependencies {
- implementation 'androidx.appcompat:appcompat:1.0.2'
- implementation 'androidx.legacy:legacy-support-v4:1.0.0'
- implementation project(path: ':library')
-}
-
-repositories {
- google()
- mavenCentral()
-}
diff --git a/sample/proguard-rules.pro b/sample/proguard-rules.pro
deleted file mode 100644
index bc7ca78..0000000
--- a/sample/proguard-rules.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in /Users/Tyler/Library/Android/sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml
deleted file mode 100644
index 8f907aa..0000000
--- a/sample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sample/src/main/java/org/wordpress/passcodelock/sample/SampleActivity.java b/sample/src/main/java/org/wordpress/passcodelock/sample/SampleActivity.java
deleted file mode 100644
index 552f0c3..0000000
--- a/sample/src/main/java/org/wordpress/passcodelock/sample/SampleActivity.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.wordpress.passcodelock.sample;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-
-import androidx.appcompat.app.AppCompatActivity;
-
-public class SampleActivity extends AppCompatActivity {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- setContentView(R.layout.sample_activity);
- super.onCreate(savedInstanceState);
- }
-
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.sample, menu);
- return super.onCreateOptionsMenu(menu);
- }
-
- @Override
- public boolean onOptionsItemSelected(final MenuItem item) {
- switch (item.getItemId()) {
- case R.id.action_settings:
- startActivity(new Intent(SampleActivity.this, SamplePreferenceActivity.class));
- return true;
- }
-
- return super.onOptionsItemSelected(item);
- }
-}
diff --git a/sample/src/main/java/org/wordpress/passcodelock/sample/SampleApplication.java b/sample/src/main/java/org/wordpress/passcodelock/sample/SampleApplication.java
deleted file mode 100644
index e09081a..0000000
--- a/sample/src/main/java/org/wordpress/passcodelock/sample/SampleApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.wordpress.passcodelock.sample;
-
-import android.app.Application;
-
-import org.wordpress.passcodelock.AppLockManager;
-
-public class SampleApplication extends Application {
- @Override
- public void onCreate() {
- super.onCreate();
- AppLockManager.getInstance().enableDefaultAppLockIfAvailable(this);
- }
-}
diff --git a/sample/src/main/java/org/wordpress/passcodelock/sample/SamplePreferenceActivity.java b/sample/src/main/java/org/wordpress/passcodelock/sample/SamplePreferenceActivity.java
deleted file mode 100644
index 6b06dc8..0000000
--- a/sample/src/main/java/org/wordpress/passcodelock/sample/SamplePreferenceActivity.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.wordpress.passcodelock.sample;
-
-import android.app.FragmentManager;
-import android.os.Bundle;
-import android.preference.Preference;
-import android.preference.SwitchPreference;
-import android.view.MenuItem;
-
-import androidx.appcompat.app.ActionBar;
-import androidx.appcompat.app.AppCompatActivity;
-
-import org.wordpress.passcodelock.AppLockManager;
-import org.wordpress.passcodelock.PasscodePreferenceFragment;
-
-public class SamplePreferenceActivity extends AppCompatActivity {
- private static final String KEY_PASSCODE_FRAGMENT = "passcode-fragment";
- private static final String KEY_PREFERENCE_FRAGMENT = "preference-fragment";
-
- private PasscodePreferenceFragment mPasscodePreferenceFragment;
- private SamplePreferenceFragment mSamplePreferenceFragment;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- ActionBar actionBar = getSupportActionBar();
-
- if (actionBar != null) {
- actionBar.setHomeButtonEnabled(true);
- actionBar.setDisplayHomeAsUpEnabled(true);
- }
-
- FragmentManager fragmentManager = getFragmentManager();
- mSamplePreferenceFragment = (SamplePreferenceFragment) fragmentManager.findFragmentByTag(KEY_PREFERENCE_FRAGMENT);
- mPasscodePreferenceFragment = (PasscodePreferenceFragment) fragmentManager.findFragmentByTag(KEY_PASSCODE_FRAGMENT);
-
- if (mSamplePreferenceFragment == null || mPasscodePreferenceFragment == null) {
- Bundle passcodeArgs = new Bundle();
- passcodeArgs.putBoolean(PasscodePreferenceFragment.KEY_SHOULD_INFLATE, false);
- mSamplePreferenceFragment = new SamplePreferenceFragment();
- mPasscodePreferenceFragment = new PasscodePreferenceFragment();
- mPasscodePreferenceFragment.setArguments(passcodeArgs);
-
- fragmentManager.beginTransaction()
- .replace(android.R.id.content, mPasscodePreferenceFragment, KEY_PASSCODE_FRAGMENT)
- .add(android.R.id.content, mSamplePreferenceFragment, KEY_PREFERENCE_FRAGMENT)
- .commit();
- }
- }
-
- @Override
- public boolean onOptionsItemSelected(final MenuItem item) {
- switch (item.getItemId()) {
- case android.R.id.home:
- onBackPressed();
- return true;
- }
-
- return super.onOptionsItemSelected(item);
- }
-
- @Override
- public void onStart() {
- super.onStart();
-
- Preference togglePreference = mSamplePreferenceFragment.findPreference(
- getString(org.wordpress.passcodelock.R.string.pref_key_passcode_toggle));
- Preference changePreference = mSamplePreferenceFragment.findPreference(
- getString(org.wordpress.passcodelock.R.string.pref_key_change_passcode));
-
- if (togglePreference != null && changePreference != null) {
- mPasscodePreferenceFragment.setPreferences(togglePreference, changePreference);
- ((SwitchPreference) togglePreference).setChecked(
- AppLockManager.getInstance().getAppLock().isPasswordLocked());
- }
- }
-}
diff --git a/sample/src/main/java/org/wordpress/passcodelock/sample/SamplePreferenceFragment.java b/sample/src/main/java/org/wordpress/passcodelock/sample/SamplePreferenceFragment.java
deleted file mode 100644
index 5aa879c..0000000
--- a/sample/src/main/java/org/wordpress/passcodelock/sample/SamplePreferenceFragment.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.wordpress.passcodelock.sample;
-
-import android.os.Bundle;
-import android.preference.PreferenceFragment;
-
-public class SamplePreferenceFragment extends PreferenceFragment {
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setRetainInstance(true);
- addPreferencesFromResource(R.xml.preferences);
- }
-}
diff --git a/sample/src/main/res/drawable-hdpi/ic_settings_white_24dp.png b/sample/src/main/res/drawable-hdpi/ic_settings_white_24dp.png
deleted file mode 100644
index 97ded33..0000000
Binary files a/sample/src/main/res/drawable-hdpi/ic_settings_white_24dp.png and /dev/null differ
diff --git a/sample/src/main/res/drawable-mdpi/ic_settings_white_24dp.png b/sample/src/main/res/drawable-mdpi/ic_settings_white_24dp.png
deleted file mode 100644
index 8909c35..0000000
Binary files a/sample/src/main/res/drawable-mdpi/ic_settings_white_24dp.png and /dev/null differ
diff --git a/sample/src/main/res/drawable-nodpi/img_default.png b/sample/src/main/res/drawable-nodpi/img_default.png
deleted file mode 100644
index b839451..0000000
Binary files a/sample/src/main/res/drawable-nodpi/img_default.png and /dev/null differ
diff --git a/sample/src/main/res/drawable-v21/ic_settings_white_24dp.xml b/sample/src/main/res/drawable-v21/ic_settings_white_24dp.xml
deleted file mode 100644
index 23e711e..0000000
--- a/sample/src/main/res/drawable-v21/ic_settings_white_24dp.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
diff --git a/sample/src/main/res/drawable-v21/img_default.xml b/sample/src/main/res/drawable-v21/img_default.xml
deleted file mode 100644
index a8eb853..0000000
--- a/sample/src/main/res/drawable-v21/img_default.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
diff --git a/sample/src/main/res/drawable-xhdpi/ic_settings_white_24dp.png b/sample/src/main/res/drawable-xhdpi/ic_settings_white_24dp.png
deleted file mode 100644
index 5caedc8..0000000
Binary files a/sample/src/main/res/drawable-xhdpi/ic_settings_white_24dp.png and /dev/null differ
diff --git a/sample/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png b/sample/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png
deleted file mode 100644
index eabb0a2..0000000
Binary files a/sample/src/main/res/drawable-xxhdpi/ic_settings_white_24dp.png and /dev/null differ
diff --git a/sample/src/main/res/drawable-xxxhdpi/ic_settings_white_24dp.png b/sample/src/main/res/drawable-xxxhdpi/ic_settings_white_24dp.png
deleted file mode 100644
index 507c5ed..0000000
Binary files a/sample/src/main/res/drawable-xxxhdpi/ic_settings_white_24dp.png and /dev/null differ
diff --git a/sample/src/main/res/drawable/img_empty.xml b/sample/src/main/res/drawable/img_empty.xml
deleted file mode 100644
index 13c93d2..0000000
--- a/sample/src/main/res/drawable/img_empty.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/sample/src/main/res/layout/sample_activity.xml b/sample/src/main/res/layout/sample_activity.xml
deleted file mode 100644
index 0fd0b51..0000000
--- a/sample/src/main/res/layout/sample_activity.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
diff --git a/sample/src/main/res/menu/sample.xml b/sample/src/main/res/menu/sample.xml
deleted file mode 100644
index f14a99f..0000000
--- a/sample/src/main/res/menu/sample.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-