From da330199d34ab6451b3ea5ff29588946a3d62f8c Mon Sep 17 00:00:00 2001 From: Shubham Tyagi Date: Sat, 2 Feb 2019 21:27:52 +0530 Subject: [PATCH] code cleanup --- .gitignore | 13 +- LICENSE | 684 +--------------- README.md | 13 +- _config.yml | 1 - app/.gitignore | 73 ++ app/build.gradle | 17 +- app/src/main/AndroidManifest.xml | 16 +- .../main/java/ai/loko/hk/ui/MainActivity.java | 97 +-- .../ai/loko/hk/ui/activities/Forground.java | 50 -- .../ui/activities/ListItemSwipeListener.java | 68 -- .../ui/activities/ListItemTouchListener.java | 67 -- .../hk/ui/activities/ProfileActivity.java | 8 +- .../loko/hk/ui/activities/ProfileAdapter.java | 76 -- .../java/ai/loko/hk/ui/activities/Test.java | 199 ----- .../ai/loko/hk/ui/answers/FindAnswers.java | 591 -------------- .../ai/loko/hk/ui/answers/WikiSearch.java | 89 --- .../ai/loko/hk/ui/constants/Constant.java | 9 +- .../loko/hk/ui/notification/IDReceiver.java | 46 -- .../notification/MyNotificationService.java | 105 --- .../hk/ui/notification/NotificationUtils.java | 182 ----- .../java/ai/loko/hk/ui/utils/CustomToast.java | 4 +- .../main/java/ai/loko/hk/ui/utils/Utils.java | 33 - .../java/ai/loko/hk/ui/view/BoxListener.java | 105 --- .../main/java/ai/loko/hk/ui/view/BoxView.java | 68 -- app/src/main/res/layout/box_view.xml | 13 - .../res/mipmap-hdpi/ic_launcher_round.png | Bin 3108 -> 0 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 1992 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 4483 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 7086 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 10400 -> 0 bytes app/src/main/res/values/attrs_box_view.xml | 8 - app/src/main/res/values/strings.xml | 2 +- build.gradle | 5 +- crashreporter/build.gradle | 30 +- crashreporter/src/main/AndroidManifest.xml | 36 +- .../crashreporter/CrashReporter.java | 30 +- .../CrashReporterInitProvider.java | 28 + .../adapter/CrashLogAdapter.java | 29 +- .../adapter/MainPagerAdapter.java | 28 + .../crashreporter/ui/CrashLogFragment.java | 28 + .../ui/CrashReporterActivity.java | 28 + .../ui/ExceptionLogFragment.java | 34 +- .../crashreporter/ui/LogMessageActivity.java | 6 +- .../crashreporter/utils/AppUtils.java | 61 +- .../crashreporter/utils/Constants.java | 28 + .../utils/CrashReporterException.java | 28 + .../utils/CrashReporterExceptionHandler.java | 28 + .../CrashReporterNotInitializedException.java | 28 + .../crashreporter/utils/CrashUtil.java | 29 +- .../crashreporter/utils/FileUtils.java | 28 + .../utils/SimplePageChangeListener.java | 36 +- .../drawable-v24/ic_launcher_foreground.xml | 6 +- .../res/drawable/ic_launcher_background.xml | 6 +- .../drawable/ic_menu_delete_white_24dp.xml | 36 +- .../res/drawable/ic_menu_share_white_24dp.xml | 36 +- .../res/drawable/ic_search_white_24dp.xml | 28 + .../main/res/drawable/ic_send_white_24dp.xml | 19 +- .../res/drawable/ic_warning_black_24dp.xml | 28 + .../main/res/layout/activity_log_message.xml | 52 +- .../src/main/res/layout/activity_main.xml | 6 +- .../src/main/res/layout/crash_log.xml | 34 +- .../res/layout/crash_reporter_activity.xml | 54 +- .../src/main/res/layout/custom_item.xml | 54 +- .../src/main/res/layout/exception_log.xml | 34 +- .../src/main/res/menu/crash_detail_menu.xml | 14 +- .../src/main/res/menu/log_main_menu.xml | 44 +- .../res/mipmap-anydpi-v26/ic_launcher.xml | 6 +- .../mipmap-anydpi-v26/ic_launcher_round.xml | 6 +- crashreporter/src/main/res/values/colors.xml | 28 + crashreporter/src/main/res/values/strings.xml | 28 + crashreporter/src/main/res/values/styles.xml | 28 + gradle.properties | 4 +- gradle/wrapper/gradle-wrapper.properties | 4 +- logo/Main-128.png | Bin 5506 -> 0 bytes logo/Main-192.png | Bin 7067 -> 0 bytes logo/Main-64.png | Bin 4233 -> 0 bytes logo/Main-92.png | Bin 4885 -> 0 bytes logo/Trivia Hack.svg | 729 ------------------ logo/hmain-1.png | Bin 9203 -> 0 bytes logo/hmain-2.png | Bin 11924 -> 0 bytes logo/hmain-3.png | Bin 17158 -> 0 bytes logo/new | 1 - logo/vmain-1.png | Bin 7335 -> 0 bytes logo/vmain-2.png | Bin 9422 -> 0 bytes logo/vmain-3.png | Bin 11942 -> 0 bytes privacy.md | 15 - settings.gradle | 28 + 87 files changed, 1128 insertions(+), 3385 deletions(-) delete mode 100644 _config.yml delete mode 100644 app/src/main/java/ai/loko/hk/ui/activities/Forground.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/activities/ListItemSwipeListener.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/activities/ListItemTouchListener.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/activities/ProfileAdapter.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/activities/Test.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/answers/FindAnswers.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/answers/WikiSearch.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/notification/IDReceiver.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/notification/MyNotificationService.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/notification/NotificationUtils.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/view/BoxListener.java delete mode 100644 app/src/main/java/ai/loko/hk/ui/view/BoxView.java delete mode 100644 app/src/main/res/layout/box_view.xml delete mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png delete mode 100644 app/src/main/res/values/attrs_box_view.xml delete mode 100644 logo/Main-128.png delete mode 100644 logo/Main-192.png delete mode 100644 logo/Main-64.png delete mode 100644 logo/Main-92.png delete mode 100644 logo/Trivia Hack.svg delete mode 100644 logo/hmain-1.png delete mode 100644 logo/hmain-2.png delete mode 100644 logo/hmain-3.png delete mode 100644 logo/new delete mode 100644 logo/vmain-1.png delete mode 100644 logo/vmain-2.png delete mode 100644 logo/vmain-3.png delete mode 100644 privacy.md diff --git a/.gitignore b/.gitignore index 0f3275f..25a3b1f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ *.iml .gradle -/local.properties -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml +.idea .DS_Store /build /captures @@ -12,8 +9,10 @@ *.apk *.ap_ +*.properties # Files for the ART/Dalvik VM *.dex +keystore.properties # Java class files *.class @@ -22,6 +21,8 @@ bin/ gen/ out/ +app/betaVersion +app/release # Gradle files .gradle/ @@ -51,7 +52,6 @@ captures/ .idea/dictionaries .idea/libraries .idea/caches -.idea # Keystore files # Uncomment the following line if you do not want to check your keystore files in. @@ -83,6 +83,3 @@ fastlane/readme.md /build /captures .externalNativeBuild -.gitlab-ci.yml -._config.yml - diff --git a/LICENSE b/LICENSE index 94a9ed0..fb06ac9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,10 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. 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 -them 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 prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. 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. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey 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; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If 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 convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU 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 that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - 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. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -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. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +THIS APP IS DEVELOPED BY SHUBHAM TYAGI + +THIS IS COPY LEFT UNTIL YOU ARE ON FOLLOWING TERMS +I disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** diff --git a/README.md b/README.md index 1c545e4..b17b8cb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ -# Trivia hack [![licence](https://img.shields.io/badge/Licence-GPLv3-red.svg)](https://github.com/SubhamTyagi/loco-answers/blob/master/LICENSE) ![version](https://img.shields.io/badge/Version-2.0-green.svg) -![Banner](/.github/assets/triviahack.png?raw=true "Banner") + +[![licence](https://img.shields.io/badge/Licence-GPLv3-red.svg)](https://github.com/SubhamTyagi/loco-answers/blob/master/LICENSE) +![version](https://img.shields.io/badge/Version-2.0-green.svg) + + +# Trivia hack * A free, 100 % open source, ads free trivia helper app that respect user sentiments. * Previously Known as LoKo HacK @@ -31,9 +35,8 @@ 10. Swag IQ ## Contribution -* [Shubham Tyagi](https://subhamtyagi.github.io/). -* New icon is designed by [Deb Pedrano](https://github.com/debpedrano) -* Valid Pull request always accepted. +* [Shubham Tyagi](https://subhamtyagi.github.io/) and his supporter +* Contributions accepted(always) ## Screenshots | HOME | PROFILE | diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c419263..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore index 796b96d..0da7183 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1,74 @@ +# Built application files +*.apk +*.ap_ + +# Files for the ART/Dalvik VM +*.dex + +# Java class files +*.class + +# Generated files +bin/ +gen/ +out/ + +# Gradle files +.gradle/ +build/ + +# Local configuration file (sdk path, etc) +local.properties + +# Proguard folder generated by Eclipse +proguard/ + +# Log Files +*.log + +# Android Studio Navigation editor temp files +.navigation/ + +# Android Studio captures folder +captures/ + +# IntelliJ +*.iml +.idea/workspace.xml +.idea/tasks.xml +.idea/gradle.xml +.idea/assetWizardSettings.xml +.idea/dictionaries +.idea/libraries +.idea/caches + +# Keystore files +# Uncomment the following line if you do not want to check your keystore files in. +#*.jks + +# External native build folder generated in Android Studio 2.2 and later +.externalNativeBuild + +# Google Services (e.g. APIs or Firebase) +google-services.json + +# Freeline +freeline.py +freeline/ +freeline_project_description.json + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output +fastlane/readme.md +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store /build +/captures +.externalNativeBuild \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 6dd2b91..be1ca65 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,7 +27,7 @@ */ apply plugin: 'com.android.application' -apply plugin: 'io.fabric' + /* def keystorePropertiesFile = rootProject.file("keystore.properties") @@ -50,8 +50,8 @@ android { applicationId "ai.loko.hk.ui" minSdkVersion 19 //19 targetSdkVersion 28 - versionCode 26 - versionName '2.2.1' + versionCode 27 + versionName '2.2.2' multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" versionNameSuffix '-capybara' @@ -102,14 +102,9 @@ dependencies { implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' + implementation 'com.google.android.gms:play-services-vision:17.0.2' - implementation 'com.google.firebase:firebase-core:16.0.4' - implementation 'com.google.firebase:firebase-crash:16.2.1' - implementation 'com.google.firebase:firebase-messaging:17.3.4' - implementation 'com.google.firebase:firebase-config:16.1.0' - implementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') { - transitive = true; - } + def room_version = "1.1.1" implementation "android.arch.persistence.room:runtime:$room_version" annotationProcessor "android.arch.persistence.room:compiler:$room_version" @@ -137,4 +132,4 @@ dependencies { gradle.taskGraph.whenReady { setOutputName }*/ -apply plugin: 'com.google.gms.google-services' + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 80ce739..ae58b57 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -42,7 +42,7 @@ - - - - - - - - - - - - () { + rightBmb.addBuilder(new HamButton.Builder().normalImageRes(R.drawable.ic_directions_run_black_24dp).subNormalText("Click here to go to github release page").normalText("Update.").listener(new OnBMClickListener() { @Override - public void onComplete(@NonNull Task task) { - if (task.isSuccessful()) - mFirebaseRemoteConfig.activateFetched(); - + public void onBoomButtonClick(int index) { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/SubhamTyagi/loco-answers/releases/"))); } - }); - - int latest = Integer.valueOf(mFirebaseRemoteConfig.getString(Constant.LATEST)); - if (latest - Constant.VERSION > 1) { - - new SweetAlertDialog(this, SweetAlertDialog.NORMAL_TYPE) - .setTitleText("New update is available") - .setContentText("Kindly update the app, Some problems are fixed and accuracy is extremely improved and much more.. ") - .setConfirmText("Update now") - .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() { - @Override - public void onClick(SweetAlertDialog sweetAlertDialog) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/SubhamTyagi/loco-answers/releases/"))); - sweetAlertDialog.dismissWithAnimation(); - } - }).show(); - } else if (latest > Constant.VERSION) { - new SweetAlertDialog(this, SweetAlertDialog.NORMAL_TYPE) - .setTitleText("New update is available") - .setContentText("Kindly update the app, Some problems are fixed and accuracy is extremely improved and much more.. ") - .setConfirmText("Update now") - .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() { - @Override - public void onClick(SweetAlertDialog sweetAlertDialog) { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/SubhamTyagi/loco-answers/releases/"))); - - } - }) - .setCancelText("Later") - .setCancelClickListener(new SweetAlertDialog.OnSweetClickListener() { - @Override - public void onClick(SweetAlertDialog sweetAlertDialog) { - sweetAlertDialog.dismissWithAnimation(); - } - }) - .show(); - } + })); } private boolean isServiceRunning(Class serviceClass) { @@ -427,7 +351,7 @@ protected void onResume() { private void about() { new SweetAlertDialog(this, SweetAlertDialog.NORMAL_TYPE) .setTitleText("Trivia Hack VERSION " + Constant.VERSION_NAME) - .setContentText("Trivia Hack " + Constant.VERSION_NAME) + .setContentText("This app is free and open source hosted on GitHub") .setConfirmText("Ok") .setConfirmClickListener(new SweetAlertDialog.OnSweetClickListener() { @Override @@ -454,6 +378,7 @@ public void onClick(SweetAlertDialog sweetAlertDialog) { }).show(); } + @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { //if () diff --git a/app/src/main/java/ai/loko/hk/ui/activities/Forground.java b/app/src/main/java/ai/loko/hk/ui/activities/Forground.java deleted file mode 100644 index 54af475..0000000 --- a/app/src/main/java/ai/loko/hk/ui/activities/Forground.java +++ /dev/null @@ -1,50 +0,0 @@ -package ai.loko.hk.ui.activities; - -import android.app.Activity; -import android.app.ActivityManager; -import android.content.Context; -import android.os.Bundle; - -import ai.loko.hk.ui.Accessibility; - -/** - * The type Forground. - */ -public class Forground extends Activity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - requestWindowFeature(1); - finish(); - } - - private boolean isServiceRunning() { - Class serviceClass = Accessibility.class; - ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); - for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) { - if (serviceClass.getName().equals(service.service.getClassName())) { - return true; - } - } - return false; - } - - @Override - protected void onResume() { - super.onResume(); - finish(); - } - - @Override - protected void onPause() { - super.onPause(); - //finish(); - - } - - @Override - protected void onDestroy() { - super.onDestroy(); - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/activities/ListItemSwipeListener.java b/app/src/main/java/ai/loko/hk/ui/activities/ListItemSwipeListener.java deleted file mode 100644 index 2b81871..0000000 --- a/app/src/main/java/ai/loko/hk/ui/activities/ListItemSwipeListener.java +++ /dev/null @@ -1,68 +0,0 @@ -package ai.loko.hk.ui.activities; - - -import android.graphics.Canvas; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; -import android.view.View; - class ListItemSwipeListener extends ItemTouchHelper.SimpleCallback { - private RecyclerItemTouchHelperListener listener; - - public ListItemSwipeListener(int dragDirs, int swipeDirs, RecyclerItemTouchHelperListener listener) { - super(dragDirs, swipeDirs); - this.listener = listener; - } - - @Override - public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { - return true; - } - - @Override - public void onSelectedChanged(RecyclerView.ViewHolder viewHolder, int actionState) { - if (viewHolder != null) { - final View foregroundView = ((ProfileAdapter.MyViewHolder) viewHolder).viewForeground; - - getDefaultUIUtil().onSelected(foregroundView); - } - } - - @Override - public void onChildDrawOver(Canvas c, RecyclerView recyclerView, - RecyclerView.ViewHolder viewHolder, float dX, float dY, - int actionState, boolean isCurrentlyActive) { - final View foregroundView = ((ProfileAdapter.MyViewHolder) viewHolder).viewForeground; - getDefaultUIUtil().onDrawOver(c, recyclerView, foregroundView, dX, dY, - actionState, isCurrentlyActive); - } - - @Override - public void clearView(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) { - final View foregroundView = ((ProfileAdapter.MyViewHolder) viewHolder).viewForeground; - getDefaultUIUtil().clearView(foregroundView); - } - - @Override - public void onChildDraw(Canvas c, RecyclerView recyclerView, - RecyclerView.ViewHolder viewHolder, float dX, float dY, - int actionState, boolean isCurrentlyActive) { - final View foregroundView = ((ProfileAdapter.MyViewHolder) viewHolder).viewForeground; - - getDefaultUIUtil().onDraw(c, recyclerView, foregroundView, dX, dY, - actionState, isCurrentlyActive); - } - - @Override - public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) { - listener.onSwiped(viewHolder, direction, viewHolder.getAdapterPosition()); - } - - @Override - public int convertToAbsoluteDirection(int flags, int layoutDirection) { - return super.convertToAbsoluteDirection(flags, layoutDirection); - } - - public interface RecyclerItemTouchHelperListener { - void onSwiped(RecyclerView.ViewHolder viewHolder, int direction, int position); - } -} \ No newline at end of file diff --git a/app/src/main/java/ai/loko/hk/ui/activities/ListItemTouchListener.java b/app/src/main/java/ai/loko/hk/ui/activities/ListItemTouchListener.java deleted file mode 100644 index bf6feb2..0000000 --- a/app/src/main/java/ai/loko/hk/ui/activities/ListItemTouchListener.java +++ /dev/null @@ -1,67 +0,0 @@ -package ai.loko.hk.ui.activities; - -import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; -import android.view.GestureDetector; -import android.view.MotionEvent; -import android.view.View; - -class ListItemTouchListener implements RecyclerView.OnItemTouchListener { - private GestureDetector gestureDetector; - private ClickListener clickListener; - - - - - - - public ListItemTouchListener(Context context, final RecyclerView recyclerView, final ClickListener clickListener) { - - this.clickListener = clickListener; - gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { - @Override - public boolean onSingleTapUp(MotionEvent e) { - return true; - } - - @Override - public void onLongPress(MotionEvent e) { - View child = recyclerView.findChildViewUnder(e.getX(), e.getY()); - if (child != null && clickListener != null) { - clickListener.onClick(child, recyclerView.getChildPosition(child)); - } - } - }); - } - - - @Override - public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) { - - View child = rv.findChildViewUnder(e.getX(), e.getY()); - if (child != null && clickListener != null && gestureDetector.onTouchEvent(e)) { - clickListener.onClick(child, rv.getChildPosition(child)); - } - return false; - } - - @Override - public void onTouchEvent(@NonNull RecyclerView recyclerView, @NonNull MotionEvent motionEvent) { - - } - - @Override - public void onRequestDisallowInterceptTouchEvent(boolean b) { - - } - - - public interface ClickListener { - void onClick(View view, int position); - - void onLongClick(View view, int position); - } - -} diff --git a/app/src/main/java/ai/loko/hk/ui/activities/ProfileActivity.java b/app/src/main/java/ai/loko/hk/ui/activities/ProfileActivity.java index 9765776..9d34bf2 100644 --- a/app/src/main/java/ai/loko/hk/ui/activities/ProfileActivity.java +++ b/app/src/main/java/ai/loko/hk/ui/activities/ProfileActivity.java @@ -35,6 +35,7 @@ import android.content.pm.PackageManager; import android.media.projection.MediaProjectionManager; import android.net.Uri; +import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.provider.Settings; @@ -69,7 +70,7 @@ import ai.loko.hk.ui.ocr.Points; import ai.loko.hk.ui.services.OCRFloating; import cn.pedant.SweetAlert.SweetAlertDialog; -import io.fabric.sdk.android.services.concurrency.AsyncTask; + import ui.R; @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) @@ -79,9 +80,12 @@ public class ProfileActivity extends AppCompatActivity implements ListItemSwipeL private static final int storageReadPermission = 412; private final String TAG = "ProfileActivity"; List profiles = new ArrayList<>(); + private CoordinatorLayout coordinatorLayout; + private RecyclerView mRecyclerView; private ProfileAdapter mProfileAdapter; + private AppDatabase db; private MediaProjectionManager mMediaProjectionManager; private Intent mScreenshotIntent; @@ -262,7 +266,7 @@ public void onClick(View view) { } private void setUpDataFromDB() { - new AsyncTask() { + new AsyncTask() { @Override protected Void doInBackground(Void... voids) { List profileEntities = db.profileDAO().getAll(); diff --git a/app/src/main/java/ai/loko/hk/ui/activities/ProfileAdapter.java b/app/src/main/java/ai/loko/hk/ui/activities/ProfileAdapter.java deleted file mode 100644 index cd70c06..0000000 --- a/app/src/main/java/ai/loko/hk/ui/activities/ProfileAdapter.java +++ /dev/null @@ -1,76 +0,0 @@ -package ai.loko.hk.ui.activities; - -import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.RelativeLayout; -import android.widget.TextView; - -import java.util.List; - -import ai.loko.hk.ui.model.Profile; -import ui.R; - -class ProfileAdapter extends RecyclerView.Adapter { - - private List profileList; - - private Context context; - - public ProfileAdapter(Context context, List profileList) { - this.profileList = profileList; - this.context = context; - } - - @NonNull - @Override - public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { - View viewItem = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.profile_list_item, viewGroup, false); - return new MyViewHolder(viewItem); - } - - - @Override - public void onBindViewHolder(@NonNull MyViewHolder holder, int i) { - Profile profile = profileList.get(i); - holder.profileName.setText(profile.getName()); - holder.profileX1.setText(Float.toString(profile.getX1())); - holder.profileX2.setText(Float.toString(profile.getX2())); - holder.profileY1.setText(Float.toString(profile.getY1())); - holder.profileY2.setText(Float.toString(profile.getY2())); - } - - @Override - public int getItemCount() { - return profileList.size(); - } - - public void removeProfile(int position) { - profileList.remove(position); - notifyItemRemoved(position); - } - - public void restoreProfile(Profile profile, int position) { - profileList.add(position, profile); - notifyItemInserted(position); - } - - public class MyViewHolder extends RecyclerView.ViewHolder { - public RelativeLayout viewBackground, viewForeground; - TextView profileName, profileX1, profileY1, profileX2, profileY2; - - public MyViewHolder(@NonNull View itemView) { - super(itemView); - profileName = itemView.findViewById(R.id.profile_name); - profileX1 = itemView.findViewById(R.id.profile_x1); - profileY1 = itemView.findViewById(R.id.profile_y1); - profileX2 = itemView.findViewById(R.id.profile_x2); - profileY2 = itemView.findViewById(R.id.profile_y2); - viewBackground = itemView.findViewById(R.id.view_background); - viewForeground = itemView.findViewById(R.id.view_foreground); - } - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/activities/Test.java b/app/src/main/java/ai/loko/hk/ui/activities/Test.java deleted file mode 100644 index 07a859f..0000000 --- a/app/src/main/java/ai/loko/hk/ui/activities/Test.java +++ /dev/null @@ -1,199 +0,0 @@ -package ai.loko.hk.ui.activities; - -import android.graphics.Color; -import android.os.AsyncTask; -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.util.Log; -import android.view.View; -import android.widget.EditText; -import android.widget.TextView; - -import java.util.Random; - -import ai.loko.hk.ui.answers.Engine; -import ai.loko.hk.ui.data.Which; -import ai.loko.hk.ui.model.Question; -import ai.loko.hk.ui.utils.CustomToast; -import ai.myfancy.button.iml.ActionProcessButton; -import ui.R; - -public class Test extends AppCompatActivity { - private static final String TAG="Test"; - - String qu = "Who wrote the poem \"O Captain! My Captain!\"?"; - String o1 = "William Shakespeare"; - String o2 = "Walt Whitman"; - String o3 = "Sarah Palin"; - - String[] quA = {"Who wrote the poem \"O Captain! My Captain!\"?", "Which one of these Japanese alcoholic drinks is made from rice, yams and wear or brown sugar?", "Bogota is the high altitude capital of which country?", "The Trout Memo was an espionage guidebook written by what British author during WWII?", "What was Mohammed Ali’s birth name?", "Which planet is the closest to Earth?"}; - String[] o1A = {"William Shakespeare", "Umeshu", "Colombia", "Adolf Hitler", "Umayyad", "Venus"}; - String[] o2A = {"Walt Whitman", "Shochu", "Cuba", "Ian Fleming", "Muhammad bin qasim", "Mars"}; - String[] o3A = {"Sarah Palin", "Chubai", "Peru", "John F. Kennedy", "Cassius Clay", "mercury"}; - - - TextView a1, b2, c3; - EditText q, a, b, c; - - ActionProcessButton wiki, google; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_test); - a1 = findViewById(R.id.optionAtest); - b2 = findViewById(R.id.optionBtest); - c3 = findViewById(R.id.optionCtest); - - wiki = findViewById(R.id.wiki1); - google = findViewById(R.id.getanswer1); - google.setMode(ActionProcessButton.Mode.ENDLESS); - wiki.setMode(ActionProcessButton.Mode.ENDLESS); - - - new CustomToast(this, "In future this will be used for AI learning").setDuration(1).show(); - q = findViewById(R.id.q_test); - a = findViewById(R.id.a_test); - b = findViewById(R.id.b_test); - c = findViewById(R.id.c_test); - - q.setText(qu); - a.setText(o1); - b.setText(o2); - c.setText(o3); - - wiki.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Which.itIsGoogle = false; - Which.isWikiDone = false; - wiki.setProgress(1); - - a1.setText(""); - b2.setText(""); - c3.setText(""); - - Random random = new Random(System.currentTimeMillis()); - int index = random.nextInt(5); - qu = quA[index]; - o1 = o1A[index]; - o2 = o2A[index]; - o3 = o3A[index]; - - q.setText(qu); - a.setText(o1); - b.setText(o2); - c.setText(o3); - - if (q.getText().toString().length() > 0) { - qu = q.getText().toString(); - } - if (a.getText().toString().length() > 0) { - o1 = a.getText().toString(); - } - if (b.getText().toString().length() > 0) { - o2 = b.getText().toString(); - } - if (c.getText().toString().length() > 0) { - o3 = c.getText().toString(); - } - new Update().execute("save this to AI database"); - } - }); - - google.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - Which.itIsGoogle = true; - google.setProgress(1); - - a1.setText(""); - b2.setText(""); - c3.setText(""); - - Random random = new Random(System.currentTimeMillis()); - int index = random.nextInt(5); - qu = quA[index]; - o1 = o1A[index]; - o2 = o2A[index]; - o3 = o3A[index]; - - q.setText(qu); - a.setText(o1); - b.setText(o2); - c.setText(o3); - - if (q.getText().toString().length() > 0) { - qu = q.getText().toString(); - } - if (a.getText().toString().length() > 0) { - o1 = a.getText().toString(); - } - if (b.getText().toString().length() > 0) { - o2 = b.getText().toString(); - } - if (c.getText().toString().length() > 0) { - o3 = c.getText().toString(); - } - new Update().execute("checking AI>Who are you"); - } - }); - - - } - - private class Update extends AsyncTask { - // FindAnswers obj; - Engine obj; - - @Override - protected void onPostExecute(String s) { - super.onPostExecute(s); - //ans.setText(s); - - Log.d(TAG, "Option 1==>"+obj.getA1()); - Log.d(TAG, "Option 2==>"+obj.getB2()); - Log.d(TAG, "Option 3==>"+obj.getC3()); - - a1.setText(obj.getA1()); - b2.setText(obj.getB2()); - c3.setText(obj.getC3()); - - wiki.setProgress(0); - google.setProgress(0); - switch (s) { - case "a": - a1.setTextColor(Color.RED); - b2.setTextColor(Color.BLACK); - c3.setTextColor(Color.BLACK); - break; - case "b": - b2.setTextColor(Color.RED); - c3.setTextColor(Color.BLACK); - a1.setTextColor(Color.BLACK); - break; - case "c": - c3.setTextColor(Color.RED); - a1.setTextColor(Color.BLACK); - b2.setTextColor(Color.BLACK); - break; - } - } - - @Override - protected void onProgressUpdate(Void... values) { - super.onProgressUpdate(values); - } - - @Override - protected String doInBackground(String... strings) { - obj = new Engine(new Question(qu, o1, o2, o3)); - return obj.search(); - - // obj = new FindAnswers(qu, o1, o2, o3); - //obj.search(); - //return obj.getOptionRed(); - //return obj.getAnswer(); - } - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/answers/FindAnswers.java b/app/src/main/java/ai/loko/hk/ui/answers/FindAnswers.java deleted file mode 100644 index cc42a58..0000000 --- a/app/src/main/java/ai/loko/hk/ui/answers/FindAnswers.java +++ /dev/null @@ -1,591 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.answers; - - -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; - -import java.net.URLEncoder; -import java.util.ArrayList; - -import ai.loko.hk.ui.data.Data; -import ai.loko.hk.ui.data.Which; -import ai.loko.hk.ui.utils.Logger; - -import static ai.loko.hk.ui.data.Data.skip; -import static ai.loko.hk.ui.utils.Utils.count; -import static ai.loko.hk.ui.utils.Utils.getSimplifiedQuestion; -import static ai.loko.hk.ui.utils.Utils.getSimplifiedString; -import static ai.loko.hk.ui.utils.Utils.stringToArrayList; - - -/** - * The type Find answers. - */ -@Deprecated -public class FindAnswers extends Which { - - // private static String TAG = "FindAnswers"; - // private final Context context; - private final String A; - final private String B; - final private String C; - //Answer current; - //private boolean checkForNegative; - //private boolean wikiDone; - //static boolean isOcr; - private boolean error; - private StringBuilder A1, B2, C3; - private String question; - private int a = 0, b = 0, c = 0; - private String optionRed; - - private int aSize, bSize, cSize; - - /** - * Instantiates a new Find answers. - * - * @param question the question - * @param optionA the option a - * @param optionB the option b - * @param optionC the option c - */ - @Deprecated - public FindAnswers(String question, String optionA, String optionB, String optionC) { - A = optionA.toLowerCase(); - B = optionB.toLowerCase(); - C = optionC.toLowerCase(); - - // init(); - // if (question.contains("?")) { - // this.question = question.substring(0, question.length() - 1).toLowerCase(); - // } else - - this.question = question.toLowerCase(); - error = false; - checkForNegative = true; - isWikiDone = false; - } - - private void init() { - A1 = new StringBuilder(); - B2 = new StringBuilder(); - C3 = new StringBuilder(); - } - - /** - * Gets option red. - * - * @return the option red - */ - public String getOptionRed() { - return optionRed; - } - - /** - * Is error boolean. - * - * @return the boolean - */ - public boolean isError() { - return error; - } - - /** - * Gets acount. - * - * @return the acount - */ - public String getAcount() { - return A1.toString(); - - } - - /** - * Gets bcount. - * - * @return the bcount - */ - public String getBcount() { - return B2.toString(); - } - - /** - * Gets ccount. - * - * @return the ccount - */ - public String getCcount() { - return C3.toString(); - - } - - /* - public String search() { - *//* if (A.contains("-")) { - if (B.contains("-") && C.contains("-")) { - - // Log.d(TAG, "search: paired question"); - // this time it is not handling properly pair question - return pairGoogleSearch(); - - } else return googleSearch(); - }*//* - return googleSearch(); - }*/ - - - private String pairGoogleSearch() { - boolean isNeg; - a = b = c = 0; - int p, q, r; - init(); - try { - isNeg = stringToArrayList(question).removeAll(Data.removeNegativeWords); - if (isNeg) { - ArrayList simplifiedQuestion = getSimplifiedQuestion(question, 1);//1 means negative words remove - StringBuilder stringBuilder = new StringBuilder(); - for (String s : simplifiedQuestion) { - stringBuilder.append(s).append(" "); - } - this.question = stringBuilder.toString(); - // Log.d(TAG, "negative question"); - } - - String simplifiedQuestion = getSimplifiedString(question, null); - ///Log.d(TAG, "simplified question is===" + simplifiedQuestion); - - String sub1 = A.substring(0, A.indexOf("-")); - String sub2 = B.substring(0, B.indexOf("-")); - String sub3 = C.substring(0, C.indexOf("-")); - - // Log.d(TAG, "option1 prefix==" + sub1); - // Log.d(TAG, "option2 prefix==" + sub2); - // Log.d(TAG, "option3 prefix==" + sub3); - - - Document doc = Jsoup.connect(Data.BASE_SEARCH_URL + URLEncoder.encode(sub1 + " " + simplifiedQuestion, "UTF-8") + "&num=10").userAgent(Data.USER_AGENT).get(); - String text1 = doc.body().text().toLowerCase(); - - A1.append(sub1).append("-"); - B2.append(sub2).append("-"); - C3.append(sub3).append("-"); - - sub1 = A.substring(A.indexOf("-") + 1); - //Log.d(TAG, "final option is " + sub1); - String optionA[] = sub1.split(" "); - aSize = optionA.length; - - for (String words : optionA) { - if (!skip.contains(words)) { - p = count(words, text1); - a += p; - A1.append(words).append("(").append(p).append(") "); - } else { - A1.append(words).append(" "); - } - } - - doc = Jsoup.connect(Data.BASE_SEARCH_URL + URLEncoder.encode(sub2 + " " + simplifiedQuestion, "UTF-8") + "&num=10").userAgent(Data.USER_AGENT).get(); - String text2 = doc.body().text().toLowerCase(); - - sub2 = B.substring(B.indexOf("-") + 1); - // Log.d(TAG, "final option is " + sub2); - String optionB[] = sub2.split(" "); - bSize = optionB.length; - - for (String words : optionB) { - if (!skip.contains(words)) { - q = count(words, text2); - b += q; - B2.append(words).append("(").append(q).append(") "); - } else { - B2.append(words).append(" "); - } - } - - - sub3 = C.substring(C.indexOf("-") + 1); - // Log.d(TAG, "final option is " + sub3); - String optionC[] = sub3.split(" "); - cSize = optionC.length; - - doc = Jsoup.connect(Data.BASE_SEARCH_URL + URLEncoder.encode(sub3 + " " + simplifiedQuestion, "UTF-8") + "&num=10").userAgent(Data.USER_AGENT).get(); - String text3 = doc.body().text().toLowerCase(); - - for (String words : optionC) { - if (!skip.contains(words)) { - r = count(words, text3); - c += r; - C3.append(words).append("(").append(r).append(") "); - } else { - C3.append(words).append(" "); - } - } - - p = a; - q = b; - r = c; - - if (aSize != 1) - a = count(sub1.trim(), text1); - if (bSize != 1) - b = count(sub2.trim(), text2); - if (cSize != 1) - c = count(sub3.trim(), text3); - if (a == b && b == c) { - a = p; - b = q; - c = r; - } - A1.append("=(").append(a).append(")"); - B2.append("=(").append(b).append(")"); - C3.append("=(").append(c).append(")"); - - if (!isNeg) { - if (a > b) { - if (c > a) { - //c ic greater c>a>b - //answer = C; - // max = c; - optionRed = "c"; - } else { - //a is greater a>c>b - //answer = A; - // max = a; - optionRed = "a"; - } - } else if (b > c) {//b is gerater than a check for c and b b>c>a - //answer = B; - ///max = b; - optionRed = "b"; - } else { // c is greater c>b>a - //answer = C; - //max = c; - optionRed = "c"; - - } - - } else { - if (a < b) { - if (c < a) { - //c is most least - //answer = C; - // max = c; - optionRed = "c"; - } else { - //a is most least - // answer = A; - /// max = a; - optionRed = "a"; - } - } else if (b < c) { - //b is least - //answer = B; - /// max = b; - optionRed = "b"; - - } else { - //c is least - //answer = C; - ///max = c; - optionRed = "c"; - } - } - - } catch (Exception ioe) { - ioe.printStackTrace(); - Logger.logException(ioe); - // Crashlytics.log(ioe.getMessage()); - error = true; - optionRed = "b"; - return "error"; - - } - - return optionRed; - - } - - private String search() { - //int max = 0; - boolean isNeg = false; - a = b = c = 0; - int p, q, r; - init(); - - try { - if (checkForNegative) - isNeg = stringToArrayList(question).removeAll(Data.removeNegativeWords); - if (isNeg && checkForNegative) { - ArrayList simplifiedQuestion = getSimplifiedQuestion(question, 1);//1 means negative words remove - StringBuilder stringBuilder = new StringBuilder(); - for (String s : simplifiedQuestion) { - stringBuilder.append(s).append(" "); - } - this.question = stringBuilder.toString(); - } - - if (!itIsGoogle && !isWikiDone) { - //return wikiBot(isNeg); - return wikiBot(isNeg); - } - - Document doc = Jsoup.connect(Data.BASE_SEARCH_URL + URLEncoder.encode(question, "UTF-8") + "&num=30").userAgent(Data.USER_AGENT).get(); - - String text = doc.body().text().toLowerCase(); - String optionA[] = A.split(" "); - aSize = optionA.length; - - for (String words : optionA) { - if (!skip.contains(words)) { - p = count(words, text); - a += p; - A1.append(words).append("(").append(p).append(") "); - } else { - A1.append(words).append(" "); - } - } - - String optionB[] = B.split(" "); - bSize = optionB.length; - - for (String words : optionB) { - if (!skip.contains(words)) { - q = count(words, text); - b += q; - B2.append(words).append("(").append(q).append(") "); - } else { - B2.append(words).append(" "); - } - } - - String optionC[] = C.split(" "); - cSize = optionC.length; - - for (String words : optionC) { - if (!skip.contains(words)) { - r = count(words, text); - c += r; - C3.append(words).append("(").append(r).append(") "); - } else { - C3.append(words).append(" "); - } - } - - p = a; - q = b; - r = c; - // now p,q,r have commutative count - - if (aSize != 1) - a = count(A.trim(), text); - if (bSize != 1) - b = count(B.trim(), text); - if (cSize != 1) - c = count(C.trim(), text); - - if (a == b && b == c) { - a = p; - b = q; - c = r; - } - - if (a == b && b == c && !isWikiDone) { - return wikiBot(isNeg); - } - if (p != 0) - a *= p; - if (q != 0) - b *= q; - if (r != 0) - c *= r; - - //if (aSize != 1) - A1.append("=(").append(a).append(")"); - //if (bSize != 1) - B2.append("=(").append(b).append(")"); - //if (cSize != 1) - C3.append("=(").append(c).append(")"); - - if (!isNeg) { - if (a > b) { - if (c > a) { - //c ic greater c>a>b - //answer = C; - // max = c; - optionRed = "c"; - } else { - //a is greater a>c>b - //answer = A; - // max = a; - optionRed = "a"; - } - } else if (b > c) {//b is gerater than a check for c and b b>c>a - //answer = B; - ///max = b; - optionRed = "b"; - } else { // c is greater c>b>a - //answer = C; - //max = c; - optionRed = "c"; - } - } else { - if (a < b) { - if (c < a) { - //c is most least - //answer = C; - // max = c; - optionRed = "c"; - } else { - //a is most least - // answer = A; - /// max = a; - optionRed = "a"; - } - } else if (b < c) { - //b is least - //answer = B; - /// max = b; - optionRed = "b"; - - } else { - //c is least - //answer = C; - ///max = c; - optionRed = "c"; - } - } - - } catch (Exception ioe) { - ioe.printStackTrace(); - Logger.logException(ioe); - //Crashlytics.log(ioe.getMessage()); - error = true; - optionRed = "b"; - return "error"; - - } - - return optionRed; - - } - - private String wikiBot(boolean isNeg) { - //int x, y, z; - ArrayList simplifiedQuestionList = getSimplifiedQuestion(question); - String simplifiedQuestion = getSimplifiedString(question, null); - - final WikiSearch first = new WikiSearch(A, simplifiedQuestionList, simplifiedQuestion); - final WikiSearch second = new WikiSearch(B, simplifiedQuestionList, simplifiedQuestion); - final WikiSearch third = new WikiSearch(C, simplifiedQuestionList, simplifiedQuestion); - - checkForNegative = false; - isWikiDone = true; - itIsGoogle = true; - - first.start(); - second.start(); - third.start(); - - try { - third.join(); - second.join(); - first.join(); - - } catch (Exception e) { - Logger.logException(e); - } - - - a = first.recurrence; - b = second.recurrence; - c = third.recurrence; - - if (a == b && b == c) { - checkForNegative = false; - isWikiDone = true; - itIsGoogle = true; - return search(); - } - - init(); - - A1.append(A).append("=(").append(a).append(")"); - B2.append(B).append("=(").append(b).append(")"); - C3.append(C).append("=(").append(c).append(")"); - - if (!isNeg) { - if (a > b) { - if (c > a) { - optionRed = "c"; - } else { - optionRed = "a"; - } - } else if (b > c) {//b is gerater than a check for c and b b>c>a - optionRed = "b"; - } else { // c is greater c>b>a - - optionRed = "c"; - - } - } else { - if (a < b) { - if (c < a) { - //c is most least - //answer = C; - // max = c; - optionRed = "c"; - } else { - //a is most least - // answer = A; - //max = a; - optionRed = "a"; - } - } else if (b < c) { - //b is least - //answer = B; - //max = b; - optionRed = "b"; - - } else { - //c is least - //answer = C; - //max = c; - optionRed = "c"; - } - } - - return optionRed; - } - - -} - diff --git a/app/src/main/java/ai/loko/hk/ui/answers/WikiSearch.java b/app/src/main/java/ai/loko/hk/ui/answers/WikiSearch.java deleted file mode 100644 index 7ed5708..0000000 --- a/app/src/main/java/ai/loko/hk/ui/answers/WikiSearch.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.answers; - -import org.jsoup.Jsoup; -import org.jsoup.nodes.Document; - -import java.net.URLEncoder; -import java.util.ArrayList; - -import ai.loko.hk.ui.data.Data; -import ai.loko.hk.ui.utils.Logger; - -import static ai.loko.hk.ui.utils.Utils.count; -import static ai.loko.hk.ui.utils.Utils.getSimplifiedString; - -/** - * The type Wiki search. - */ -@Deprecated -class WikiSearch extends Thread { - /** - * The Recurrence. - */ -//String TAG="wiki"; - int recurrence; - private String option; - private ArrayList simplifiedQuestionList; - private String simplifiedQuestion; - - /** - * Instantiates a new Wiki search. - * - * @param option the option - * @param simplifiedQuestionList the simplified question list - * @param simplifiedQuestion the simplified question - */ - WikiSearch(String option, ArrayList simplifiedQuestionList, String simplifiedQuestion) { - this.option = option; - this.simplifiedQuestion = simplifiedQuestion; - this.simplifiedQuestionList = simplifiedQuestionList; - recurrence = 0; - } - - @Override - public void run() { - try { - Document option1wiki = Jsoup.connect(Jsoup.connect(Data.BASE_SEARCH_URL + URLEncoder.encode(simplifiedQuestion + " " + option + /* i could use inurl:wikipedia.com or site:wikipedia.com but this will easily tends to human verification */" wikipedia ", "UTF-8") + "&num=5").userAgent(Data.USER_AGENT).get().select(".g .r a[href]").get(0).absUrl("href")).userAgent(Data.USER_AGENT).get(); - String t1 = option1wiki.body().text().toLowerCase(); - String text11 = getSimplifiedString(t1, null); - for (String word : simplifiedQuestionList) { - int p = count(word, text11); - if (p != 0) { - text11.replaceAll(word, ""); - recurrence += p; - } - } - } catch (Exception e) { - Logger.logException(e); - } - } - -} \ No newline at end of file diff --git a/app/src/main/java/ai/loko/hk/ui/constants/Constant.java b/app/src/main/java/ai/loko/hk/ui/constants/Constant.java index 58b4cce..fbc398c 100644 --- a/app/src/main/java/ai/loko/hk/ui/constants/Constant.java +++ b/app/src/main/java/ai/loko/hk/ui/constants/Constant.java @@ -33,19 +33,14 @@ import ui.BuildConfig; public class Constant { - //TODO:why i am using this, Why not using BuildConfig "i don't know :)" - public static final int VERSION = 26; - public static final String VERSION_NAME = "2.2.1"; - public static final boolean DEBUG = BuildConfig.DEBUG; + + public static final String VERSION_NAME = "2.2.2"; public static final int CODE_DRAW_OVER_OTHER_APP_PERMISSION = 2084; public static final int CODE_FOR_SCREEN_CAPTURE = 1349; - public static final String LATEST = "latest"; - public static final String path = Environment.getExternalStorageDirectory() + "/TriviaHacK/"; public static final String pathToErrors = Environment.getExternalStorageDirectory() + "/TriviaHacK/errors"; public static final String pathToTesseract = Environment.getExternalStorageDirectory() + "/tesseract/tessdata/"; public static final String tesseractPath = Environment.getExternalStorageDirectory() + "/tesseract/"; - public static final String X1_FLOAT = "X1_FLOAT"; public static final String X2_FLOAT = "X2_FLOAT"; public static final String Y1_FLOAT = "Y1_FLOAT"; diff --git a/app/src/main/java/ai/loko/hk/ui/notification/IDReceiver.java b/app/src/main/java/ai/loko/hk/ui/notification/IDReceiver.java deleted file mode 100644 index 6c1e066..0000000 --- a/app/src/main/java/ai/loko/hk/ui/notification/IDReceiver.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.notification; - -import android.util.Log; - -import com.google.firebase.iid.FirebaseInstanceId; -import com.google.firebase.iid.FirebaseInstanceIdService; - -public class IDReceiver extends FirebaseInstanceIdService { - public IDReceiver() { - } - - @Override - public void onTokenRefresh() { - super.onTokenRefresh(); - String refreshedToken = FirebaseInstanceId.getInstance().getToken(); - Log.d("IDReceiver", "onTokenRefresh: "+refreshedToken); - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/notification/MyNotificationService.java b/app/src/main/java/ai/loko/hk/ui/notification/MyNotificationService.java deleted file mode 100644 index 6673f0b..0000000 --- a/app/src/main/java/ai/loko/hk/ui/notification/MyNotificationService.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.notification; - -import android.content.Intent; -import android.util.Log; - -import com.google.firebase.messaging.FirebaseMessagingService; -import com.google.firebase.messaging.RemoteMessage; - -import java.util.Map; - -import ai.loko.hk.ui.MainActivity; -import ai.loko.hk.ui.model.NotificationD; - -public class MyNotificationService extends FirebaseMessagingService { - - private static final String TAG = "MyNotificationService"; - private static final String TITLE = "title"; - private static final String MESSAGE = "message"; - private static final String IMAGE = "image"; - private static final String ACTION = "action"; - private static final String ACTION_DESTINATION = "data"; - - @Override - public void onMessageReceived(RemoteMessage remoteMessage) { - - Log.d(TAG, "From: " + remoteMessage.getFrom()); - - // Check if message contains a data payload. - if (remoteMessage.getData().size() > 0) { - Log.d(TAG, "Message data payload: " + remoteMessage.getData()); - Map data = remoteMessage.getData(); - handleData(data); - - } else if (remoteMessage.getNotification() != null) { - Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody()); - handleNotification(remoteMessage.getNotification()); - }// Check if message contains a notification payload. - - } - - private void handleNotification(RemoteMessage.Notification RemoteMsgNotification) { - String message = RemoteMsgNotification.getBody(); - String title = RemoteMsgNotification.getTitle(); - NotificationD notificationVO = new NotificationD(); - - notificationVO.setTitle(title); - notificationVO.setMessage(message); - - Intent resultIntent = new Intent(getApplicationContext(), MainActivity.class); - - NotificationUtils notificationUtils = new NotificationUtils(getApplicationContext()); - notificationUtils.displayNotification(notificationVO, resultIntent); - notificationUtils.playNotificationSound(); - } - - private void handleData(Map data) { - String title = data.get(TITLE); - String message = data.get(MESSAGE); - String iconUrl = data.get(IMAGE); - String action = data.get(ACTION); - String actionDestination = data.get(ACTION_DESTINATION); - - NotificationD notificationD = new NotificationD(); - notificationD.setTitle(title); - notificationD.setMessage(message); - notificationD.setIconUrl(iconUrl); - notificationD.setAction(action); - notificationD.setActionDestination(actionDestination); - - Intent resultIntent = new Intent(getApplicationContext(), MainActivity.class); - - NotificationUtils notificationUtils = new NotificationUtils(getApplicationContext()); - notificationUtils.displayNotification(notificationD, resultIntent); - notificationUtils.playNotificationSound(); - - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/notification/NotificationUtils.java b/app/src/main/java/ai/loko/hk/ui/notification/NotificationUtils.java deleted file mode 100644 index 1a634d5..0000000 --- a/app/src/main/java/ai/loko/hk/ui/notification/NotificationUtils.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.notification; - -import android.app.Notification; -import android.app.NotificationManager; -import android.app.PendingIntent; -import android.content.ContentResolver; -import android.content.Context; -import android.content.Intent; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.media.Ringtone; -import android.media.RingtoneManager; -import android.net.Uri; -import android.support.v4.app.NotificationCompat; -import android.text.Html; - -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import ai.loko.hk.ui.MainActivity; -import ai.loko.hk.ui.activities.TestActivity; -import ai.loko.hk.ui.model.NotificationD; -import ui.R; - -public class NotificationUtils { - - private static final int NOTIFICATION_ID = 200; - private static final String CHANNEL_ID = "myChannel"; - //set action in payload - - private static final String URL = "url"; - //set data in payload - private static final String ACTIVITY = "activity"; - - Map activityMap = new HashMap<>(); - private Context mContext; - - public NotificationUtils(Context mContext) { - this.mContext = mContext; - //Populate activity map - activityMap.put("MainActivity", MainActivity.class); - activityMap.put("TestActivity", TestActivity.class); - - } - - public void displayNotification(NotificationD notificationD, Intent resultIntent) { - { - String message = notificationD.getMessage(); - String title = notificationD.getTitle(); - - String iconUrl = notificationD.getIconUrl(); - String action = notificationD.getAction(); - String destination = notificationD.getActionDestination(); - Bitmap iconBitMap = null; - - if (iconUrl != null) { - iconBitMap = getBitmapFromURL(iconUrl); - } - final int icon = R.mipmap.ic_launcher; - - PendingIntent resultPendingIntent; - - if (URL.equals(action)) { - Intent notificationIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(destination)); - resultPendingIntent = PendingIntent.getActivity(mContext, 0, notificationIntent, 0); - } else if (ACTIVITY.equals(action) && activityMap.containsKey(destination)) { - resultIntent = new Intent(mContext, activityMap.get(destination)); - resultPendingIntent = PendingIntent.getActivity(mContext, 0, resultIntent, PendingIntent.FLAG_CANCEL_CURRENT); - } else { - resultIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); - resultPendingIntent = PendingIntent.getActivity(mContext, 0, resultIntent, PendingIntent.FLAG_CANCEL_CURRENT); - } - - - final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mContext, CHANNEL_ID); - - Notification notification; - - if (iconBitMap == null) { - //When Inbox Style is applied, user can expand the notification - NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle(); - - inboxStyle.addLine(message); - notification = mBuilder.setSmallIcon(icon).setTicker(title).setWhen(0) - .setAutoCancel(true) - .setContentTitle(title) - .setContentIntent(resultPendingIntent) - .setStyle(inboxStyle) - .setSmallIcon(R.mipmap.ic_launcher) - .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon)) - .setContentText(message) - .build(); - - } else { - //If Bitmap is created from URL, show big icon - NotificationCompat.BigPictureStyle bigPictureStyle = new NotificationCompat.BigPictureStyle(); - bigPictureStyle.setBigContentTitle(title); - bigPictureStyle.setSummaryText(Html.fromHtml(message).toString()); - bigPictureStyle.bigPicture(iconBitMap); - notification = mBuilder.setSmallIcon(icon).setTicker(title).setWhen(0) - .setAutoCancel(true) - .setContentTitle(title) - .setContentIntent(resultPendingIntent) - .setStyle(bigPictureStyle) - .setSmallIcon(R.mipmap.ic_launcher) - .setLargeIcon(BitmapFactory.decodeResource(mContext.getResources(), icon)) - .setContentText(message) - .build(); - } - - NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); - notificationManager.notify(NOTIFICATION_ID, notification); - } - } - - /** - * Downloads push notification image before displaying it in - * the notification tray - * - * @param strURL : URL of the notification Image - * @return : BitMap representation of notification Image - */ - private Bitmap getBitmapFromURL(String strURL) { - try { - java.net.URL url = new URL(strURL); - HttpURLConnection connection = (HttpURLConnection) url.openConnection(); - connection.setDoInput(true); - connection.connect(); - InputStream input = connection.getInputStream(); - return BitmapFactory.decodeStream(input); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - - /** - * Playing notification sound - */ - public void playNotificationSound() { - try { - Uri alarmSound = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE - + "://" + mContext.getPackageName() + "/raw/notification"); - Ringtone r = RingtoneManager.getRingtone(mContext, alarmSound); - r.play(); - } catch (Exception e) { - e.printStackTrace(); - } - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/utils/CustomToast.java b/app/src/main/java/ai/loko/hk/ui/utils/CustomToast.java index 661a63c..1453aa8 100644 --- a/app/src/main/java/ai/loko/hk/ui/utils/CustomToast.java +++ b/app/src/main/java/ai/loko/hk/ui/utils/CustomToast.java @@ -37,10 +37,10 @@ import ui.R; -public class CustomToast { +public class CustomToast { private Context context = null; private String msg; - private int duration=0; + private int duration = 0; public CustomToast(Context context) { this.context = context; diff --git a/app/src/main/java/ai/loko/hk/ui/utils/Utils.java b/app/src/main/java/ai/loko/hk/ui/utils/Utils.java index b33f86a..62fb3d3 100644 --- a/app/src/main/java/ai/loko/hk/ui/utils/Utils.java +++ b/app/src/main/java/ai/loko/hk/ui/utils/Utils.java @@ -28,8 +28,6 @@ package ai.loko.hk.ui.utils; -import android.graphics.Bitmap; -import android.graphics.Color; import android.support.annotation.Nullable; import java.util.ArrayList; @@ -82,7 +80,6 @@ public static ArrayList getSimplifiedQuestion(String question, int a) { public static int count(String subString, String string) { int cnt = 0; - // String regex = "\\b" + subString + "\\b"; Pattern p = Pattern.compile("\\b" + subString + "\\b"); Matcher m = p.matcher(string); while (m.find()) @@ -98,34 +95,4 @@ public static int count2(String subString, String string) { cnt++; return cnt; } - - public static Bitmap getGrayscaleImage(Bitmap src) { - int width = src.getWidth(); - int height = src.getHeight(); - // create output bitmap - Bitmap bmOut = Bitmap.createBitmap(width, height, src.getConfig()); - // color information - int A, R, G, B; - int pixel; - for (int x = 0; x < width; ++x) { - for (int y = 0; y < height; ++y) { - // get pixel color - pixel = src.getPixel(x, y); - A = Color.alpha(pixel); - R = Color.red(pixel); - G = Color.green(pixel); - B = Color.blue(pixel); - int gray = (int) (0.2989 * R + 0.5870 * G + 0.1140 * B); - // use 128 as threshold, above -> white, below -> black - if (gray > 128) { - gray = 255; - } else { - gray = 0; - } - // set new pixel color to output bitmap - bmOut.setPixel(x, y, Color.argb(A, gray, gray, gray)); - } - } - return bmOut; - } } diff --git a/app/src/main/java/ai/loko/hk/ui/view/BoxListener.java b/app/src/main/java/ai/loko/hk/ui/view/BoxListener.java deleted file mode 100644 index 76a75b9..0000000 --- a/app/src/main/java/ai/loko/hk/ui/view/BoxListener.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.view; - -import android.annotation.TargetApi; -import android.os.Build; -import android.view.MotionEvent; -import android.view.View; - -import ai.loko.hk.ui.services.OCRFloating; - -//not used -public class BoxListener implements View.OnTouchListener { - private final OCRFloating service; - private int[] clipBox = new int[4]; - private float[] clipBox1 = new float[4]; - private float rawX1; - private float rawX2; - private float rawY1; - private float rawY2; - private float x1; - private float y1; - - public BoxListener(OCRFloating service) { - this.service = service; - } - - private void updateClipBox(float x1, float y1, float x2, float y2) { - this.clipBox[0] = (int) Math.ceil((double) x1); - this.clipBox1[0] = x1; - this.clipBox[1] = (int) Math.ceil((double) y1); - this.clipBox1[1] = y1; - this.clipBox[2] = (int) Math.ceil((double) (x2 - x1)); - this.clipBox1[2] = x2; - this.clipBox[3] = (int) Math.ceil((double) (y2 - y1)); - this.clipBox1[3] = y2; - } - - private void updateCustomView(BoxView boxView, float x1, float y1, float x2, float y2) { - int i = (x1 > x2 ? 1 : (x1 == x2 ? 0 : -1)); - if (i > 0 && y1 > y2) { - boxView.updateRegion(x2, y2, x1, y1); - updateClipBox(this.rawX2, this.rawY2, this.rawX1, this.rawY1); - } else if (y1 > y2) { - boxView.updateRegion(x1, y2, x2, y1); - updateClipBox(this.rawX1, this.rawY2, this.rawX2, this.rawY1); - } else if (i > 0) { - boxView.updateRegion(x2, y1, x1, y2); - updateClipBox(this.rawX2, this.rawY1, this.rawX1, this.rawY2); - } else { - boxView.updateRegion(x1, y1, x2, y2); - updateClipBox(this.rawX1, this.rawY1, this.rawX2, this.rawY2); - } - } - - @TargetApi(Build.VERSION_CODES.LOLLIPOP) - public boolean onTouch(View view, MotionEvent motionEvent) { - switch (motionEvent.getAction()) { - case MotionEvent.ACTION_DOWN: - this.x1 = motionEvent.getX(); - this.rawX2 = this.rawX1 = motionEvent.getRawX(); - this.y1 = motionEvent.getY(); - this.rawY2 = this.rawY1 = motionEvent.getRawY(); - break; - case MotionEvent.ACTION_UP: - view.performClick(); - //this.service.finishClipMode(this.clipBox, this.clipBox1); - break; - case MotionEvent.ACTION_MOVE: - this.rawX2 = motionEvent.getRawX(); - this.rawY2 = motionEvent.getRawY(); - updateCustomView((BoxView) view, this.x1, this.y1, this.rawX2, this.rawY2); - break; - default: - break; - } - return true; - } -} diff --git a/app/src/main/java/ai/loko/hk/ui/view/BoxView.java b/app/src/main/java/ai/loko/hk/ui/view/BoxView.java deleted file mode 100644 index 2b8e217..0000000 --- a/app/src/main/java/ai/loko/hk/ui/view/BoxView.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2018 SHUBHAM TYAGI - * - * This file is part of Trivia Hack. - * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * https://www.gnu.org/licenses/gpl-3.0 - * - * Trivia Hack is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * You should have received a copy of the GNU General Public License - * along with Trivia Hack. If not, see . - * - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * - */ - -package ai.loko.hk.ui.view; - -import android.content.Context; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.support.v4.internal.view.SupportMenu; -import android.util.AttributeSet; -import android.view.View; - - -/** - * TODO: document your custom view class. Not used - */ -public class BoxView extends View { - private final Paint mPaint = new Paint(1); - private float x1; - private float x2; - private float y1; - private float y2; - - public BoxView(Context context, AttributeSet attributeSet) { - super(context, attributeSet); - this.mPaint.setColor(SupportMenu.CATEGORY_MASK); - this.mPaint.setStyle(Paint.Style.STROKE); - this.mPaint.setStrokeWidth(4.0f); - } - - public void updateRegion(float x1, float y1, float x2, float y2) { - this.x1 = x1; - this.x2 = x2; - this.y1 = y1; - this.y2 = y2; - invalidate(); - } - - protected void onDraw(Canvas canvas) { - canvas.drawRect(this.x1, this.y1, this.x2, this.y2, this.mPaint); - } - -} diff --git a/app/src/main/res/layout/box_view.xml b/app/src/main/res/layout/box_view.xml deleted file mode 100644 index c719490..0000000 --- a/app/src/main/res/layout/box_view.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 3e0fb64c17b50cfdfeeaba6c06f6ef9396e0a3ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3108 zcmV+<4BPXGP)DAwC51HxjW1Vj-9F_KKBmN`eX6fp~) zY0Wv5In-T&o?5u9pn{44#&`eM_1;|1FatA$Np#g;J=6W(>;M1ykFQ^MjT%PW7-LqT zxpU`QYa(&JMs?XB?B2b5Ym)Fb*z4L)-pAqq7e&N(I~CN@h*NbmsR zH;&<4dB!x0P26?)vE=0Bzs;LBulJlebEeU`6r#&Sne;!G=o8UbPM>Dao}G(xyiE%A zi$-6Jp$3*-+Gq+IVeARD=DQb*T<>TYy zyOTg$=-68|Ar+(@#WGUxW8dY(kEyr)t_Bvy-hyk%&CldCN`B|)w-3=NBBdZgKnPt? z4Uz+_1{SXAqlqVDJ77s`$ho$l-)S0v`CbX2Xe6#}>OiG|7j^y&zO7%s-d6l3e=vy{ z`7CF;DuK}kl_9k4GPYJ1q%x1X71eF*lJz(B47j zkj)Mp4IuqDG&HonT*e9kL<6UrxPI0m!cxGIQ4z_-A|oTG zmdn&cu}2-X5Nu}5m{AxJ5z$I6vt9tvK&cj}JxWvKQSAUsO=p0Fy2ZuC z^#aO4YgAx)F*yhcf z*{)r?w9<|pI~Wy-dNZ7ql*Cd}Qc4|r`}XaODs^R_(;Fjn4-^-BS+YW4<9u4dGX?f1mK1Z8#MC6r%Bl4$&*t`H8Y`J zv9YlYF=1X>9j z`SaPUSFe=qp~)~W@B*_f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ma%-Y4$;rukgk#1)#bQoF2{olJ<3p?uvx9BsttF>h z@4v8w4m~OE#V-uuSLiwoA3l6jR#q01zE!=!#Q7rH89aC}94@|cpbek9r!By*!33^? z(1eZy2M(M=F>yKeLh_8+A+ln3x!ZnjJA$K4+VPU&9UsKiiiJ9=XQvXpL_1P zOp>6}*d0*t;7dU4DtW_Lcv(e!wG6hBmp=RKvlDoX-;U48htJWjf6@?%h!-3bc2>~e zkNf%gJrfrfw`la}(N_^E@rmE(_SGgnLbmaIEXoe%w6wIVv9YmBFlLM$bKuU_t3Hw} zi<%_7j6h~7glj{`R;^k^lS;3oN&Xj7#>=?EM^ti2v?}Plk4jv8#X>qAYMj zS`kSJEs%lLV3d%2^$?h@K1$4gDu1lpNyRp+kpmRIAk=Q#ADzIr6h(#*Dc_$=)@ho1CuU8a~54 z$;rtd(=)|*mH;1%w$LUA9p6?GhCb0ZkLkUg0eD?LLU|_vHWyBhM^1Q|xjhH#2~=HC z^nPyu+M8L>Ca1J{tY++>AuKtbUWwdbGVp0;=f&!P>qg*Lf~d6@U5a(3X2VF+q1 zjR738Z0s~3lko`bH9(aK*YFwc!Mz;p#=H#|;B{n(V2X;H40jHyOyasq0^9BZ{~sLD VC<#JaJIw$9002ovPDHLkV1hj`du9Lt diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 4aca7b70f0d7a3a787ced5aec3ec3978ff3d5e32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7086 zcmV;f8&TwmP)QSw%KCL~+Fgv?xJMtYHD$ct`Q6UTa~)@fVK!!%_dd^gW?=5}-uL|OIlpt>^S-xPGr7r4 zZgP{G+~nr2o1!SqufP6!FUZqRKi$Hdi2ZPk>^Tnv34_2Jg73Bf0mmAiPlBuISrt{W z_3gWI<;tLC%a%ngUAnXr9n*91;>C&d*$=|sd*V0jgMI4*i3V5_Q0@d8;cATizI^%e z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Zyy}X=TO0dbK@Eem>9lx6t_hS8bfO% zf#afJYQ>4SP$s7lOjO&mMd-xJ1{aBg@_9I=7fU=#F9t^s21pzq)0xlFkD%K&IvF}9E4c|30W YAF{jK@E5AhUH||907*qoM6N<$f~fFdZ~y=R diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 3b7bdc36c360e5c2922b03f62b42db3eb2a904fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10400 zcmZ8{Wmr`0_w|`z7kPvw2R8mS56%ZvP20^+cr3a7( z8A3qvKfm|m`(e&}IM;Q~zW2TFwbxqvyfik{rXXb^1pt6TS4ZOk;UD|I9~?%wKA86; z1^@w9T@6*!;MqM};$SngsjS;-I%udGt&Wb`J|_Y(igtJk265@aE7DV8oZ?U&go&$5 zwdBd4O>+4YW%J_(av6Wq%vyzbiQ-?>bnw%qonhs?&Q;!!wYKcti-?V|JNsY#rf0+U zB8C?>$}(Is3}j~hzsvj#dFRuB#gL6JZ5xGQv&BD0yb9cABR}{GZ<)+oGW`bjC}ihH z4KY*OepN>}mIMwp%9(JtpRb|!u%SOS>0`!&Ec^I&Yvl=xuyD5a%{Jdy3%ArOj1a_Y1&*Xfu{6VrhA*t9JV=fB#TAU%N}EB&DNK zYi?)C3Beid`JdJKRA8@IE;3uUXu3xF`Xe=(y%grdrm1i`@0a3nR>VCNs3OIZauZZd z?G)ZK9ZX?=gkibl|DS76}7qStoyO=FI)Q*Dx#$$@UZTay=<4sN8L%%K1T+ zM@`UwOL(RHfm6D%iK~GriKv;cp~dmY3_v37Iui6{8m`|i0}Un$G=ePLa;hP&)q}TH zPWz-ZK2mD@I?Z1v{V>n@NEZ5OZNjbwaxTBne8G%k<$cjitl$!i*;nc|Y~eV3+tknU zHE{gxLN}(&R*3y6I;eOujQDlfVo!v)!70F%@=8}md-{ZhLD`kx$LnLUcP4otczdHU zMeW%CUGN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X(q&gQ!L3+VyRfz)m7@eG))(v0F?5T~l zTi;?t$T{PPB}h0Pm``LQ+Bjk&pDlbps{9v(V9aBgA0Uk2T3wgF$5>Yy7Mx!YhF>G& z)k<~p2l-+QxtK2y0p{EdAq^WM@|l(u;kK-_Jf#Ivn$FWU-100X&t7 zzwqIGN2>R=pNrVLU1qQXZDetv#?gSur) zw4ki)DZho8ivdC>nvO+Z$ce>y%cK%Al~ut?+#}^*vpSD|0N;FBrtZ3l<2b?x4HtdeY)}SO@-7-cpiY zBr5q&HC_KOgCZsQqe!#O&P`8ABLXClv_g3=%tWOnl70$%s1X_}U2nyU7cXei4e3)G z8UqO~)M*D(WqEmPY}H)Na9L*%wMpCHz`&f|?F;7fd849>e;ci5_JlSdlAx;0XY?6z zF(zJE;=GXP%%!EPuP=8jI9dF0jbrsk(9O4W**mY#y_OE5WExXyz+~s^lgw=oZD?X;&7F= z^}=wfuf^Wp&U?J?x$R08g*II_dud9@c3d>$7lnD>$UR~kpmFAi_7#Kp355Met%#6K zsB}wmB9!Idpub8mx$1w$%2N)?CrIT-!bJ)RpUN9xXCK3d3eMO(RYj-lWa9b|Wk1Lh z5dG@@&Xzwjc)R<^yCca5pTgXdv}h(_zof2EwJk;{Wi2}P&!R=8^hKW)?4#@Or1<;e z#3Y-K{c^}p;3bM0@PPy|m;*hf@HYuDZpJbthMEL{cYoI_ZVVzm5$`ki^=$X|{Q15? zy6PAA^!6efj_A0~QVnLU_KRCnEV?#&U0h8%-G59mzO~|-y<%_L1QJ559H&$>2Wdgu z$$U!tp3RWJvL}@eb#tkmKHlHF`0530f&*tRlMxhYr2!C^TH@`g|Ijvo_wvb&y~E9X V+TWyE!k34DuBM^JM>U72{{yBbk^KMw diff --git a/app/src/main/res/values/attrs_box_view.xml b/app/src/main/res/values/attrs_box_view.xml deleted file mode 100644 index ab68c05..0000000 --- a/app/src/main/res/values/attrs_box_view.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1c2e826..56193cc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -47,7 +47,7 @@ Stop OCR Overlay Permission Accessibility Permission - All Trivia App Supported now :} + Trivia apps in which you can take screenshot of questions, are supported search_engine_key custom_search_engine custom_search_engine_url diff --git a/build.gradle b/build.gradle index 8aee7ef..9f1b5e8 100644 --- a/build.gradle +++ b/build.gradle @@ -32,18 +32,17 @@ buildscript { repositories { google() jcenter() - maven { url 'https://maven.fabric.io/public' } maven { url "https://jitpack.io" } } dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' + classpath 'com.android.tools.build:gradle:3.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath 'com.google.gms:google-services:4.0.1' - classpath 'io.fabric.tools:gradle:1.+' + } } diff --git a/crashreporter/build.gradle b/crashreporter/build.gradle index 4f6ee06..f0e9525 100644 --- a/crashreporter/build.gradle +++ b/crashreporter/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' android { compileSdkVersion 28 - buildToolsVersion "28.0.2" + buildToolsVersion "28.0.3" defaultConfig { minSdkVersion 15 @@ -33,4 +33,32 @@ dependencies { } +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + //apply from: 'upload.gradle' \ No newline at end of file diff --git a/crashreporter/src/main/AndroidManifest.xml b/crashreporter/src/main/AndroidManifest.xml index a90930a..d29805a 100644 --- a/crashreporter/src/main/AndroidManifest.xml +++ b/crashreporter/src/main/AndroidManifest.xml @@ -1,6 +1,34 @@ + + + package="com.balsikandar.crashreporter"> + android:exported="false"/> + android:theme="@style/CrashReporter.Theme"/> + android:theme="@style/CrashReporter.Theme"/> diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporter.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporter.java index 5a1e8fd..0fdf439 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporter.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporter.java @@ -1,11 +1,39 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter; import android.content.Context; import android.content.Intent; import com.balsikandar.crashreporter.ui.CrashReporterActivity; -import com.balsikandar.crashreporter.utils.CrashReporterNotInitializedException; import com.balsikandar.crashreporter.utils.CrashReporterExceptionHandler; +import com.balsikandar.crashreporter.utils.CrashReporterNotInitializedException; import com.balsikandar.crashreporter.utils.CrashUtil; public class CrashReporter { diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporterInitProvider.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporterInitProvider.java index 5bbb2a5..cd033a3 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporterInitProvider.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/CrashReporterInitProvider.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter; /** diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/CrashLogAdapter.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/CrashLogAdapter.java index afb27bf..42f3de2 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/CrashLogAdapter.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/CrashLogAdapter.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.adapter; import android.content.Context; @@ -10,7 +38,6 @@ import com.balsikandar.crashreporter.R; import com.balsikandar.crashreporter.ui.LogMessageActivity; -import com.balsikandar.crashreporter.utils.CrashUtil; import com.balsikandar.crashreporter.utils.FileUtils; import java.io.File; diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/MainPagerAdapter.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/MainPagerAdapter.java index 6f190d6..9a23d12 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/MainPagerAdapter.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/adapter/MainPagerAdapter.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.adapter; import android.support.v4.app.Fragment; diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashLogFragment.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashLogFragment.java index 64a7267..753209b 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashLogFragment.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashLogFragment.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.ui; import android.content.Context; diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashReporterActivity.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashReporterActivity.java index a4d9079..2078fc8 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashReporterActivity.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/CrashReporterActivity.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.ui; import android.content.Intent; diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/ExceptionLogFragment.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/ExceptionLogFragment.java index a35bbe0..b24cf16 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/ExceptionLogFragment.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/ExceptionLogFragment.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.ui; import android.content.Context; @@ -70,14 +98,14 @@ public ArrayList getAllExceptions() { String directoryPath; String crashReportPath = CrashReporter.getCrashReportPath(); - if (TextUtils.isEmpty(crashReportPath)){ + if (TextUtils.isEmpty(crashReportPath)) { directoryPath = CrashUtil.getDefaultPath(); - } else{ + } else { directoryPath = crashReportPath; } File directory = new File(directoryPath); - if (!directory.exists() || !directory.isDirectory()){ + if (!directory.exists() || !directory.isDirectory()) { throw new RuntimeException("The path provided doesn't exists : " + directoryPath); } diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/LogMessageActivity.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/LogMessageActivity.java index 1bff3d3..de56ba9 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/LogMessageActivity.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/ui/LogMessageActivity.java @@ -1,20 +1,20 @@ /* * Copyright (C) 2018 SHUBHAM TYAGI * - * This file is part of LoKo HacK. + * This file is part of Trivia Hack. * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * https://www.gnu.org/licenses/gpl-3.0 * - * LoKo hacK is free software: you can redistribute it and/or modify + * Trivia Hack is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * You should have received a copy of the GNU General Public License - * along with LoKo Hack. If not, see . + * along with Trivia Hack. If not, see . * * * Unless required by applicable law or agreed to in writing, software diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/AppUtils.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/AppUtils.java index 47f6782..16bf664 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/AppUtils.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/AppUtils.java @@ -1,8 +1,37 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; import android.Manifest; import android.accounts.Account; import android.accounts.AccountManager; +import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; @@ -41,7 +70,7 @@ private static String getUserIdentity(Context context) { if (ActivityCompat.checkSelfPermission(context, Manifest.permission.GET_ACCOUNTS) == PackageManager.PERMISSION_GRANTED) { AccountManager manager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); - Account[] list = manager.getAccounts(); + @SuppressLint("MissingPermission") Account[] list = manager.getAccounts(); String emailId = null; for (Account account : list) { if (account.type.equalsIgnoreCase("com.google")) { @@ -59,7 +88,7 @@ private static String getUserIdentity(Context context) { public static String getDeviceDetails(Context context) { return "Device Information\n" - + "\nDEVICE.ID : " + getDeviceId(context) + /* + "\nDEVICE.ID : " + getDeviceId(context)*/ + "\nUSER.ID : " + getUserIdentity(context) + "\nAPP.VERSION : " + getAppVersion(context) + "\nLAUNCHER.APP : " + getCurrentLauncherApp(context) @@ -67,25 +96,25 @@ public static String getDeviceDetails(Context context) { + "\nVERSION.RELEASE : " + Build.VERSION.RELEASE + "\nVERSION.INCREMENTAL : " + Build.VERSION.INCREMENTAL + "\nVERSION.SDK.NUMBER : " + Build.VERSION.SDK_INT - + "\nBOARD : " + Build.BOARD - + "\nBOOTLOADER : " + Build.BOOTLOADER + // + "\nBOARD : " + Build.BOARD + // + "\nBOOTLOADER : " + Build.BOOTLOADER + "\nBRAND : " + Build.BRAND + "\nCPU_ABI : " + Build.CPU_ABI + "\nCPU_ABI2 : " + Build.CPU_ABI2 - + "\nDISPLAY : " + Build.DISPLAY - + "\nFINGERPRINT : " + Build.FINGERPRINT - + "\nHARDWARE : " + Build.HARDWARE - + "\nHOST : " + Build.HOST - + "\nID : " + Build.ID + //+ "\nDISPLAY : " + Build.DISPLAY + //+ "\nFINGERPRINT : " + Build.FINGERPRINT + //+ "\nHARDWARE : " + Build.HARDWARE + //+ "\nHOST : " + Build.HOST + /*+ "\nID : " + Build.ID*/ + "\nMANUFACTURER : " + Build.MANUFACTURER + "\nMODEL : " + Build.MODEL - + "\nPRODUCT : " + Build.PRODUCT - + "\nSERIAL : " + Build.SERIAL - + "\nTAGS : " + Build.TAGS - + "\nTIME : " + Build.TIME - + "\nTYPE : " + Build.TYPE - + "\nUNKNOWN : " + Build.UNKNOWN - + "\nUSER : " + Build.USER; + + "\nPRODUCT : " + Build.PRODUCT; + /* + "\nSERIAL : " + Build.SERIAL*/ + // + "\nTAGS : " + Build.TAGS + // + "\nTIME : " + Build.TIME + //+ "\nTYPE : " + Build.TYPE + //+ "\nUNKNOWN : " + Build.UNKNOWN + //+ "\nUSER : " + Build.USER; } private static String timeZone() { diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/Constants.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/Constants.java index ec878e5..d7ffa1f 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/Constants.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/Constants.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; /** diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterException.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterException.java index ede6f5f..226fe57 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterException.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterException.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; /** diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterExceptionHandler.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterExceptionHandler.java index b2e2539..847f188 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterExceptionHandler.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterExceptionHandler.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; public class CrashReporterExceptionHandler implements Thread.UncaughtExceptionHandler { diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterNotInitializedException.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterNotInitializedException.java index 5b6d35a..ea42fb2 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterNotInitializedException.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashReporterNotInitializedException.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; /** diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashUtil.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashUtil.java index c9031eb..2ded550 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashUtil.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/CrashUtil.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; import android.app.NotificationManager; @@ -55,7 +83,6 @@ public void run() { String crashReportPath = CrashReporter.getCrashReportPath(); final String filename = getCrashLogTime() + Constants.EXCEPTION_SUFFIX + Constants.FILE_EXTENSION; writeToFile(crashReportPath, filename, getStackTrace(exception)); - showNotification(exception.getLocalizedMessage(), false); } diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/FileUtils.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/FileUtils.java index 7a91d8d..4790b0e 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/FileUtils.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/FileUtils.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; import android.text.TextUtils; diff --git a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/SimplePageChangeListener.java b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/SimplePageChangeListener.java index 76cea0a..312dfd4 100644 --- a/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/SimplePageChangeListener.java +++ b/crashreporter/src/main/java/com/balsikandar/crashreporter/utils/SimplePageChangeListener.java @@ -1,3 +1,31 @@ +/* + * Copyright (C) 2018 SHUBHAM TYAGI + * + * This file is part of Trivia Hack. + * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * https://www.gnu.org/licenses/gpl-3.0 + * + * Trivia Hack is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * You should have received a copy of the GNU General Public License + * along with Trivia Hack. If not, see . + * + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * + */ + package com.balsikandar.crashreporter.utils; import android.support.v4.view.ViewPager; @@ -8,9 +36,13 @@ public abstract class SimplePageChangeListener implements ViewPager.OnPageChangeListener { @Override - public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {} + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { + } + @Override public abstract void onPageSelected(int position); + @Override - public void onPageScrollStateChanged(int state) {} + public void onPageScrollStateChanged(int state) { + } } diff --git a/crashreporter/src/main/res/drawable-v24/ic_launcher_foreground.xml b/crashreporter/src/main/res/drawable-v24/ic_launcher_foreground.xml index 69c5e7a..946d341 100644 --- a/crashreporter/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ b/crashreporter/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -1,20 +1,20 @@ + + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> diff --git a/crashreporter/src/main/res/drawable/ic_menu_share_white_24dp.xml b/crashreporter/src/main/res/drawable/ic_menu_share_white_24dp.xml index 1d53e22..412aee9 100644 --- a/crashreporter/src/main/res/drawable/ic_menu_share_white_24dp.xml +++ b/crashreporter/src/main/res/drawable/ic_menu_share_white_24dp.xml @@ -1,8 +1,36 @@ + + + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> diff --git a/crashreporter/src/main/res/drawable/ic_search_white_24dp.xml b/crashreporter/src/main/res/drawable/ic_search_white_24dp.xml index c927d3d..c69f15a 100644 --- a/crashreporter/src/main/res/drawable/ic_search_white_24dp.xml +++ b/crashreporter/src/main/res/drawable/ic_search_white_24dp.xml @@ -1,3 +1,31 @@ + + . + ~ along with Trivia Hack. If not, see . ~ ~ ~ Unless required by applicable law or agreed to in writing, software @@ -26,8 +26,13 @@ ~ --> - - + + diff --git a/crashreporter/src/main/res/drawable/ic_warning_black_24dp.xml b/crashreporter/src/main/res/drawable/ic_warning_black_24dp.xml index 7c69ee8..fc2eb6f 100644 --- a/crashreporter/src/main/res/drawable/ic_warning_black_24dp.xml +++ b/crashreporter/src/main/res/drawable/ic_warning_black_24dp.xml @@ -1,3 +1,31 @@ + + + + + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:context="com.balsikandar.crashreporter.ui.LogMessageActivity"> + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/appbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> + app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> @@ -35,15 +63,15 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" - android:textColor="#ff0000" /> + android:textColor="#ff0000"/> diff --git a/crashreporter/src/main/res/layout/activity_main.xml b/crashreporter/src/main/res/layout/activity_main.xml index afccb74..2775341 100644 --- a/crashreporter/src/main/res/layout/activity_main.xml +++ b/crashreporter/src/main/res/layout/activity_main.xml @@ -2,20 +2,20 @@ + \ No newline at end of file + android:id="@+id/crashRecyclerView" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> \ No newline at end of file diff --git a/crashreporter/src/main/res/layout/crash_reporter_activity.xml b/crashreporter/src/main/res/layout/crash_reporter_activity.xml index f2f61c9..e59e318 100644 --- a/crashreporter/src/main/res/layout/crash_reporter_activity.xml +++ b/crashreporter/src/main/res/layout/crash_reporter_activity.xml @@ -1,30 +1,58 @@ + + + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context="com.balsikandar.crashreporter.ui.CrashReporterActivity"> + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/appbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> + app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/> + android:layout_height="wrap_content"/> @@ -33,6 +61,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_below="@+id/appbar" - app:layout_behavior="@string/appbar_scrolling_view_behavior" /> + app:layout_behavior="@string/appbar_scrolling_view_behavior"/> diff --git a/crashreporter/src/main/res/layout/custom_item.xml b/crashreporter/src/main/res/layout/custom_item.xml index 28928e7..4800ffb 100644 --- a/crashreporter/src/main/res/layout/custom_item.xml +++ b/crashreporter/src/main/res/layout/custom_item.xml @@ -1,41 +1,69 @@ + + + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + android:textSize="16sp"/> + android:textSize="14sp"/> + android:background="#dcdada"/> \ No newline at end of file diff --git a/crashreporter/src/main/res/layout/exception_log.xml b/crashreporter/src/main/res/layout/exception_log.xml index 41bab16..94639e8 100644 --- a/crashreporter/src/main/res/layout/exception_log.xml +++ b/crashreporter/src/main/res/layout/exception_log.xml @@ -1,4 +1,32 @@ + + \ No newline at end of file + android:id="@+id/exceptionRecyclerView" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> \ No newline at end of file diff --git a/crashreporter/src/main/res/menu/crash_detail_menu.xml b/crashreporter/src/main/res/menu/crash_detail_menu.xml index 66d360e..59e7ecb 100644 --- a/crashreporter/src/main/res/menu/crash_detail_menu.xml +++ b/crashreporter/src/main/res/menu/crash_detail_menu.xml @@ -2,20 +2,20 @@ - + + app:showAsAction="always"/> + app:showAsAction="always"/> \ No newline at end of file diff --git a/crashreporter/src/main/res/menu/log_main_menu.xml b/crashreporter/src/main/res/menu/log_main_menu.xml index 5a0b306..c31f96d 100644 --- a/crashreporter/src/main/res/menu/log_main_menu.xml +++ b/crashreporter/src/main/res/menu/log_main_menu.xml @@ -1,16 +1,44 @@ + + + xmlns:app="http://schemas.android.com/apk/res-auto"> + android:title="Item" + app:showAsAction="always"/> - - - - - + + + + + \ No newline at end of file diff --git a/crashreporter/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/crashreporter/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index b4244d3..2a31e6c 100644 --- a/crashreporter/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/crashreporter/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -2,20 +2,20 @@ + #ff4081 #f50057 diff --git a/crashreporter/src/main/res/values/strings.xml b/crashreporter/src/main/res/values/strings.xml index 667a121..e343dfa 100644 --- a/crashreporter/src/main/res/values/strings.xml +++ b/crashreporter/src/main/res/values/strings.xml @@ -1,3 +1,31 @@ + + CrashReporter Crashes diff --git a/crashreporter/src/main/res/values/styles.xml b/crashreporter/src/main/res/values/styles.xml index 18c3058..8a796a0 100644 --- a/crashreporter/src/main/res/values/styles.xml +++ b/crashreporter/src/main/res/values/styles.xml @@ -1,4 +1,32 @@ + +