Compare commits

...

86 commits
2.0.0 ... main

Author SHA1 Message Date
mi6e4ka
eda5bf6c9d Merge pull request 'feat: enable edge-to-edge display' (#27) from oltine/openstore:edge-to-edge into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/27
2026-06-25 16:13:51 +02:00
oltnd
823fb11546 feat: enable edge-to-edge display 2026-06-18 21:41:50 +03:00
Michael
74c0e35c76
chore: revert ssl pinning 2026-06-18 21:31:45 +03:00
Michael
0cc3da6949
chore: revert ssl pinning 2026-06-18 21:27:39 +03:00
mi6e4ka
1ee5d87aeb Merge pull request 'Help fix' (#23) from oltine/openstore:main into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/23
2026-06-06 23:32:05 +02:00
oltine
f4320992c8 Merge pull request 'Применить правку' (#1) from rustore-help-fix into main
Reviewed-on: https://codeberg.org/oltine/openstore/pulls/1
2026-06-04 21:09:57 +02:00
oltine
f4ee755783 Применить правку 2026-06-04 21:09:36 +02:00
Michael
f09226ef3a
feat: improved accessibility (fixed #22, fixed #21) 2026-05-19 14:00:54 +03:00
Michael
a6509993a3
chore: add new GS root CA for cert pinning 2026-05-18 20:24:11 +03:00
Michael
22e85ecb8d
chore: change icons 2026-05-04 16:21:41 +03:00
Michael
273f572968
chore: update translations 2026-05-04 16:18:08 +03:00
Michael
e64a1d4581
feat: add another AOSP installer in group 2026-05-04 15:33:27 +03:00
Michael
7793e50941
fix: another trying to fix apk downloading 2026-05-03 19:30:39 +03:00
Michael
8a67a6a0dd
feat: change animations 2026-05-03 19:18:44 +03:00
Michael
ae608e8370
chore: update screenshots 2026-05-03 19:08:26 +03:00
Michael
2dc1f788e7
chore: update release icon 2026-05-03 18:39:04 +03:00
Michael
ba815e82b0
tests: add UI tests for automatization screenshots 2026-05-03 18:27:49 +03:00
Michael
24b2c8cf9b
chore: fix3 update ci/cd 2026-05-02 19:44:57 +03:00
Michael
45ef4ec35b
chore: fix2 update ci/cd 2026-05-02 19:34:27 +03:00
Michael
61b6b80192
chore: fix update ci/cd 2026-05-02 19:26:35 +03:00
Michael
490adada3d
chore: update ci/cd 2026-05-02 19:13:02 +03:00
Michael
07ef45a004
feat: dynamic whitelist 2026-05-02 19:07:01 +03:00
Michael
9066918227
chore: update 'installed from other source' warning 2026-05-02 19:06:39 +03:00
Michael
9e96a96a2c
chore: update readme 2026-05-02 19:05:00 +03:00
Michael
87a763cca8
fix: cancel apk downloading 2026-05-02 19:04:10 +03:00
Michael
848b859920
chore: changed text on 'app source' badge 2026-05-02 12:01:05 +03:00
Michael
0ddb1d9b83
feat: more flexible update settings 2026-04-27 17:26:42 +03:00
Michael
0bf7a6556f
fixme: add bad open button when app has updates 2026-04-27 17:03:21 +03:00
Michael
5b14a9f1f4
chore: upgrade AGP to 9.1.1 2026-04-27 16:48:28 +03:00
Michael
ff4afa61ab feat: improved added hash check for downloaded apks (fix #9) (#20)
from #19, thx Dmitry

Co-authored-by: oltnd <oltn@kkmbr.xyz>
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/20
2026-04-27 15:45:27 +02:00
Michael
c759c1fcf9
feat: add theme setting 2026-04-10 23:08:21 +03:00
Michael
a8ee7c4161
fix: broken deeplinks 2026-04-10 18:10:37 +03:00
Michael
a2a3d94b22
chore: update get-it-on-codeberg logo url 2026-04-10 17:00:24 +03:00
Michael
6044d46ded
chore: update logo 2026-04-10 16:55:08 +03:00
Michael
1ce1d27c50
chore: changed nightly icon 2026-02-15 19:58:15 +03:00
Michael
02893369b9
chore(build): use current git commit as debug/nightly version name 2026-02-15 19:22:11 +03:00
Michael
ae6635a38f
chore: add LICENSE 2026-02-15 19:21:32 +03:00
Michael
6708c57959
fix/chore: some fixes and move installion logic out from ViewModels 2026-02-14 22:40:28 +03:00
Michael
47384b8af8
feat: implement installer type switch while install apk 2026-01-31 22:28:33 +03:00
mi6e4ka
0cc49e1ad0 Merge pull request 'add check all updates page' (#15) from feat-updates into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/15
2026-01-31 19:45:29 +01:00
Michael
ef3f34455b
feat: add settings to updates 2026-01-31 21:44:59 +03:00
Michael
26ebdf4638
merge settings into updates 2026-01-31 21:07:30 +03:00
mi6e4ka
8afd38f603 Merge pull request 'implement settings' (#16) from feat/settings into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/16
2026-01-31 18:51:56 +01:00
Michael
47673a952f
feat: "additional settings in the app" in system settings 2026-01-31 20:45:00 +03:00
Michael
7ef653c256
feat: add EN localization to settings 2026-01-31 20:13:18 +03:00
Michael
3b039d8dfd
feat: initial settings implementation 2026-01-31 20:03:11 +03:00
Michael
db40f1efd6 fix: when reload after updating, the app reappears in list 2026-01-31 13:32:38 +01:00
Michael
b17b1c5395 feat: batch check updates 2026-01-31 13:32:38 +01:00
Michael
59f6d5935b merge changes from artemdnk 2026-01-31 13:32:38 +01:00
Michael
01fabf52d2
fix: use internal cache dir instead of app crashing (fixed #14) 2026-01-31 15:25:47 +03:00
mi6e4ka
6d5289738f Merge pull request 'add building instructions' (#13) from HolyCoast/openstore-pr:main into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/13
2025-11-29 16:51:01 +01:00
HolyCoast
0e8e136f0b building instructions: tools fix 2025-11-29 18:48:32 +03:00
HolyCoast
cbe10785eb add building instructions 2025-11-29 18:21:13 +03:00
Michael
41f315c1bf
docs: update README roadmap 2025-11-29 18:14:39 +03:00
Michael
3b852cc3c1
docs: update README 2025-11-29 18:13:41 +03:00
mi6e4ka
6bc7468205 Merge pull request 'add support building signed release artifact with keystore.properties' (#12) from HolyCoast/openstore-pr:main into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/12
2025-11-29 15:35:35 +01:00
HolyCoast
f65340b09c add support building signed release artifact with keystore.properties 2025-11-29 17:29:19 +03:00
mi6e4ka
fc003a8f8b
fix(apk downloader): don't download files when they cached 2025-11-11 17:57:21 +03:00
mi6e4ka
c315b2c8bc
feat: add MTE support flag 2025-11-11 17:41:56 +03:00
mi6e4ka
8a0b8312e4
chore: remove unsed deps 2025-11-11 16:50:04 +03:00
mi6e4ka
5e60384a4e
fix(ui): change "open in browser icon" 2025-11-11 16:49:50 +03:00
mi6e4ka
bef4169d31
chore: migrate to material symbols xml res 2025-11-10 23:02:51 +03:00
mi6e4ka
17ede5ba60
feat(ui): add icons to platform selector 2025-11-10 22:18:05 +03:00
mi6e4ka
6669cee822
chore: remove unnecessary dependencies 2025-11-10 22:17:41 +03:00
mi6e4ka
df31a2aa17
fix: fix update check for android <9 2025-11-10 19:37:56 +03:00
mi6e4ka
4dcdb32a53
fix(apk downloader): fix download apk on android <10 2025-11-10 19:32:40 +03:00
mi6e4ka
8bac0fbbcd
feat(ui): add toast on copy and button to copy direct apk link 2025-11-10 19:21:28 +03:00
mi6e4ka
0b713ff6d5
fix: adapted datetime badge for old android 2025-11-10 18:50:15 +03:00
mi6e4ka
3f074e7874
chore(ui): fix android theme 2025-11-10 18:22:46 +03:00
mi6e4ka
de5f67a234
fix(ui): fixed results screen update logic 2025-11-10 17:01:11 +03:00
mi6e4ka
d258f892f7
fix(ui): mini update platform selector code 2025-11-10 16:59:33 +03:00
mi6e4ka
1a0bbad813
feat(ui): add nothing found error 2025-11-10 16:58:56 +03:00
mi6e4ka
51817fd8c0
feat: add support for rustore TV (poorly tested) 2025-11-09 19:08:56 +03:00
mi6e4ka
017da13318
feat(ui): copy what's new on long press 2025-11-09 15:11:35 +03:00
mi6e4ka
bb463d9669
feat(ui): sorted info badges in a more logical order 2025-11-09 15:04:05 +03:00
mi6e4ka
ec38b428c0
feat(UI): add updated at badge 2025-11-09 15:00:33 +03:00
mi6e4ka
fc7cc103dd
feat(UI): add "app type" badge 2025-11-09 14:33:34 +03:00
mi6e4ka
543fc722cf
fix(VM): force set APK mime type 2025-11-09 14:19:22 +03:00
mi6e4ka
5ce2bebaca
fix(apk installer): some fixes for apk installer and working "copy link" buttton 2025-11-09 14:09:04 +03:00
mi6e4ka
18b3791983
fix(ui): clarify "domain verification" banner 2025-11-09 14:01:43 +03:00
mi6e4ka
b7e0657882 feat(ui): show real total app size 2025-11-09 13:37:08 +03:00
mi6e4ka
660c99751c feat: add support for split apks 2025-11-09 13:37:08 +03:00
mi6e4ka
2a337a2cdc Merge pull request 'Feat: Cert pinning / Закрепление сертификата' (#8) from HolyCoast/openstore-certpin:main into main
Reviewed-on: https://codeberg.org/mi6e4ka/openstore/pulls/8
2025-11-09 11:34:31 +01:00
HolyCoast
3978e1bd30 feat: cert pinning for *.rustore.ru at CA (currently GlobalSign) 2025-11-08 18:12:25 +03:00
mi6e4ka
800dac081b
docs: remove trademark title 2025-09-14 12:32:59 +03:00
mi6e4ka
1e4b4d0337
docs(fastlane): add changelog 2025-09-14 12:32:56 +03:00
120 changed files with 3561 additions and 796 deletions

View file

@ -54,8 +54,8 @@ jobs:
if: steps.get_release.outputs.prerelease == 'true'
run: |
./gradlew assembleNightly --stacktrace \
-PversionName=${{ steps.get_release.outputs.tag_name }} \
-PversionCode=$(date +%s)
# -PversionName=${{ steps.get_release.outputs.tag_name }}
- name: Build unsigned release APK
if: steps.get_release.outputs.prerelease != 'true'

37
BUILDING.md Normal file
View file

@ -0,0 +1,37 @@
## Building the app
### Getting started
Requirements/Dependencies:
- tools: [listed here](https://codeberg.org/mi6e4ka/android-build-ct/src/branch/main/Dockerfile#L9-L26)
- SDK: `OpenJDK 17`
- [Android Studio](https://developer.android.com/studio) for app debugging
### Building debug release
Open Android Studio, open project and Sync Gradle. After, in toolbar go to Run and run the app.
Alternatively, run in terminal from project directory:
```
export ANDROID_HOME=/usr/lib/jvm/java-17-openjdk; # here the path to openjdk 17 \
export ANDROID_SDK_ROOT=$ANDROID_HOME; \
export JAVA_HOME=$ANDROID_HOME; \
./gradlew assembleDebug
```
### Building signed release
Create file named `keystore.properties` in project directory with next values:
```
storeFile=<full path to your keystore.jks>
keyAlias=<your key alias in keystore>
storePassword=<password for keystore>
keyPassword=<password for alias>
```
After that, run in terminal from project directory:
```
export ANDROID_HOME=/usr/lib/jvm/java-17-openjdk; # here the path to openjdk 17 \
export ANDROID_SDK_ROOT=$ANDROID_HOME; \
export JAVA_HOME=$ANDROID_HOME; \
./gradlew assembleRelease
```
Release artifacts will be located in `app/build/outputs/apk/release/` directory.
If you have no your keystore.jks, you can create it using `keytool` or just follow [this guide](https://developer.android.com/studio/publish/app-signing#generate-key) from Google for Android Studio.

675
LICENSE.md Normal file
View file

@ -0,0 +1,675 @@
# GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
<https://fsf.org/>
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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <https://www.gnu.org/licenses/>.
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:
<program> Copyright (C) <year> <name of author>
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 <https://www.gnu.org/licenses/>.
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 <https://www.gnu.org/licenses/why-not-lgpl.html>.

1
Maestro/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.maestro

37
Maestro/flow.yaml Normal file
View file

@ -0,0 +1,37 @@
appId: dev.mi6e4ka.openstore
---
- launchApp:
clearState: true
- assertVisible: "OpenStore"
- takeScreenshot: "01_main_screen"
- tapOn: "Search"
- inputText: "Mir Pay"
- pressKey: Enter
- assertVisible: "Mir Pay"
- takeScreenshot: "02_search_screen"
- tapOn: "Mir Pay"
- assertVisible: "Mir Pay"
- takeScreenshot: "03_details_screen"
- scrollUntilVisible:
element: "Rating and reviews"
direction: DOWN
- tapOn: "Rating and reviews"
- assertVisible: "Reviews"
- takeScreenshot: "04_review_screen"
- back
- back
- back
- assertVisible: "OpenStore"
- tapOn: "updates|обновления"
- assertVisible: "Updates"
- takeScreenshot: "05_updates_screen"
- back
- tapOn: "settings|настройки"
- assertVisible: "Settings|Настройки"
- takeScreenshot: "06_settings_screen"

View file

@ -6,28 +6,42 @@
---
<img src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" alt="Get it on IzzyOnDroid" height="90"/></a>
<img src="./logo.png" width=80 alt="logo"/>
Open client for RuStore (unofficial)
Open client for popular russian app store (unofficial)
## Installation
<a href="https://apt.izzysoft.de/fdroid/index/apk/dev.mi6e4ka.openstore">
<img src="https://gitlab.com/IzzyOnDroid/repo/-/raw/master/assets/IzzyOnDroid.png" alt="Get it on IzzyOnDroid" height="70"/>
</a>
<a href="https://codeberg.org/mi6e4ka/openstore/releases/latest">
<img alt="Get it on Codeberg" src="https://codeberg.org/Codeberg/GetItOnCodeberg/raw/branch/main/get-it-on-white-on-black.png" height="60">
</a>
Verification info:
- Package ID: `dev.mi6e4ka.openstore`
- SHA-256 hash of signing certificate: `57:F7:EA:8B:41:B7:2E:6E:CF:C5:08:46:AF:ED:12:01:47:1A:8D:37:8E:18:D7:6A:AD:AC:BD:9F:B2:19:DF:98`
## Features
- [x] Search apps in RuStore
- [x] Search apps
- [x] View apps descriptions, rating and reviews
- [x] Native app installing
- [x] Updating apps (for now only manually)
- [x] Android 5.0+ support!
- [x] Search and view TV apps
- [x] Check all apps for updates
## Roadmap
- [ ] Search and view TV apps
- [ ] TV navigation support
- [ ] Automatically check for updates
- [ ] Better TV navigation support
- [ ] ...maybe more?
## Screenshots
[<img src="https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png" width=250>](https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png)
[<img src="https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png" width=250>](https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png)
[<img src="https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png" width=250>](https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png)
[<img src="https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png" width=250>](https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png)
[<img src="https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png" width=250>](https://codeberg.org/mi6e4ka/openstore/raw/main/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png)
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/01_main_screen.png" width=250>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/02_search_screen.png" width=250>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/03_details_screen.png" width=250>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/04_review_screen.png" width=250>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/05_updates_screen.png" width=250>
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/06_settings_screen.png" width=250>
## Building the app
See [here](https://codeberg.org/mi6e4ka/openstore/src/branch/main/BUILDING.md)

View file

@ -1,9 +1,31 @@
import java.io.ByteArrayOutputStream
import java.util.Properties
import java.io.FileInputStream
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
val keystoreProperties = Properties()
val keystoreFileExists = rootProject.file("keystore.properties").exists();
if (keystoreFileExists) {
keystoreProperties.load(rootProject.file("keystore.properties").inputStream())
}
val gitCommitShort: String = run {
try {
val process = ProcessBuilder("git", "rev-parse", "--short", "HEAD")
.redirectErrorStream(true)
.start()
val output = process.inputStream.bufferedReader().use { it.readText() }.trim()
val exitCode = process.waitFor()
if (exitCode == 0 && output.isNotEmpty()) output else "unknown"
} catch (e: Exception) {
"unknown"
}
}
android {
namespace = "dev.mi6e4ka.openstore"
compileSdk = 36
@ -17,14 +39,26 @@ android {
minSdk = 21
targetSdk = 36
versionCode = (project.findProperty("versionCode") as String?)?.toInt() ?: 1
versionName = project.findProperty("versionName") as String? ?: "dev"
versionName = project.findProperty("versionName") as String? ?: ("git-" + gitCommitShort)
//testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
if (keystoreFileExists) {
create("release") {
storeFile = keystoreProperties["storeFile"]?.let { file(it as String) }
storePassword = keystoreProperties["storePassword"] as String
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
}
}
}
buildTypes {
release {
isMinifyEnabled = true
isShrinkResources = true
signingConfig = signingConfigs.findByName("release")?.takeIf { it.storeFile != null }
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
@ -46,6 +80,7 @@ android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
isCoreLibraryDesugaringEnabled = true
}
kotlinOptions {
jvmTarget = "11"
@ -57,34 +92,19 @@ android {
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.activity.compose)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.ui)
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.material.icons.extended.android)
implementation(libs.accompanist.pager)
implementation(libs.accompanist.pager.indicators)
implementation(libs.androidx.runtime.livedata)
implementation(libs.material3)
implementation(libs.androidx.animation)
implementation(libs.androidx.paging.compose)
implementation(libs.material)
debugImplementation(libs.androidx.ui.tooling.preview)
debugImplementation(libs.okhttp3.logging.interceptor)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)
implementation(libs.kotlinx.datetime)
implementation(libs.navigation.compose)
implementation(libs.retrofit)
implementation(libs.converter.gson)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.coil.compose)
implementation(libs.lz4.java)
coreLibraryDesugaring(libs.desugar.jdk.libs)
}

View file

@ -19,3 +19,6 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# Keep xxhash classes used by LZ4 library
-keep class net.jpountz.xxhash.** { *; }

View file

@ -3,12 +3,13 @@
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"
tools:ignore="RequestInstallPackagesPolicy" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
<uses-permission android:name="android.permission.ENFORCE_UPDATE_OWNERSHIP" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
tools:ignore="PackageVisibilityPolicy,QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28"/>
@ -22,7 +23,8 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:localeConfig="@xml/locale_config"
tools:targetApi="36">
tools:targetApi="36"
android:memtagMode="async">
<activity
android:name=".MainActivity"
android:exported="true"
@ -32,16 +34,34 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:host="rustore.ru" />
<data android:host="www.rustore.ru" />
<data android:host="apps.rustore.ru" />
<data android:scheme="https" />
<data android:scheme="https" android:host="www.rustore.ru" android:pathPrefix="/catalog/app/" />
<data android:scheme="https" android:host="apps.rustore.ru" android:pathPrefix="/app/" />
<data android:scheme="https" android:host="www.rustore.ru" android:pathPrefix="/instruction" />
<data android:scheme="http" android:host="www.rustore.ru" android:pathPrefix="/catalog/app/" />
<data android:scheme="http" android:host="apps.rustore.ru" android:pathPrefix="/app/" />
<data android:scheme="http" android:host="www.rustore.ru" android:pathPrefix="/instruction" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="openstore"
android:host="settings" />
</intent-filter>
</activity>
<!-- "additional settings in the app" -->
<activity
android:name=".EditPreferencesActivity"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
@ -56,4 +76,4 @@
android:name=".internal.installer.PackageInstallerStatusReceiver"
android:exported="false" />
</application>
</manifest>
</manifest>

View file

@ -0,0 +1,17 @@
package dev.mi6e4ka.openstore
import android.content.Intent
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.core.net.toUri
class EditPreferencesActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val intent = Intent(this, MainActivity::class.java).apply {
data = "openstore://settings".toUri()
}
startActivity(intent)
finish()
}
}

View file

@ -3,16 +3,19 @@ package dev.mi6e4ka.openstore
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.animation.AnimatedContentTransitionScope
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Modifier
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
@ -27,21 +30,21 @@ import dev.mi6e4ka.openstore.ui.screen.details.DetailsScreen
import dev.mi6e4ka.openstore.ui.screen.results.ResultsScreen
import dev.mi6e4ka.openstore.ui.screen.reviews.ReviewsScreen
import dev.mi6e4ka.openstore.ui.screen.search.SearchScreen
import dev.mi6e4ka.openstore.ui.screen.settings.SettingsScreen
import dev.mi6e4ka.openstore.ui.screen.updates.UpdatesScreen
import dev.mi6e4ka.openstore.ui.theme.AppTheme
class MainActivity : ComponentActivity() {
override fun onStart() {
super.onStart()
}
override fun onCreate(savedInstanceState: Bundle?) {
val cacheDir = externalCacheDir ?: return
enableEdgeToEdge()
super.onCreate(savedInstanceState)
val cacheDir = externalCacheDir ?: cacheDir
cacheDir.listFiles()?.forEach { file ->
if (file.isFile && file.name.endsWith(".apk", ignoreCase = true)) {
file.delete()
println("CacheCleaner" + "Удален: ${file.name}")
}
}
super.onCreate(savedInstanceState)
val imageLoader = ImageLoader.Builder(this)
.diskCache {
DiskCache.Builder()
@ -59,7 +62,6 @@ class MainActivity : ComponentActivity() {
.memoryCachePolicy(CachePolicy.ENABLED)
.build()
Coil.setImageLoader(imageLoader)
setContent {
AppTheme {
Surface(
@ -67,20 +69,34 @@ class MainActivity : ComponentActivity() {
color = MaterialTheme.colorScheme.background
) {
val navController = rememberNavController()
val duration = 300
val easing = FastOutSlowInEasing
NavHost(
navController = navController,
startDestination = "search",
enterTransition = {
slideIntoContainer(AnimatedContentTransitionScope.SlideDirection.Left, animationSpec = tween(300))
slideInHorizontally(
initialOffsetX = { (it * 0.1f).toInt() },
animationSpec = tween(duration, easing = easing)
) + fadeIn(animationSpec = tween(duration))
},
exitTransition = {
slideOutOfContainer(AnimatedContentTransitionScope.SlideDirection.Left, animationSpec = tween(300))
slideOutHorizontally(
targetOffsetX = { -(it * 0.1f).toInt() },
animationSpec = tween(duration, easing = easing)
) + fadeOut(animationSpec = tween(duration))
},
popEnterTransition = {
slideIntoContainer(AnimatedContentTransitionScope.SlideDirection.Right, animationSpec = tween(300))
slideInHorizontally(
initialOffsetX = { -(it * 0.1f).toInt() },
animationSpec = tween(duration, easing = easing)
) + fadeIn(animationSpec = tween(duration))
},
popExitTransition = {
slideOutOfContainer(AnimatedContentTransitionScope.SlideDirection.Right, animationSpec = tween(300))
slideOutHorizontally(
targetOffsetX = { (it * 0.1f).toInt() },
animationSpec = tween(duration, easing = easing)
) + fadeOut(animationSpec = tween(duration))
}
) {
composable("search") {
@ -90,24 +106,33 @@ class MainActivity : ComponentActivity() {
val query = it.arguments?.getString("query") ?: ""
ResultsScreen(query = query, navController = navController)
}
composable("app/{appId}", deepLinks = listOf(
composable("app/{appId}?platform={platform}", deepLinks = listOf(
navDeepLink { uriPattern = "https://www.rustore.ru/catalog/app/{appId}" },
navDeepLink { uriPattern = "https://apps.rustore.ru/app/{appId}" },
navDeepLink { uriPattern = "https://www.rustore.ru/instruction?appName={appName}&utm_campaign={appId}" }
)) { backStackEntry ->
val itemId = backStackEntry.arguments?.getString("appId") ?: ""
val platform = backStackEntry.arguments?.getString("platform") ?: "mobile"
AnimatedVisibility(
visible = true,
enter = slideInHorizontally(initialOffsetX = { 1000 }) + fadeIn(),
exit = slideOutHorizontally(targetOffsetX = { -1000 }) + fadeOut()
) {
DetailsScreen(itemId = itemId, navController = navController)
DetailsScreen(itemId = itemId, appPlatform=platform, navController = navController)
}
}
composable("app/{packageName}/reviews") {
val packageName = it.arguments?.getString("packageName") ?: ""
ReviewsScreen(packageName = packageName, navController = navController)
}
composable("updates") {
UpdatesScreen(navController = navController)
}
composable("settings", deepLinks = listOf(
navDeepLink { uriPattern = "openstore://settings" }
)) {
SettingsScreen(navController = navController)
}
}
}
}

View file

@ -2,25 +2,42 @@ package dev.mi6e4ka.openstore.data.api
import dev.mi6e4ka.openstore.data.model.AppCommentsResponse
import dev.mi6e4ka.openstore.data.model.AppRatingResponse
import dev.mi6e4ka.openstore.data.model.AppUpdateRequest
import dev.mi6e4ka.openstore.data.model.AppUpdateResponse
import dev.mi6e4ka.openstore.data.model.BatchItemDetailsRequest
import dev.mi6e4ka.openstore.data.model.DownloadLinkRequest
import dev.mi6e4ka.openstore.data.model.DownloadLinkResponse
import dev.mi6e4ka.openstore.data.model.ItemDetailsResponse
import dev.mi6e4ka.openstore.data.model.SearchResponse
import dev.mi6e4ka.openstore.data.model.ShortItemDetails
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query
interface ApiService {
@GET("applicationData/apps")
suspend fun search(@Query("pageSize") pageSize: Int, @Query("pageNumber") pageNumber: Int, @Query("query") query: String): SearchResponse
suspend fun search(
@Query("pageSize") pageSize: Int,
@Query("pageNumber") pageNumber: Int,
@Query("query") query: String,
@Query("buyeruid") buyeruid : String,
@Header("deviceType") deviceType : String
): SearchResponse
@GET("applicationData/overallInfo/{packageName}")
suspend fun getItemDetails(@Path("packageName") packageName: String): ItemDetailsResponse
suspend fun getItemDetails(
@Header("deviceType") deviceType : String,
@Path("packageName") packageName: String
): ItemDetailsResponse
@POST("applicationData/v2/download-link")
suspend fun getAppDownloadLink(@Body request: DownloadLinkRequest) : DownloadLinkResponse
suspend fun getAppDownloadLink(
@Header("deviceType") deviceType : String,
@Body request: DownloadLinkRequest
) : DownloadLinkResponse
@GET("comment/findRating")
suspend fun getAppRating(@Query("packageName") packageName: String) : AppRatingResponse
@ -32,4 +49,14 @@ interface ApiService {
@Query("pageSize") pageSize: Int,
@Query("sortBy") sortBy: String,
) : AppCommentsResponse
@POST("applicationData/newApps")
suspend fun getBatchUpdates(
@Body request: AppUpdateRequest
) : AppUpdateResponse
@POST("v2/showcase/store-app")
suspend fun getBatchItemDetails(
@Body request: BatchItemDetailsRequest
) : List<ShortItemDetails>
}

View file

@ -0,0 +1,31 @@
package dev.mi6e4ka.openstore.data.model
import com.google.gson.annotations.SerializedName
data class AppUpdateRequestEntry(
@SerializedName("packageName") val packageName: String,
@Transient val appName: String,
@SerializedName("versionCode") val versionCode: Long,
@Transient val versionName: String,
@Transient val installSource: String
)
data class AppUpdateRequest(
@SerializedName("content") val content: List<AppUpdateRequestEntry>
)
data class AppUpdateResponse(
@SerializedName("body") val body: AppUpdateResponseBody
)
data class AppUpdateResponseBody(
@SerializedName("content") val content: List<AppUpdateResponseEntry>
)
data class AppUpdateResponseEntry(
@SerializedName("appId") val appId: Int,
@SerializedName("packageName") val packageName: String,
@SerializedName("appName") val appName: String,
@SerializedName("updatedAt") val updatedAt: String,
@SerializedName("versionCode") val versionCode: Long
)

View file

@ -8,6 +8,7 @@ data class DownloadLinkRequest(
@SerializedName("screenDensity") val screenDensity: Int,
@SerializedName("sdkVersion") val sdkVersion: Int,
@SerializedName("withoutSplits") val withoutSplits: Boolean,
@SerializedName("supportedAbis") val supportedAbis: List<String>,
)
data class DownloadLinkResponse(
@ -20,4 +21,6 @@ data class DownloadLinkResponseBody(
data class DownloadLinkResponseItem(
@SerializedName("url") val url: String,
@SerializedName("size") val size: Long,
@SerializedName("hash") val hash: String,
)

View file

@ -20,6 +20,19 @@ data class ItemDetails(
@SerializedName("roundedDownloadsText") val roundedDownloadsText: String,
@SerializedName("ageLegal") val ageLegal: String,
@SerializedName("whatsNew") val whatsNew: String,
@SerializedName("appVerUpdatedAt") val appVerUpdatedAt: String,
)
data class ShortItemDetails(
@SerializedName("appId") val appId: Int,
@SerializedName("appName") val appName: String,
@SerializedName("packageName") val packageName: String,
@SerializedName("iconUrl") val iconUrl: String,
@SerializedName("versionCode") val versionCode: Long,
)
data class BatchItemDetailsRequest(
@SerializedName("packageNames") val packageNames: List<String>,
)
data class Files(

View file

@ -7,7 +7,8 @@ import dev.mi6e4ka.openstore.data.model.SearchResult
class SearchPagingSource(
private val api: ApiService,
private val query: String
private val query: String,
private val deviceType : String
) : PagingSource<Int, SearchResult>() {
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, SearchResult> {
@ -16,7 +17,9 @@ class SearchPagingSource(
val response = api.search(
pageSize = params.loadSize,
query = query,
pageNumber = page
pageNumber = page,
buyeruid = " ", // TODO: empty string for now. It should be zlib compressed string with many info about client. For now required at least the very presence
deviceType = deviceType
)
LoadResult.Page(
data = response.body.content,

View file

@ -5,32 +5,46 @@ import androidx.paging.PagingConfig
import dev.mi6e4ka.openstore.data.api.ApiClient
import dev.mi6e4ka.openstore.data.model.AppCommentsComments
import dev.mi6e4ka.openstore.data.model.AppRatingResponseBody
import dev.mi6e4ka.openstore.data.model.AppUpdateRequest
import dev.mi6e4ka.openstore.data.model.AppUpdateRequestEntry
import dev.mi6e4ka.openstore.data.model.AppUpdateResponse
import dev.mi6e4ka.openstore.data.model.AppUpdateResponseEntry
import dev.mi6e4ka.openstore.data.model.BatchItemDetailsRequest
import dev.mi6e4ka.openstore.data.model.DownloadLinkRequest
import dev.mi6e4ka.openstore.data.model.DownloadLinkResponseItem
import dev.mi6e4ka.openstore.data.model.ItemDetails
import dev.mi6e4ka.openstore.data.model.SearchResult
import dev.mi6e4ka.openstore.data.model.ShortItemDetails
import dev.mi6e4ka.openstore.data.paging.SearchPagingSource
class SearchRepository {
private val apiService = ApiClient.service
fun search(query: String): Pager<Int, SearchResult> {
fun search(query: String, deviceType : String): Pager<Int, SearchResult> {
return Pager(
config = PagingConfig(
pageSize = 20,
initialLoadSize = 20,
enablePlaceholders = false
),
pagingSourceFactory = { SearchPagingSource(apiService, query) }
pagingSourceFactory = { SearchPagingSource(apiService, query, deviceType) }
)
}
suspend fun getItemDetails(id: String): ItemDetails {
return apiService.getItemDetails(id).body
suspend fun getItemDetails(packageName: String, deviceType: String): ItemDetails {
return apiService.getItemDetails(deviceType, packageName).body
}
suspend fun getAppDownloadLink(id: Int): String {
val req = DownloadLinkRequest(appId = id, firstInstall = true, screenDensity = 420, sdkVersion = 36, withoutSplits = true)
return apiService.getAppDownloadLink(req).body.downloadUrls[0].url
suspend fun getAppFiles(id: Int, firstInstall: Boolean, supportedAbis: List<String>, withoutSplits: Boolean, deviceType: String): List<DownloadLinkResponseItem> {
val req = DownloadLinkRequest(
appId = id,
firstInstall = firstInstall,
screenDensity = 420,
sdkVersion = 36,
withoutSplits = withoutSplits,
supportedAbis = supportedAbis
)
return apiService.getAppDownloadLink(deviceType, req).body.downloadUrls
}
suspend fun getAppRating(packageName: String): AppRatingResponseBody {
@ -40,4 +54,12 @@ class SearchRepository {
suspend fun getAppComments(packageName: String, pageSize: Int, sortBy: String): List<AppCommentsComments> {
return apiService.getAppComments(packageName, pageSize = pageSize, sortBy = sortBy).body.content
}
suspend fun getBatchUpdates(apps: List<AppUpdateRequestEntry>): List<AppUpdateResponseEntry> {
return apiService.getBatchUpdates(AppUpdateRequest(content = apps)).body.content
}
suspend fun getBatchItemDetails(packageNames: List<String>) : List<ShortItemDetails> {
return apiService.getBatchItemDetails(request = BatchItemDetailsRequest(packageNames = packageNames))
}
}

View file

@ -4,182 +4,378 @@ import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInstaller
import android.net.Uri
import android.os.Build
import android.os.Handler
import android.os.Looper
import android.util.Base64
import android.util.Log
import androidx.annotation.RequiresApi
import android.widget.Toast
import androidx.core.content.FileProvider
import dev.mi6e4ka.openstore.R
import dev.mi6e4ka.openstore.data.model.DownloadLinkResponseItem
import kotlinx.coroutines.CoroutineScope
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job
import kotlinx.coroutines.NonCancellable
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.ensureActive
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.ResponseBody
import java.io.BufferedOutputStream
import java.io.IOException
import net.jpountz.xxhash.XXHashFactory
import java.util.Collections
import java.util.concurrent.TimeUnit
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import kotlin.concurrent.atomics.AtomicLong
import kotlin.concurrent.atomics.ExperimentalAtomicApi
import kotlin.coroutines.cancellation.CancellationException
import kotlin.coroutines.coroutineContext
class ApkInstaller(private val context: Context) {
companion object {
private val okHttpClient = OkHttpClient()
}
fun downloadApkWithProgress(
url: String,
onProgress: (percent: Int, downloaded: Long, total: Long) -> Unit,
onSuccess: (File) -> Unit,
onError: (Throwable) -> Unit,
onCancel: () -> Unit,
): () -> Unit {
val fileName = url.split("/").last()
val apkFile = getApkFile(fileName)
// Проверяем, не скачан ли уже файл
if (isApkAlreadyDownloaded(fileName)) {
onSuccess(apkFile)
return {} // Пустая функция отмены
}
val request = Request.Builder()
.url(url)
.build()
val okHttpClient = OkHttpClient.Builder()
private val okHttpClient = OkHttpClient.Builder()
.connectTimeout(60, TimeUnit.SECONDS)
.readTimeout(120, TimeUnit.SECONDS)
.writeTimeout(120, TimeUnit.SECONDS)
.build()
}
val call = okHttpClient.newCall(request)
@OptIn(ExperimentalAtomicApi::class)
fun downloadFilesWithProgress(
files: List<DownloadLinkResponseItem>,
onProgress: (percent: Int, downloaded: Long, total: Long) -> Unit,
onSuccess: (List<File>) -> Unit,
onError: (Throwable) -> Unit,
onCancel: () -> Unit,
onInvalidHash: (List<File>, String?, String?) -> Unit = { _, _, _ -> }
): () -> Unit {
val downloadRunner = CoroutineScope(Dispatchers.IO).launch {
val totalBytesToDownload = files.sumOf { it.size }
val totalBytesDownloaded = AtomicLong(0)
val downloadedFiles = Collections.synchronizedList(mutableListOf<File>())
var lastUpdateMillis = 0L
CoroutineScope(Dispatchers.IO).launch {
try {
call.execute().use { response ->
if (!response.isSuccessful) {
throw IOException("Ошибка загрузки: ${response.code}")
}
val resultingFiles = coroutineScope {
files.map { file ->
async {
val fileName = file.url.split("/").last()
val apkFile = getApkFile(fileName)
if (!downloadedFiles.contains(apkFile)) {
downloadedFiles.add(apkFile)
}
val responseBody = response.body
if (responseBody == null) {
throw IOException("Пустой ответ от сервера")
}
if (apkFile.exists() && apkFile.length() == file.size) {
if (verifyFileHash(apkFile, file.hash)) {
totalBytesDownloaded.addAndFetch(file.size)
return@async apkFile
}
apkFile.delete()
}
val contentLength = responseBody.contentLength()
val inputStream = responseBody.byteStream()
val outputStream = FileOutputStream(apkFile)
val request = Request.Builder().url(file.url).build()
val call = okHttpClient.newCall(request)
// Связываем отмену корутины с OkHttp
val job = coroutineContext[Job]!!
val cancelHandler = job.invokeOnCompletion { call.cancel() }
val buffer = ByteArray(8192)
var downloaded: Long = 0
var bytesRead: Int
try {
call.execute().use { response ->
if (!response.isSuccessful) throw IOException("Ошибка загрузки: ${response.code}")
while (inputStream.read(buffer).also { bytesRead = it } != -1) {
if (call.isCanceled()) {
throw IOException("Canceled")
val responseBody = response.body ?: throw IOException("Пустой ответ")
responseBody.byteStream().use { inputStream ->
FileOutputStream(apkFile).use { outputStream ->
val buffer = ByteArray(16384) // Увеличил буфер для скорости
var bytesRead: Int
while (inputStream.read(buffer).also { bytesRead = it } != -1) {
job.ensureActive()
outputStream.write(buffer, 0, bytesRead)
val currentTotal = totalBytesDownloaded.addAndFetch(bytesRead.toLong())
// Троттлинг обновлений UI (не чаще 10 раз в секунду)
val now = System.currentTimeMillis()
if (now - lastUpdateMillis > 100) {
lastUpdateMillis = now
val percent = if (totalBytesToDownload > 0) {
(currentTotal * 100 / totalBytesToDownload).toInt()
} else 0
withContext(Dispatchers.Main) {
onProgress(percent, currentTotal, totalBytesToDownload)
}
}
}
outputStream.flush()
}
}
if (!verifyFileHash(apkFile, file.hash)) {
throw HashMismatchException(apkFile, file.hash)
}
apkFile
}
} finally {
cancelHandler.dispose()
}
}
}.awaitAll()
}
outputStream.write(buffer, 0, bytesRead)
downloaded += bytesRead.toLong()
val percent = if (contentLength > 0) {
(downloaded * 100 / contentLength).toInt()
} else {
0
}
withContext(Dispatchers.Main) {
onProgress(percent, downloaded, contentLength)
}
}
outputStream.flush()
inputStream.close()
outputStream.close()
withContext(Dispatchers.Main) {
onSuccess(apkFile)
}
withContext(Dispatchers.Main) {
onSuccess(resultingFiles)
}
} catch (e: Exception) {
if (apkFile.exists()) {
apkFile.delete()
}
if (e.message?.contains("Canceled") == true || e.message?.contains("closed") == true || e.message?.contains("CANCEL") == true) {
onCancel()
} else {
withContext(Dispatchers.Main) {
onError(e)
withContext(NonCancellable) {
if (e is HashMismatchException) {
val expectedHash = formatHashForDisplay(e.expectedHash)
val actualHash = computeExistingHash(e.file)
val filesCopy = downloadedFiles.toList()
withContext(Dispatchers.Main) {
onInvalidHash(filesCopy, expectedHash, actualHash)
}
} else {
// Удаляем недокачанные файлы при любой другой ошибке или отмене
downloadedFiles.forEach { if (it.exists()) it.delete() }
withContext(Dispatchers.Main) {
if (e is CancellationException || (e is IOException && callIsCanceled(e))) {
onCancel()
} else {
onError(e)
}
}
}
}
}
}
return {
call.cancel()
}
return { downloadRunner.cancel() }
}
fun isApkAlreadyDownloaded(fileName: String): Boolean {
val apkFile = getApkFile(fileName)
return apkFile.exists() && apkFile.length() > 0
private fun callIsCanceled(e: IOException): Boolean {
return e.message?.contains("Canceled", ignoreCase = true) == true ||
e.message?.contains("Socket closed", ignoreCase = true) == true
}
private class HashMismatchException(val file: File, val expectedHash: String) : IOException("Hash mismatch")
fun getApkFile(fileName: String): File {
return File(context.externalCacheDir, fileName)
return File(context.externalCacheDir ?: context.cacheDir, fileName)
}
fun deleteApkFile(fileName: String) {
val apkFile = getApkFile(fileName)
if (apkFile.exists()) {
apkFile.delete()
fun cleanApkFiles(files: List<String>) {
files.forEach {
val apkFile = getApkFile(it)
if (apkFile.exists()) {
apkFile.delete()
}
}
}
fun getApkFileSize(fileName: String): Long {
return getApkFile(fileName).length()
}
private val installer = context.packageManager.packageInstaller
private val flags = PendingIntent.FLAG_MUTABLE
private val intent = Intent(context, PackageInstallerStatusReceiver::class.java)
private val sessionParams =
PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL).apply {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED)
private fun verifyFileHash(file: File, expectedHash: String): Boolean {
val normalizedHash = expectedHash.trim().ifEmpty { return true }
val expectedBytes = decodeHashValue(normalizedHash) ?: return true
if (expectedBytes.size != 8) return true
val actualBytes = digestFileXXH64(file) ?: return false
return actualBytes.contentEquals(expectedBytes)
}
private fun decodeHashValue(hash: String): ByteArray? {
return try {
if (hash.matches(Regex("^[0-9A-Fa-f]+$"))) {
hash.chunked(2).map { it.toInt(16).toByte() }.toByteArray()
} else {
Base64.decode(hash, Base64.DEFAULT)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
setRequestUpdateOwnership(true)
} catch (e: Exception) {
null
}
}
private fun formatHashForDisplay(hash: String): String {
return if (hash.matches(Regex("^[0-9A-Fa-f]+$"))) {
hash.lowercase()
} else {
hash
}
}
private fun computeExistingHash(file: File): String {
val actualBytes = digestFileXXH64(file) ?: return ""
return actualBytes.toHexString()
}
private fun digestFileXXH64(file: File): ByteArray? {
return try {
val factory = XXHashFactory.fastestInstance()
val hash64 = factory.newStreamingHash64(0L)
FileInputStream(file).use { fis ->
val buffer = ByteArray(8192)
var bytesRead: Int
while (fis.read(buffer).also { bytesRead = it } != -1) {
hash64.update(buffer, 0, bytesRead)
}
}
val hashValue = hash64.getValue()
byteArrayOf(
(hashValue shr 56).toByte(),
(hashValue shr 48).toByte(),
(hashValue shr 40).toByte(),
(hashValue shr 32).toByte(),
(hashValue shr 24).toByte(),
(hashValue shr 16).toByte(),
(hashValue shr 8).toByte(),
hashValue.toByte()
)
} catch (e: Exception) {
null
}
}
private fun ByteArray.toHexString(): String {
val sb = StringBuilder(size * 2)
for (b in this) {
sb.append(String.format("%02x", b))
}
return sb.toString()
}
fun installApp(
packageName: String,
apkFiles: List<File>,
onSessionFinished: (Boolean) -> Unit = {},
onError: (Exception) -> Unit = {}
) {
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
val installerType = prefs.getString("installer_type", "session")
when (installerType) {
"session" -> {
installViaSession(apkFiles, onSessionFinished, onError)
}
"intent" -> {
installViaIntent(packageName, apkFiles, onError)
}
}
}
fun installApk(context: Context, apkFile: File, installerCallback: PackageInstaller.SessionCallback, onError: (e: Exception) -> Unit) {
private fun installViaSession(
apkFiles: List<File>,
onSessionFinished: (Boolean) -> Unit,
onError: (Exception) -> Unit
) {
try {
val id = installer.createSession(sessionParams)
installer.registerSessionCallback(
installerCallback,
Handler(Looper.getMainLooper())
)
val session = installer.openSession(id)
session.use { activeSession ->
val sizeBytes = apkFile.length()
apkFile.inputStream().use { fileStream ->
activeSession.openWrite(apkFile.name, 0, sizeBytes).use { outputStream ->
fileStream.copyTo(outputStream)
activeSession.fsync(outputStream)
val sessionParams =
PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL).apply {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
setRequestUpdateOwnership(true)
}
}
val pendingIntent = PendingIntent.getBroadcast(context, id, intent, flags)
val sessionId = installer.createSession(sessionParams)
installer.registerSessionCallback(object : PackageInstaller.SessionCallback() {
override fun onCreated(sessionId: Int) {}
override fun onBadgingChanged(sessionId: Int) {}
override fun onActiveChanged(sessionId: Int, active: Boolean) {}
override fun onProgressChanged(sessionId: Int, progress: Float) {}
override fun onFinished(id: Int, success: Boolean) {
if (id == sessionId) {
onSessionFinished(success)
installer.unregisterSessionCallback(this)
}
}
}, Handler(Looper.getMainLooper()))
val session = installer.openSession(sessionId)
session.use { activeSession ->
apkFiles.forEach { file ->
val sizeBytes = file.length()
file.inputStream().use { fileStream ->
activeSession.openWrite(file.name, 0, sizeBytes).use { outputStream ->
fileStream.copyTo(outputStream)
activeSession.fsync(outputStream)
}
}
}
val pendingIntent = PendingIntent.getBroadcast(context, sessionId, intent, flags)
activeSession.commit(pendingIntent.intentSender)
}
} catch (e: Exception) {
Log.e("ApkInstaller", "Error during session install", e)
onError(e)
}
}
}
private fun installViaIntent(
packageName: String,
apkFiles: List<File>,
onError: (Exception) -> Unit
) {
try {
val apkUri: Uri
if (apkFiles.size == 1) {
apkUri = FileProvider.getUriForFile(
context,
"${context.packageName}.provider",
apkFiles[0]
)
} else {
Toast.makeText(context, R.string.intent_installer_split_apk_build, Toast.LENGTH_SHORT)
.show()
val apksFile = File(context.externalCacheDir ?: context.cacheDir, "$packageName.apks")
buildSplitApk(apkFiles, apksFile)
apkUri = FileProvider.getUriForFile(
context,
"${context.packageName}.provider",
apksFile
)
}
Toast.makeText(context, R.string.intent_installer_warning, Toast.LENGTH_SHORT)
.show()
val intent = Intent(Intent.ACTION_VIEW).apply {
setDataAndType(apkUri, "application/vnd.android.package-archive")
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_ACTIVITY_NEW_TASK
}
context.startActivity(intent)
} catch (e: Exception) {
Log.e("ApkInstaller", "Error during intent install", e)
onError(e)
}
}
private fun buildSplitApk(apkFiles: List<File>, outputZip: File) {
ZipOutputStream(BufferedOutputStream(FileOutputStream(outputZip))).use { zos ->
apkFiles.forEach { file ->
FileInputStream(file).use { fis ->
val entry = ZipEntry(file.name)
zos.putNextEntry(entry)
fis.copyTo(zos)
zos.closeEntry()
}
}
}
}
}

View file

@ -4,6 +4,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInstaller
import android.util.Log
import android.widget.Toast
import androidx.core.os.BundleCompat
import dev.mi6e4ka.openstore.R
@ -33,7 +34,15 @@ class PackageInstallerStatusReceiver : BroadcastReceiver() {
}
}
else -> {
Toast.makeText(context, if (isUninstall) R.string.failed_uninstall else R.string.failed_install, Toast.LENGTH_SHORT).show()
val errorMessage = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE)
if (errorMessage?.contains("INSUFFICIENT_STORAGE", ignoreCase = true) == true) {
Toast.makeText(context, R.string.insufficient_memory, Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(context, if (isUninstall) R.string.failed_uninstall else R.string.failed_install, Toast.LENGTH_SHORT).show()
}
Log.e("app manager", errorMessage ?: "no error message")
}
}
}
@ -41,4 +50,4 @@ class PackageInstallerStatusReceiver : BroadcastReceiver() {
companion object {
const val ACTION_UNINSTALL = "action_uninstall"
}
}
}

View file

@ -1,14 +1,14 @@
package dev.mi6e4ka.openstore.ui.components
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Error
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import coil.compose.SubcomposeAsyncImage
import dev.mi6e4ka.openstore.R
@Composable
fun AppIcon(
@ -27,7 +27,7 @@ fun AppIcon(
error = {
Icon(
modifier = Modifier.size(24.dp),
imageVector = Icons.Filled.Error,
painter = painterResource(R.drawable.ic_broken_image_24px),
contentDescription = "Error"
)
}

View file

@ -33,6 +33,9 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.hideFromAccessibility
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
@ -62,7 +65,8 @@ fun GalleryWithPager(images: List<Files>) {
modifier = Modifier.height(250.dp)
) {
LazyRow(
horizontalArrangement = Arrangement.spacedBy(8.dp)
horizontalArrangement = Arrangement.spacedBy(8.dp),
modifier = Modifier.clearAndSetSemantics{}
) {
itemsIndexed(images) { i, file ->
var isLoading by remember { mutableStateOf(true) }

View file

@ -1,12 +1,8 @@
package dev.mi6e4ka.openstore.ui.screen.details
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.util.Log
import android.widget.Toast
import androidx.compose.animation.animateContentSize
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
@ -14,12 +10,14 @@ import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.spring
import androidx.compose.animation.core.tween
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
@ -28,18 +26,6 @@ import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.ExperimentalMaterialApi
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.rounded.ArrowForward
import androidx.compose.material.icons.filled.ArrowCircleUp
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.OpenInBrowser
import androidx.compose.material.icons.filled.SupervisedUserCircle
import androidx.compose.material.icons.rounded.Android
import androidx.compose.material.icons.rounded.Download
import androidx.compose.material.icons.rounded.Security
import androidx.compose.material.icons.rounded.Warning
import androidx.compose.material3.AssistChip
import androidx.compose.material3.Button
import androidx.compose.material3.Card
@ -52,10 +38,13 @@ import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.LocalMinimumInteractiveComponentEnforcement
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
@ -64,6 +53,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
@ -76,6 +66,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.core.content.ContextCompat
import androidx.core.net.toUri
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavController
@ -86,11 +77,28 @@ import dev.mi6e4ka.openstore.internal.installer.ApkInstaller
import dev.mi6e4ka.openstore.ui.components.AppIcon
import dev.mi6e4ka.openstore.ui.components.GalleryWithPager
import kotlinx.coroutines.launch
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.TimeZone
import kotlinx.datetime.format
import kotlinx.datetime.format.FormatStringsInDatetimeFormats
import kotlinx.datetime.format.byUnicodePattern
import kotlinx.datetime.toLocalDateTime
import android.Manifest
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import kotlin.time.ExperimentalTime
import kotlin.time.Instant
@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterial3Api::class,
FormatStringsInDatetimeFormats::class, ExperimentalTime::class
)
@Composable
fun DetailsScreen(
itemId: String,
appPlatform: String,
navController: NavController = rememberNavController()
) {
val context = LocalContext.current
@ -98,17 +106,27 @@ fun DetailsScreen(
//val viewModel = remember (itemId) { DetailsViewModel(itemId, apkInstaller) }
val viewModel : DetailsViewModel = viewModel(
factory = DetailsViewModelFactory(itemId, apkInstaller)
factory = DetailsViewModelFactory(appPlatform, apkInstaller)
)
val state by viewModel.state.collectAsState()
val scope = rememberCoroutineScope()
var showAppDescriptionSheet by remember { mutableStateOf(false) }
var showHashDetails by remember { mutableStateOf(false) }
// val appDescriptionSheetState = rememberModalBottomSheetState(
// skipPartiallyExpanded = true
// )
val permissionLauncher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.RequestPermission(),
onResult = { isGranted ->
if (isGranted) {
viewModel.downloadFileToFolder(context)
}
}
)
LaunchedEffect(itemId) {
viewModel.loadDetails(context, itemId)
}
@ -125,23 +143,48 @@ fun DetailsScreen(
navigationIcon = {
IconButton(onClick = { navController.popBackStack() }) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Back"
painter = painterResource(R.drawable.ic_arrow_back_24px),
contentDescription = stringResource(R.string.back_button_desc)
)
}
},
actions = {
IconButton(onClick = {
scope.launch {
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("", state.downloadLink)
clipboard.setPrimaryClip(clip)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
Toast.makeText(context, R.string.copied_to_buffer, Toast.LENGTH_SHORT).show()
IconButton(
{
scope.launch {
viewModel.copyTextToCB(context, state.plainApkUrl ?: "")
}
}
}, enabled = state.downloadLink != null) {
Icon(painterResource(R.drawable.apk_install_24px), null)
){
Icon(
painterResource(R.drawable.ic_link_24px),
stringResource(R.string.copy_link_desc)
)
}
IconButton(
{
scope.launch {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
viewModel.downloadFileToFolder(context)
} else {
val permissionStatus = ContextCompat.checkSelfPermission(
context,
Manifest.permission.WRITE_EXTERNAL_STORAGE
)
if (permissionStatus == PackageManager.PERMISSION_GRANTED) {
viewModel.downloadFileToFolder(context)
} else {
permissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE)
}
}
}
}
){
Icon(
painterResource(R.drawable.apk_install_24px),
stringResource(R.string.download_apk_desc)
)
}
IconButton(onClick = {
val intent = Intent(Intent.ACTION_VIEW, "https://www.rustore.ru/catalog/app/${state.item?.packageName ?: ""}".toUri()).apply {
@ -149,8 +192,11 @@ fun DetailsScreen(
setSelector(Intent(Intent.ACTION_VIEW, "http://".toUri()))
}
context.startActivity(intent)
}) {
Icon(Icons.Default.OpenInBrowser, null)
}, enabled = state.item != null) {
Icon(
painterResource(R.drawable.ic_captive_portal_24px),
stringResource(R.string.open_in_browser_desc)
)
}
}
) }
@ -175,6 +221,36 @@ fun DetailsScreen(
}
}
}
if (state.invalidDownloadedApkFiles != null) {
AlertDialog(
onDismissRequest = { viewModel.clearInvalidDownloadState() },
title = { Text(stringResource(R.string.invalid_download_hash_title)) },
text = {
Column {
Text(stringResource(R.string.invalid_download_hash_message))
Spacer(modifier = Modifier.size(12.dp))
TextButton(onClick = { showHashDetails = !showHashDetails }) {
Text(stringResource(R.string.show_hashes))
}
if (showHashDetails) {
Spacer(modifier = Modifier.size(8.dp))
Text(stringResource(R.string.expected_hash, state.invalidExpectedHash ?: ""))
Text(stringResource(R.string.actual_hash, state.invalidActualHash ?: ""))
}
}
},
confirmButton = {
TextButton(onClick = { viewModel.retryDownloadAfterInvalid(context) }) {
Text(stringResource(R.string.download_again))
}
},
dismissButton = {
TextButton(onClick = { viewModel.installAsIsAfterInvalid(context) }) {
Text(stringResource(R.string.install_as_is))
}
}
)
}
if (state.isLoading) {
LinearProgressIndicator(modifier = Modifier
.padding(horizontal = 4.dp)
@ -213,14 +289,14 @@ fun DetailsScreen(
verticalAlignment = Alignment.CenterVertically
) {
Icon(
imageVector = Icons.Rounded.Security,
painter = painterResource(R.drawable.ic_security_24px),
contentDescription = null,
modifier = Modifier.size(28.dp)
)
if (item.aggregatorInfo != null) {
Text(stringResource(R.string.provided_by, item.aggregatorInfo.source))
Text(stringResource(R.string.provided_by_third_party, item.aggregatorInfo.source))
} else {
Text(stringResource(R.string.provided_by, "RuStore"))
Text(stringResource(R.string.provided_by_developer))
}
}
}
@ -268,7 +344,7 @@ fun DetailsScreen(
verticalArrangement = Arrangement.spacedBy(4.dp)
) {
Text(item.appName, fontSize = 24.sp, fontWeight = FontWeight.Bold, maxLines = 2, overflow = TextOverflow.Ellipsis)
Text(item.aggregatorInfo?.companyName ?: item.companyName, maxLines = 2, overflow = TextOverflow.Ellipsis)
Text(item.aggregatorInfo?.companyName ?: item.companyName, maxLines = 2, overflow = TextOverflow.Ellipsis, modifier = Modifier.clearAndSetSemantics(){contentDescription = "Разработчик: ${item.aggregatorInfo?.companyName ?: item.companyName}"})
}
}
if (!state.isSupported) {
@ -276,18 +352,40 @@ fun DetailsScreen(
horizontalArrangement = Arrangement.spacedBy(12.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(Icons.Rounded.Warning, null, tint = MaterialTheme.colorScheme.error, modifier = Modifier.size(22.dp))
Icon(painterResource(R.drawable.ic_warning_24px), null, tint = MaterialTheme.colorScheme.error, modifier = Modifier.size(22.dp))
Text(stringResource(R.string.device_unsupported), color = MaterialTheme.colorScheme.error)
}
}
if (state.isInstalled && state.isNeedUpgrade &&
state.installerPackageName != context.packageName &&
state.installerPackageName != "ru.vk.store") {
Card(
colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.primaryContainer),
modifier = Modifier.fillMaxWidth()
) {
Row(
Modifier.padding(12.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically
) {
Icon(painterResource(R.drawable.ic_warning_24px), null, tint = MaterialTheme.colorScheme.onPrimaryContainer)
Text(
stringResource(R.string.signature_mismatch_warning),
fontSize = 16.sp
//color = MaterialTheme.colorScheme.onPrimaryContainer
)
}
}
}
Column {
Row(
horizontalArrangement = Arrangement.spacedBy(8.dp)
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (!state.isInstalled || state.isDownloading) {
//FilledTonalButton(onClick = {}, modifier = Modifier.weight(1f)) { Text("Copy apk link") }
Button(onClick = {
viewModel.downloadAndInstallApk(context)
viewModel.downloadAndInstallApp(context)
}, modifier = Modifier.weight(1f), enabled = !state.isDownloading && state.isSupported) {
if (state.installStatus is InstallStatus.Pending) {
Text(stringResource(R.string.installing))
@ -305,10 +403,19 @@ fun DetailsScreen(
FilledTonalButton(onClick = {
viewModel.deleteApplication(context, itemId)
}, modifier = Modifier.weight(1f)) { Text(stringResource(R.string.uninstall)) }
if (state.isNeedUpgrade) {
Button(onClick = {
viewModel.downloadAndInstallApk(context)
viewModel.downloadAndInstallApp(context)
}, modifier = Modifier.weight(1f), enabled = state.isSupported) { Text(stringResource(R.string.update)) }
CompositionLocalProvider(LocalMinimumInteractiveComponentEnforcement provides false) {
FilledTonalIconButton(onClick = {
viewModel.runApplication(context, itemId)
}, modifier = Modifier.size(40.dp)) {
Icon(painterResource(R.drawable.ic_open_in_browser_24px), contentDescription = stringResource(R.string.open))
}
}
} else {
Button(onClick = {
viewModel.runApplication(context, itemId)
@ -316,10 +423,12 @@ fun DetailsScreen(
}
}
if (state.isDownloading) {
FilledTonalIconButton(onClick = {
viewModel.cancelDownload()
}, enabled = state.installStatus != InstallStatus.Pending) {
Icon(imageVector = Icons.Default.Close, null)
CompositionLocalProvider(LocalMinimumInteractiveComponentEnforcement provides false) {
FilledTonalIconButton(onClick = {
viewModel.cancelDownload()
}, enabled = state.installStatus != InstallStatus.Pending, modifier = Modifier.size(40.dp)) {
Icon(painterResource(R.drawable.ic_close_24px), null)
}
}
}
}
@ -330,20 +439,40 @@ fun DetailsScreen(
.padding(bottom = 4.dp, top = 2.dp),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
//InfoBadge("%.1f MB".format(item.fileSize/1024/1024), "Вес")
// InfoBadge(, "загрузок")
// InfoBadge("${getAndroidVersion(item.minSdkVersion)}+", "Android",
// Modifier
// .clip(RoundedCornerShape(12.dp))
// .clickable(onClick = {
//
// }))
// InfoBadge(item.ageLegal, "возраст")
// InfoBadge(item.versionName, "версия")
AssistChip(
label = {
Text("%.1f MB".format(
(state.appFiles?.sumOf { it.size } ?: 0L) / 1024.0 / 1024.0)
)
},
leadingIcon = {
Icon(
painterResource(R.drawable.ic_upload_file_24px),
stringResource(R.string.app_size_desc)
)},
onClick = {},
)
AssistChip(
onClick = {},
label = {Text(item.versionName)},
leadingIcon = {
Icon(
painterResource(R.drawable.ic_arrow_circle_up_24px),
stringResource(R.string.latest_version_desc)
)}
)
AssistChip(
onClick = {},
label = {FormattedDateText(item.appVerUpdatedAt)},
leadingIcon = {
Icon(
painterResource(R.drawable.ic_update_24px),
stringResource(R.string.last_update_desc)
)}
)
var detailedApiVersion by remember { mutableStateOf(false) }
AssistChip(
onClick = {
//Toast.makeText(context, "MinSdkVersion ${item.minSdkVersion}\nTargetSdkVersion ${item.targetSdkVersion}", Toast.LENGTH_SHORT).show()
detailedApiVersion = !detailedApiVersion
},
label = {
@ -353,30 +482,53 @@ fun DetailsScreen(
Text("API ${item.minSdkVersion} +")
}
},
leadingIcon = {Icon(imageVector = Icons.Rounded.Android, contentDescription = null)}
leadingIcon = {
Icon(
painterResource(R.drawable.ic_android_24px),
stringResource(R.string.min_api_desc)
)}
)
AssistChip(
onClick = {},
label = {Text(if ((state.appFiles?.size ?: 1) > 1) "${state.appFiles?.size} Split APKs" else "APK")},
leadingIcon = {
Icon(
painterResource(R.drawable.ic_adb_24px),
stringResource(R.string.installer_type_desc)
)}
)
AssistChip(
onClick = {},
label = {Text(item.roundedDownloadsText)},
leadingIcon = {Icon(imageVector = Icons.Rounded.Download, contentDescription = null)}
)
AssistChip(
onClick = {},
label = {Text(item.versionName)},
leadingIcon = {Icon(imageVector = Icons.Default.ArrowCircleUp, contentDescription = null)}
leadingIcon = {
Icon(
painterResource(R.drawable.ic_download_24px),
stringResource(R.string.downloads_desc)
)}
)
AssistChip(
onClick = {},
label = {Text(item.ageLegal)},
leadingIcon = {Icon(imageVector = Icons.Default.SupervisedUserCircle, contentDescription = null)}
leadingIcon = {
Icon(
painterResource(R.drawable.ic_supervised_user_circle_24px),
stringResource(R.string.age_legal_desc)
)}
)
}
GalleryWithPager(item.fileUrls)
}
var isWhatsNewExpanded by remember { mutableStateOf(false) }
Card(
modifier = Modifier.fillMaxWidth(),
onClick = {isWhatsNewExpanded = !isWhatsNewExpanded}
modifier = Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.combinedClickable(
onClick = {isWhatsNewExpanded = !isWhatsNewExpanded},
onLongClick = {
viewModel.copyTextToCB(context, item.whatsNew)
}
),
) {
Column(
Modifier
@ -413,7 +565,7 @@ fun DetailsScreen(
) {
Text(stringResource(R.string.about_app), fontWeight = FontWeight.Bold, fontSize = 18.sp)
IconButton(onClick = {showAppDescriptionSheet = true}) {
Icon(imageVector = Icons.AutoMirrored.Rounded.ArrowForward, contentDescription = null)
Icon(painterResource(R.drawable.ic_arrow_forward_24px), contentDescription = null)
}
}
Text(text = item.shortDescription)
@ -427,6 +579,13 @@ fun DetailsScreen(
restoreState = true
}
})
.clearAndSetSemantics {
contentDescription = context.getString(
R.string.reviews_desc,
state.rating?.averageUserRating ?: 0,
state.rating?.totalRatings ?: 0
)
}
) {
Row(
Modifier
@ -498,6 +657,22 @@ fun DetailsScreen(
}
}
@OptIn(ExperimentalTime::class, FormatStringsInDatetimeFormats::class)
@Composable
fun FormattedDateText(dateString: String) {
val formattedDate = remember(dateString) {
try {
Instant.parse(dateString)
.toLocalDateTime(TimeZone.currentSystemDefault())
.format(LocalDateTime.Format { byUnicodePattern("dd.MM.yyyy") })
} catch (e: Exception) {
"..."
}
}
Text(text = formattedDate)
}
fun getAndroidVersion(apiLevel: Int): String {
val versions = mapOf(
1 to "1.0",

View file

@ -1,20 +1,23 @@
package dev.mi6e4ka.openstore.ui.screen.details
import android.app.DownloadManager
import android.app.PendingIntent
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.os.Build
import android.os.Environment
import android.util.Log
import android.widget.Toast
import androidx.core.net.toUri
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.viewModelScope
import dev.mi6e4ka.openstore.R
import dev.mi6e4ka.openstore.data.model.AppCommentsResponseBody
import dev.mi6e4ka.openstore.data.model.AppRatingResponseBody
import dev.mi6e4ka.openstore.data.model.DownloadLinkResponseItem
import dev.mi6e4ka.openstore.data.model.ItemDetails
import dev.mi6e4ka.openstore.di.AppModule
import dev.mi6e4ka.openstore.internal.installer.ApkInstaller
@ -25,13 +28,16 @@ import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import java.io.File
import androidx.core.net.toUri
data class DetailsState(
val isLoading: Boolean = true,
val item: ItemDetails? = null,
val rating: AppRatingResponseBody? = null,
val error: String? = null,
val downloadLink: String? = null,
val appFiles: List<DownloadLinkResponseItem>? = null,
val plainApkUrl: String? = null,
val splitOnly: Boolean? = null,
val installStatus: InstallStatus = InstallStatus.Idle,
val isDownloading: Boolean = false,
val downloadProgress: Int = 0,
@ -40,6 +46,11 @@ data class DetailsState(
val isInstalled: Boolean = false,
val isNeedUpgrade: Boolean = false,
val isSupported: Boolean = true,
val installerPackageName: String? = null,
val invalidDownloadedApkFiles: List<File>? = null,
val invalidDownloadMessage: String? = null,
val invalidExpectedHash: String? = null,
val invalidActualHash: String? = null
)
sealed class InstallStatus {
@ -48,7 +59,7 @@ sealed class InstallStatus {
object Success : InstallStatus()
}
class DetailsViewModel(private val itemId: String, private val apkInstaller: ApkInstaller) : ViewModel() {
class DetailsViewModel(private val appPlatform: String, private val apkInstaller: ApkInstaller) : ViewModel() {
private val _state = MutableStateFlow(DetailsState())
val state: StateFlow<DetailsState> = _state.asStateFlow()
private var cancelDownload: (() -> Unit)? = null
@ -59,44 +70,83 @@ class DetailsViewModel(private val itemId: String, private val apkInstaller: Apk
}
Log.d(null, "Initial loading")
viewModelScope.launch {
var item: ItemDetails? = null
// основная информация о приложении
try {
val item = AppModule.searchRepository.getItemDetails(itemId)
item = AppModule.searchRepository.getItemDetails(itemId, appPlatform)
//
val packageInfo = getPackageInfo(context, itemId)
_state.value = DetailsState(isLoading = true, isInstalled = packageInfo != null)
val installer = if (packageInfo != null) getInstallSource(context.packageManager, itemId) else null
_state.value = DetailsState(
isLoading = true,
isInstalled = packageInfo != null,
installerPackageName = installer
)
if (packageInfo != null) {
val installedVersionCode = (if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
packageInfo.longVersionCode
} else {
packageInfo.versionCode
}) as Long
@Suppress("DEPRECATION")
packageInfo.versionCode.toLong()
})
if (installedVersionCode < item.versionCode) {
_state.update { it.copy(isNeedUpgrade = true) }
}
}
//
_state.update { it.copy(isSupported = Build.VERSION.SDK_INT >= item.minSdkVersion) }
val downloadLink = AppModule.searchRepository.getAppDownloadLink(item.appId)
val rating = AppModule.searchRepository.getAppRating(itemId)
_state.update{ it.copy(item = item, rating = rating, downloadLink = downloadLink, isLoading = false) }
_state.update{ it.copy(item = item) }
} catch (e: Exception) {
_state.update { it.copy(error = e.message, isLoading = false) }
}
// пробуем получить все файлы приложения (включая split)
try {
if (item == null) return@launch
val appFiles = AppModule.searchRepository.getAppFiles(item.appId, firstInstall = true, supportedAbis = Build.SUPPORTED_ABIS.toList(), withoutSplits = false, deviceType = appPlatform)
_state.update{ it.copy(appFiles = appFiles) }
} catch (e: Exception) {}
// пробуем получить файлы приложения указав что нам не нужны split apk
try {
if (item == null) return@launch
val singleApkUrl = AppModule.searchRepository.getAppFiles(item.appId, firstInstall = true, supportedAbis = Build.SUPPORTED_ABIS.toList(), withoutSplits = true, deviceType = appPlatform).firstOrNull()?.url
_state.update{ it.copy(plainApkUrl = singleApkUrl, splitOnly = singleApkUrl == null) }
} catch (e: Exception) {}
// рейтинг
try {
val rating = AppModule.searchRepository.getAppRating(itemId)
_state.update{ it.copy(rating = rating) }
} catch (e: Exception) {}
_state.update { it.copy(isLoading = false) }
}
}
fun downloadAndInstallApk(context: Context) {
private fun getInstallSource(pm: PackageManager, packageName: String): String? {
return try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
pm.getInstallSourceInfo(packageName).installingPackageName
} else {
@Suppress("DEPRECATION")
pm.getInstallerPackageName(packageName)
}
} catch (e: Exception) {
null
}
}
fun downloadAndInstallApp(context: Context) {
viewModelScope.launch {
_state.update { it.copy(isDownloading = true, downloadProgress = 0, downloadTotalBytes = 0, downloadCurrentBytes = 0) }
Log.d(null, "download apk " + state.value.downloadLink)
cancelDownload = apkInstaller.downloadApkWithProgress(
state.value.downloadLink ?: "",
Log.d(null, "download apk " + state.value.appFiles)
cancelDownload = apkInstaller.downloadFilesWithProgress(
state.value.appFiles!!,
onProgress = { percent, downloaded, total ->
_state.update { it.copy(downloadProgress = percent, downloadCurrentBytes = downloaded, downloadTotalBytes = total) }
},
onSuccess = { apkFile ->
installApk(context, apkFile)
onSuccess = { apkFiles ->
installApp(context, apkFiles)
},
onError = { error ->
if (error.message?.contains("timeout") == true) {
@ -104,27 +154,25 @@ class DetailsViewModel(private val itemId: String, private val apkInstaller: Apk
} else if (error.message?.contains("Failed to allocate") == true) {
Toast.makeText(context, R.string.insufficient_memory, Toast.LENGTH_SHORT).show()
} else {
println("ERROR: ${error.message}")
Toast.makeText(context, R.string.loading_error, Toast.LENGTH_SHORT).show()
}
_state.update { it.copy(isDownloading = false) }
},
onCancel = {
_state.update { it.copy(isDownloading = false) }
},
onInvalidHash = { apkFiles, expectedHash, actualHash ->
_state.update {
it.copy(
isDownloading = false,
invalidDownloadedApkFiles = apkFiles,
invalidDownloadMessage = "Файл скачан некорректно.",
invalidExpectedHash = expectedHash,
invalidActualHash = actualHash
)
}
}
)
// val uri = FileProvider.getUriForFile(
// context,
// "${context.packageName}.provider",
// apkFile
// )
//
// val intent = Intent(Intent.ACTION_VIEW).apply {
// setDataAndType(uri, "application/vnd.android.package-archive")
// addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
// addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
// }
// launcher.launch(intent)
}
}
@ -133,30 +181,75 @@ class DetailsViewModel(private val itemId: String, private val apkInstaller: Apk
cancelDownload = null
}
private fun installApk(context: Context, apkFile: File) {
viewModelScope.launch {
_state.update { it.copy(installStatus = InstallStatus.Pending) }
val installerCallback = object : android.content.pm.PackageInstaller.SessionCallback() {
override fun onCreated(sessionId: Int) {}
override fun onBadgingChanged(sessionId: Int) {}
override fun onActiveChanged(sessionId: Int, active: Boolean) {}
override fun onProgressChanged(sessionId: Int, progress: Float) {}
override fun onFinished(sessionId: Int, success: Boolean) {
_state.update { it.copy(installStatus = InstallStatus.Success, isDownloading = false)}
if (success) {
_state.update { it.copy(isInstalled = true, isNeedUpgrade = false) }
apkInstaller.deleteApkFile(apkFile.name)
}
private fun installApp(context: Context, apkFiles: List<File>) {
val packageName = state.value.item?.packageName ?: "tmp"
_state.update { it.copy(installStatus = InstallStatus.Pending) }
apkInstaller.installApp(
packageName = packageName,
apkFiles = apkFiles,
onSessionFinished = { success ->
_state.update { it.copy(installStatus = InstallStatus.Success, isDownloading = false)}
if (success) {
_state.update { it.copy(isInstalled = true, isNeedUpgrade = false, installerPackageName = context.packageName) }
apkInstaller.cleanApkFiles(apkFiles.map {it.name})
}
},
onError = { error ->
if (error.message?.contains("Failed to allocate") == true) {
Toast.makeText(
context,
R.string.insufficient_memory,
Toast.LENGTH_SHORT
).show()
} else {
println("apk installer $error")
Toast.makeText(context, R.string.installing_error, Toast.LENGTH_SHORT)
.show()
}
_state.update {
it.copy(
installStatus = InstallStatus.Idle,
isDownloading = false
)
}
}
apkInstaller.installApk(context, apkFile, installerCallback, onError = { error ->
if (error.message?.contains("Failed to allocate") == true) {
Toast.makeText(context, R.string.insufficient_memory, Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(context, R.string.installing_error, Toast.LENGTH_SHORT).show()
}
_state.update { it.copy(installStatus = InstallStatus.Idle, isDownloading = false) }
})
)
}
fun retryDownloadAfterInvalid(context: Context) {
_state.update {
it.copy(
invalidDownloadedApkFiles = null,
invalidDownloadMessage = null,
invalidExpectedHash = null,
invalidActualHash = null
)
}
downloadAndInstallApp(context)
}
fun installAsIsAfterInvalid(context: Context) {
val apkFiles = state.value.invalidDownloadedApkFiles ?: return
_state.update {
it.copy(
invalidDownloadedApkFiles = null,
invalidDownloadMessage = null,
invalidExpectedHash = null,
invalidActualHash = null
)
}
installApp(context, apkFiles)
}
fun clearInvalidDownloadState() {
_state.update {
it.copy(
invalidDownloadedApkFiles = null,
invalidDownloadMessage = null,
invalidExpectedHash = null,
invalidActualHash = null
)
}
}
@ -195,7 +288,34 @@ class DetailsViewModel(private val itemId: String, private val apkInstaller: Apk
}
fun updateInstallStatus(isInstalled: Boolean) {
_state.update { it.copy(isInstalled = isInstalled) }
_state.update { it.copy(isInstalled = isInstalled, installerPackageName = if (isInstalled) it.installerPackageName else null) }
}
fun downloadFileToFolder(context: Context) {
val fileName = "${state.value.item?.packageName}-${state.value.item?.versionName}.apk"
val request = DownloadManager.Request(state.value.plainApkUrl?.toUri())
.setTitle(fileName)
.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)
.setMimeType("application/vnd.android.package-archive")
.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, fileName)
val downloadManager = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
context.getSystemService(DownloadManager::class.java)
} else {
@Suppress("DEPRECATION")
context.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
}
downloadManager.enqueue(request)
Toast.makeText(context, R.string.download_has_started, Toast.LENGTH_SHORT).show()
}
fun copyTextToCB(context: Context, text: String) {
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("", text)
clipboard.setPrimaryClip(clip)
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
Toast.makeText(context, R.string.copied_to_buffer, Toast.LENGTH_SHORT).show()
}
}
}

View file

@ -5,15 +5,16 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.Card
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
@ -21,13 +22,21 @@ import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.hideFromAccessibility
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@ -50,19 +59,50 @@ fun ResultsScreen(
val viewModel : ResultsViewModel = viewModel(
factory = ResultsViewModelFactory(query)
)
val resultsLazyPaging = viewModel.searchFlow.collectAsLazyPagingItems()
val resultsLazyPaging = viewModel.searchFlow.collectAsLazyPagingItems()
var platformSelectorExpanded by remember { mutableStateOf(false) }
val state by viewModel.state.collectAsState()
Scaffold(
topBar = { TopAppBar(
title = {Text(stringResource(R.string.search_title))},
navigationIcon = {
IconButton(onClick = { navController.popBackStack() }) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Back"
painterResource(R.drawable.ic_arrow_back_24px),
contentDescription = stringResource(R.string.back_button_desc)
)
}
},
actions = {
val platforms = remember {
listOf(
Platform(R.string.mobile_label, "mobile", R.drawable.ic_mobile_24px),
Platform(R.string.tv_label, "tv", R.drawable.ic_tv_gen_24px)
)
}
TextButton({platformSelectorExpanded = true}) {
Icon(
painterResource(state.selectedPlatform.icon),
contentDescription = stringResource(R.string.tts_current_platform)
)
Spacer(Modifier.size(8.dp))
Text(stringResource(state.selectedPlatform.label))
}
DropdownMenu(
expanded = platformSelectorExpanded,
onDismissRequest = {platformSelectorExpanded = false}
) {
platforms.forEach {
DropdownMenuItem(
leadingIcon = {Icon(painterResource(it.icon), null)},
text = { Text(stringResource(it.label)) },
onClick = { viewModel.selectPlatform(it); platformSelectorExpanded=false }
)
}
}
}
) }
) { innerPadding ->
LazyColumn(
@ -78,7 +118,7 @@ fun ResultsScreen(
Card(
modifier = Modifier
.clip(RoundedCornerShape(12.dp))
.clickable(onClick = { navController.navigate("app/${app.packageName}") })
.clickable(onClick = { navController.navigate("app/${app.packageName}?platform=${state.selectedPlatform.value}") })
) {
Row(
modifier = Modifier.fillMaxSize().padding(16.dp),
@ -90,7 +130,16 @@ fun ResultsScreen(
modifier = Modifier.weight(1f).padding(start = 16.dp,end = 4.dp)
) {
Text(text = app.appName, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(text = app.packageName, fontSize = 14.sp, maxLines = 1, overflow = TextOverflow.Ellipsis, color = MaterialTheme.colorScheme.secondary)
Text(
text = app.packageName,
fontSize = 14.sp,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
color = MaterialTheme.colorScheme.secondary,
modifier = Modifier.semantics{
hideFromAccessibility()
}
)
}
}
}
@ -139,5 +188,21 @@ fun ResultsScreen(
}
}
}
if (resultsLazyPaging.itemCount == 0 && resultsLazyPaging.loadState.isIdle) {
Column(
modifier = Modifier
.padding(horizontal = 16.dp)
.padding(bottom = 56.dp)
.fillMaxSize()
.padding(innerPadding)
.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Icon(painterResource(R.drawable.ic_search_24px), "", modifier = Modifier.size(64.dp))
Spacer(Modifier.size(4.dp))
Text(stringResource(R.string.not_found_error))
}
}
}
}

View file

@ -5,14 +5,37 @@ import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.viewModelScope
import androidx.paging.PagingData
import androidx.paging.cachedIn
import dev.mi6e4ka.openstore.R
import dev.mi6e4ka.openstore.data.model.SearchResult
import dev.mi6e4ka.openstore.di.AppModule
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.update
data class Platform(
val label: Int,
val value: String,
val icon: Int
)
data class ResultsState(
val selectedPlatform: Platform = Platform(R.string.mobile_label, "mobile", R.drawable.ic_mobile_24px),
)
class ResultsViewModel(private val query: String) : ViewModel() {
private val _state = MutableStateFlow(ResultsState())
val state: StateFlow<ResultsState> = _state.asStateFlow()
@OptIn(ExperimentalCoroutinesApi::class)
val searchFlow: Flow<PagingData<SearchResult>> = state.flatMapLatest {
AppModule.searchRepository.search(query, it.selectedPlatform.value).flow
}.cachedIn(viewModelScope)
val searchFlow: Flow<PagingData<SearchResult>> =
AppModule.searchRepository.search(query).flow.cachedIn(viewModelScope)
fun selectPlatform(newPlatform: Platform) {
_state.update { it.copy(selectedPlatform = newPlatform) }
}
}

View file

@ -15,13 +15,6 @@ import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.rememberScrollState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Check
import androidx.compose.material.icons.filled.Star
import androidx.compose.material.icons.filled.ThumbDownOffAlt
import androidx.compose.material.icons.filled.ThumbUpOffAlt
import androidx.compose.material.icons.outlined.StarBorder
import androidx.compose.material3.Card
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FilterChip
@ -42,7 +35,12 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
@ -100,8 +98,8 @@ fun ReviewsScreen(packageName: String, navController: NavController = rememberNa
navigationIcon = {
IconButton(onClick = { navController.popBackStack() }) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Back"
painterResource(R.drawable.ic_arrow_back_24px),
contentDescription = stringResource(R.string.back_button_desc)
)
}
},
@ -124,7 +122,7 @@ fun ReviewsScreen(packageName: String, navController: NavController = rememberNa
onClick = { selectedFilter = filter },
label = {Text(stringResource(filter.displayStringResource))},
leadingIcon = if (selectedFilter == filter) {
{ Icon(Icons.Default.Check, contentDescription = null) }
{ Icon(painterResource(R.drawable.ic_check_24px), contentDescription = null) }
} else null
)
}
@ -141,11 +139,12 @@ fun ReviewsScreen(packageName: String, navController: NavController = rememberNa
}
items(reviews ?: listOf()) { review ->
Card(
Modifier.fillMaxWidth()
Modifier.fillMaxWidth().semantics(mergeDescendants = true){}
) {
Column(
Modifier.padding(16.dp)
) {
val context = LocalContext.current
Row(
Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
@ -161,13 +160,16 @@ fun ReviewsScreen(packageName: String, navController: NavController = rememberNa
}
Spacer(Modifier.height(8.dp))
Row(
verticalAlignment = Alignment.CenterVertically
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.clearAndSetSemantics{
contentDescription = context.getString(R.string.review_rating_desc, review.appRating)
}
) {
repeat(review.appRating) {
Icon(Icons.Filled.Star, null, Modifier.size(16.dp), tint = MaterialTheme.colorScheme.primary)
Icon(painterResource(R.drawable.ic_star_filled_24px), null, Modifier.size(16.dp), tint = MaterialTheme.colorScheme.primary)
}
repeat(5 - review.appRating) {
Icon(Icons.Outlined.StarBorder, null, Modifier.size(16.dp), tint = MaterialTheme.colorScheme.secondary)
Icon(painterResource(R.drawable.ic_star_24px), null, Modifier.size(16.dp), tint = MaterialTheme.colorScheme.secondary)
}
}
Spacer(Modifier.height(8.dp))
@ -177,12 +179,12 @@ fun ReviewsScreen(packageName: String, navController: NavController = rememberNa
horizontalArrangement = Arrangement.spacedBy(16.dp)
) {
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(imageVector = Icons.Default.ThumbUpOffAlt, contentDescription = null, Modifier.size(20.dp), tint = MaterialTheme.colorScheme.secondary)
Icon(painterResource(R.drawable.ic_thumb_up_24px), contentDescription = stringResource(R.string.likes_desc), Modifier.size(20.dp), tint = MaterialTheme.colorScheme.secondary)
Spacer(Modifier.width(4.dp))
Text("${review.likeCounter}")
}
Row(verticalAlignment = Alignment.CenterVertically) {
Icon(imageVector = Icons.Default.ThumbDownOffAlt, contentDescription = null, Modifier.size(20.dp), tint = MaterialTheme.colorScheme.secondary)
Icon(painterResource(R.drawable.ic_thumb_down_24px), contentDescription = stringResource(R.string.dislikes_desc), Modifier.size(20.dp), tint = MaterialTheme.colorScheme.secondary)
Spacer(Modifier.width(6.dp))
Text("${review.dislikeCounter}")
}

View file

@ -2,16 +2,15 @@ package dev.mi6e4ka.openstore.ui.screen.search
import android.content.Intent
import android.content.pm.verify.domain.DomainVerificationManager
import android.content.pm.verify.domain.DomainVerificationUserState
import android.net.Uri
import android.os.Build
import android.provider.Settings
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
@ -19,19 +18,16 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.DomainVerification
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Verified
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
@ -39,7 +35,6 @@ import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@ -50,7 +45,11 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.unit.dp
@ -63,6 +62,7 @@ import androidx.navigation.NavController
import androidx.navigation.compose.rememberNavController
import dev.mi6e4ka.openstore.BuildConfig
import dev.mi6e4ka.openstore.R
import dev.mi6e4ka.openstore.ui.screen.results.Platform
import java.net.URLEncoder
@OptIn(ExperimentalMaterial3Api::class)
@ -88,29 +88,24 @@ fun SearchScreen(navController: NavController = rememberNavController()) {
Scaffold(
modifier = Modifier.fillMaxSize(),
topBar = { TopAppBar(title = {Text(stringResource(R.string.app_name))}) },
topBar = { TopAppBar(
title = {Text(stringResource(R.string.app_name))},
actions = {
IconButton(onClick = { navController.navigate("updates") }) {
Icon(
painter = painterResource(R.drawable.ic_update_24px),
contentDescription = stringResource(R.string.updates_title)
)
}
IconButton({navController.navigate("settings")}) {
Icon(
painterResource(R.drawable.ic_settings_24px),
contentDescription = stringResource(R.string.settings_title)
)
}
}
) },
) { innerPadding ->
// if (showDialog) {
// AlertDialog(
// onDismissRequest = {showDialog=false},
// title = { Text("Добавьте ссылки RuStore") },
// text = { Text("Чтобы ") },
// confirmButton = {
// TextButton(onClick = {
// val intent = Intent(Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS)
// .apply { data = Uri.fromParts("package", context.packageName, null) }
// context.startActivity(intent)
// }) {
// Text("Подтвердить")
// }
// },
// dismissButton = {
// TextButton(onClick = {showDialog=false}) {
// Text("Позже")
// }
// }
// )
// }
Column(
modifier = Modifier
.padding(innerPadding)
@ -129,11 +124,13 @@ fun SearchScreen(navController: NavController = rememberNavController()) {
.height(50.dp)
.clip(RoundedCornerShape(12.dp))
.clickable(onClick = {
val intent = Intent(Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS)
.apply { data = Uri.fromParts("package", context.packageName, null) }
context.startActivity(intent)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val intent = Intent(Settings.ACTION_APP_OPEN_BY_DEFAULT_SETTINGS)
.apply { data = Uri.fromParts("package", context.packageName, null) }
context.startActivity(intent)
}
}),
colors = CardDefaults.cardColors(containerColor = Color(255, 30, 30, 40))
colors = CardDefaults.cardColors(containerColor = Color(109, 255, 30, 40))
) {
Row(
horizontalArrangement = Arrangement.spacedBy(8.dp),
@ -143,7 +140,7 @@ fun SearchScreen(navController: NavController = rememberNavController()) {
.padding(horizontal = 10.dp)
) {
Icon(
imageVector = Icons.Default.DomainVerification,
painterResource(R.drawable.ic_add_link_24px),
contentDescription = null,
modifier = Modifier.size(32.dp),
)
@ -155,8 +152,10 @@ fun SearchScreen(navController: NavController = rememberNavController()) {
OutlinedTextField(
value = search,
onValueChange = {s -> search=s},
leadingIcon = { Icon(imageVector = Icons.Default.Search, contentDescription = null) },
modifier = Modifier.fillMaxWidth(),
leadingIcon = { Icon(painterResource(R.drawable.ic_search_24px), contentDescription = null) },
modifier = Modifier.fillMaxWidth().semantics{
contentDescription = context.getString(R.string.search_title)
},
singleLine = true,
keyboardOptions = KeyboardOptions(
imeAction = ImeAction.Search
@ -176,7 +175,7 @@ fun SearchScreen(navController: NavController = rememberNavController()) {
val intent = Intent(Intent.ACTION_VIEW, "https://codeberg.org/mi6e4ka/openstore".toUri())
context.startActivity(intent)
}))
Text("v${BuildConfig.VERSION_NAME}")
Text(BuildConfig.VERSION_NAME)
}
}
}

View file

@ -0,0 +1,407 @@
package dev.mi6e4ka.openstore.ui.screen.settings
import android.annotation.SuppressLint
import android.app.Activity
import android.content.Context
import android.os.Build
import android.util.Log
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Card
import androidx.compose.material3.Checkbox
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.RadioButton
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import dev.mi6e4ka.openstore.R
import androidx.core.content.edit
data class SettingsSection(
val id: String,
val title: Int,
val description: Int?,
val icon: Int,
val type: ParamType,
val defaultVal: String,
val select: List<SettingsSectionSelect>? = null
)
@SuppressLint("ModifierParameter")
data class SettingsSectionSelect(
val title: String,
val value: String,
val isGroup: Boolean = false,
val groupPackages: List<String> = emptyList()
)
enum class ParamType {
SWITCH,
SELECT,
MULTI_SELECT
}
@SuppressLint("ContextCastToActivity")
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SettingsScreen(
navController: NavController
) {
val context = LocalContext.current
val dynamicSources = remember {
getDynamicInstallerSources(context)
}
val sections = listOf(
SettingsSection(
id = "installer_type",
title = R.string.settings_installer_title,
description = R.string.settings_installer_description,
icon = R.drawable.apk_install_24px,
type = ParamType.SELECT,
defaultVal = "session",
select = listOf(
SettingsSectionSelect(
title = "Session",
value = "session"
),
SettingsSectionSelect(
title = "Intent",
value = "intent"
)
)
),
SettingsSection(
id = "updates_sources",
title = R.string.settings_updates_sources_title,
description = R.string.settings_updates_sources_description,
icon = R.drawable.ic_checklist_24px,
type = ParamType.MULTI_SELECT,
defaultVal = "dev.mi6e4ka.openstore;dev.mi6e4ka.openstore.nightly;dev.mi6e4ka.openstore.debug;ru.vk.store",
select = dynamicSources
),
SettingsSection(
id = "updates_check_all",
title = R.string.settings_updates_check_all_title,
description = R.string.settings_updates_check_all_description,
icon = R.drawable.ic_arrow_shape_up_stack_2_24px,
type = ParamType.SWITCH,
defaultVal = ""
),
SettingsSection(
id = "app_theme",
title = R.string.settings_app_theme_title,
description = null,
icon = R.drawable.ic_brightness_6_24px,
type = ParamType.SELECT,
defaultVal = "auto",
select = listOf(
SettingsSectionSelect(
title = context.getString(R.string.theme_auto_label),
value = "auto"
),
SettingsSectionSelect(
title = context.getString(R.string.theme_dark_label),
value = "dark"
),
SettingsSectionSelect(
title = context.getString(R.string.theme_light_label),
value = "light"
),
)
)
)
val activity = context as? Activity
Scaffold(
topBar = {
TopAppBar(
title = { Text(stringResource(R.string.settings_title)) },
navigationIcon = {
IconButton(
{
val popped = navController.popBackStack()
if (!popped) {
activity?.finish()
}
}
) {
Icon(
painterResource(R.drawable.ic_arrow_back_24px),
stringResource(R.string.back_button_desc)
)
}
}
)
}
) {
innerPadding ->
LazyColumn(
modifier = Modifier.fillMaxSize().padding(innerPadding)
) {
items(sections) { item ->
SettingsCard(
item = item
)
}
}
}
}
private fun getDynamicInstallerSources(context: Context): List<SettingsSectionSelect> {
val pm = context.packageManager
val installedPackages = pm.getInstalledPackages(0)
val foundInstallers = installedPackages.map { pkg ->
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
try {
pm.getInstallSourceInfo(pkg.packageName).installingPackageName
} catch (e: Exception) { null }
} else {
@Suppress("DEPRECATION")
pm.getInstallerPackageName(pkg.packageName)
}
}.toSet()
val result = mutableListOf<SettingsSectionSelect>()
result.add(SettingsSectionSelect(
title = "RuStore/OpenStore",
value = "group_openstore",
isGroup = true,
groupPackages = listOf(
"dev.mi6e4ka.openstore",
"dev.mi6e4ka.openstore.nightly",
"dev.mi6e4ka.openstore.debug",
"ru.vk.store"
)
))
result.add(SettingsSectionSelect(
title = context.getString(R.string.settings_source_manual),
value = "group_installers",
isGroup = true,
groupPackages = listOf(
"com.google.android.packageinstaller",
"com.android.packageinstaller"
)
))
result.add(SettingsSectionSelect(
title = context.getString(R.string.settings_source_unknown),
value = "null"
))
val handledPackages = mutableSetOf<String?>()
handledPackages.add(null)
handledPackages.add("null")
handledPackages.add("com.google.android.packageinstaller")
handledPackages.add("com.android.packageinstaller")
handledPackages.add("ru.vk.store")
handledPackages.add(context.packageName)
handledPackages.addAll(listOf("dev.mi6e4ka.openstore", "dev.mi6e4ka.openstore.nightly", "dev.mi6e4ka.openstore.debug"))
foundInstallers.filter { it !in handledPackages && it != null }.forEach { pkg ->
val label = try {
val info = pm.getApplicationInfo(pkg!!, 0)
pm.getApplicationLabel(info).toString()
} catch (e: Exception) {
pkg
}
result.add(SettingsSectionSelect(title = label ?: pkg!!, value = pkg!!))
}
Log.i("OS", "Found installers: $result")
return result
}
@Composable
fun SettingsCard(
item: SettingsSection
) {
val context = LocalContext.current
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
var showDialog by remember { mutableStateOf(false) }
var currentValue by remember {
mutableStateOf<Any>(
if (item.type == ParamType.SWITCH) prefs.getBoolean(item.id, false)
else prefs.getString(item.id, item.defaultVal) ?: item.defaultVal
)
}
val description = if (item.description != null && item.description != 0) {
stringResource(item.description)
} else if (item.type != ParamType.SWITCH) {
val strVal = currentValue as? String ?: ""
val selectedValues = strVal.split(";").filter { it.isNotEmpty() }.toSet()
item.select?.filter { entry ->
if (entry.isGroup) {
entry.groupPackages.any { it in selectedValues }
} else {
entry.value in selectedValues
}
}?.joinToString(", ") { it.title } ?: ""
} else ""
Card (
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 4.dp),
) {
Row(
Modifier
.clickable{
if (item.type == ParamType.SWITCH) {
val newValue = !(currentValue as Boolean)
prefs.edit { putBoolean(item.id, newValue) }
currentValue = newValue
} else {
showDialog = true
}
}
.padding(15.dp)
.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(15.dp)
) {
Icon(
painterResource(item.icon),
"icon",
modifier = Modifier.size(32.dp)
)
Column(
modifier = Modifier.weight(1f)
) {
Text(stringResource(item.title), fontWeight = FontWeight.Medium)
if (description.isNotEmpty()) {
Text(description, color = Color.Gray, fontWeight = FontWeight.Normal)
}
}
if (item.type == ParamType.SWITCH) {
Switch(
currentValue as Boolean,
{ v ->
prefs.edit { putBoolean(item.id, v) }
currentValue = v
}
)
}
}
if (showDialog) {
val selectedPackages = remember {
mutableStateListOf<String>().apply {
val currentStr = currentValue as? String ?: ""
addAll(currentStr.split(";").filter { it.isNotEmpty() })
}
}
var selectedVal by remember { mutableStateOf(currentValue as? String) }
AlertDialog(
onDismissRequest = { showDialog = false },
title = { Text(stringResource(item.title)) },
text = {
LazyColumn(modifier = Modifier.heightIn(max = 380.dp)) {
items(item.select ?: listOf()) { entry ->
val isChecked = if (entry.isGroup) {
entry.groupPackages.all { it in selectedPackages }
} else {
entry.value in selectedPackages
}
Row(
Modifier
.fillMaxWidth()
.clickable {
if (item.type == ParamType.MULTI_SELECT) {
if (entry.isGroup) {
if (isChecked) {
selectedPackages.removeAll(entry.groupPackages)
} else {
entry.groupPackages.forEach {
if (it !in selectedPackages) selectedPackages.add(it)
}
}
} else {
if (isChecked) {
selectedPackages.remove(entry.value)
} else {
selectedPackages.add(entry.value)
}
}
} else {
selectedVal = entry.value
}
}
.padding(vertical = 8.dp),
verticalAlignment = Alignment.CenterVertically
) {
if (item.type == ParamType.SELECT) {
RadioButton(
selected = selectedVal == entry.value,
onClick = { selectedVal = entry.value }
)
} else {
Checkbox(
checked = isChecked,
onCheckedChange = null // Click handled by Row
)
}
Text(
entry.title,
modifier = Modifier.padding(start = 8.dp)
)
}
}
}
},
confirmButton = {
TextButton(onClick = {
val newValue = if (item.type == ParamType.MULTI_SELECT) {
selectedPackages.joinToString(";")
} else {
selectedVal ?: item.defaultVal
}
prefs.edit { putString(item.id, newValue) }
currentValue = newValue
showDialog = false
}) {
Text(stringResource(R.string.settings_save_button))
}
}
)
}
}
}

View file

@ -0,0 +1,19 @@
package dev.mi6e4ka.openstore.ui.screen.settings
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
class DetailsViewModel() : ViewModel() {
}
class SettingsViewModelFactory() : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass.isAssignableFrom(DetailsViewModel::class.java)) {
@Suppress("UNCHECKED_CAST")
return DetailsViewModel() as T
}
throw IllegalArgumentException("Unknown ViewModel class")
}
}

View file

@ -0,0 +1,346 @@
package dev.mi6e4ka.openstore.ui.screen.updates
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.Settings
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.FilledTonalIconButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.lifecycle.viewmodel.compose.viewModel
import androidx.navigation.NavController
import dev.mi6e4ka.openstore.R
import dev.mi6e4ka.openstore.internal.installer.ApkInstaller
import dev.mi6e4ka.openstore.ui.components.AppIcon
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun UpdatesScreen(navController: NavController) {
val context = LocalContext.current
val apkInstaller = remember { ApkInstaller(context) }
val viewModel: UpdatesViewModel = viewModel(
factory = UpdatesViewModelFactory(apkInstaller)
)
val state by viewModel.state.collectAsState()
var showHashDetails by remember { mutableStateOf(false) }
if (state.invalidDownloadedApkFiles != null && state.invalidDownloadedAppPackage != null) {
AlertDialog(
onDismissRequest = { viewModel.clearInvalidDownloadState() },
title = { Text(stringResource(R.string.invalid_download_hash_title)) },
text = {
Column {
Text(stringResource(R.string.invalid_download_hash_message))
Spacer(modifier = Modifier.size(12.dp))
TextButton(onClick = { showHashDetails = !showHashDetails }) {
Text(stringResource(R.string.show_hashes))
}
if (showHashDetails) {
Spacer(modifier = Modifier.size(8.dp))
Text(stringResource(R.string.expected_hash, state.invalidExpectedHash ?: ""))
Text(stringResource(R.string.actual_hash, state.invalidActualHash ?: ""))
}
}
},
confirmButton = {
TextButton(onClick = { viewModel.retryDownloadAfterInvalid(context) }) {
Text(stringResource(R.string.download_again))
}
},
dismissButton = {
TextButton(onClick = { viewModel.installAsIsAfterInvalid(context) }) {
Text(stringResource(R.string.install_as_is))
}
}
)
}
LaunchedEffect(Unit) {
viewModel.loadAndCheckUpdates(context)
}
Scaffold(
topBar = {
TopAppBar(
title = { Text(stringResource(R.string.updates_title)) },
navigationIcon = {
IconButton(onClick = { navController.popBackStack() }) {
Icon(
painter = painterResource(R.drawable.ic_arrow_back_24px),
contentDescription = stringResource(R.string.back_button_desc)
)
}
},
actions = {
IconButton(
onClick = { viewModel.checkForUpdates(context) },
enabled = !state.isCheckingUpdates && !state.isLoading
) {
Icon(
painter = painterResource(R.drawable.ic_refresh_24px),
contentDescription = stringResource(R.string.check_updates)
)
}
}
)
}
) { innerPadding ->
Column(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding)
) {
if (state.isLoading) {
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
) {
CircularProgressIndicator()
}
} else if (state.isCheckingUpdates) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
CircularProgressIndicator()
Spacer(modifier = Modifier.size(16.dp))
Text(stringResource(R.string.checking_updates))
}
} else if (state.appsWithUpdates.isEmpty()) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
UpdatesBanner(navController, state.installedApps.size)
Spacer(modifier = Modifier.weight(1f))
Icon(
painter = painterResource(R.drawable.ic_check_circle_24px),
contentDescription = null,
modifier = Modifier.size(80.dp),
tint = MaterialTheme.colorScheme.primary
)
Spacer(modifier = Modifier.size(16.dp))
Text(
stringResource(R.string.all_apps_updated),
fontWeight = FontWeight.Bold,
fontSize = 18.sp
)
Spacer(modifier = Modifier.weight(1f))
}
} else {
LazyColumn(
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 16.dp),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
item {
UpdatesBanner(navController, state.installedApps.size)
}
item {
Text(
stringResource(R.string.available_updates, state.appsWithUpdates.size),
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(vertical = 8.dp)
)
}
items(state.appsWithUpdates, key = { it.packageName }) { app ->
UpdateAppCard(
app = app,
isDownloading = state.downloadingPackages.contains(app.packageName),
downloadProgress = state.downloadProgress[app.packageName] ?: 0,
onUpdateClick = { viewModel.downloadAndUpdateApp(context, app) },
onCancelClick = { viewModel.cancelDownload(app.packageName) },
onCardClick = { navController.navigate("app/${app.packageName}?platform=mobile") }
)
}
}
}
}
}
}
@Composable
fun UpdatesBanner(navController: NavController, checkAppsCount: Int) {
Card(
modifier = Modifier
.fillMaxWidth()
.padding(0.dp)
.height(80.dp)
.clip(RoundedCornerShape(12.dp))
.clickable(onClick = {
navController.navigate("settings")
}),
//colors = CardDefaults.cardColors(containerColor = Color(109, 255, 30, 40))
) {
Row(
horizontalArrangement = Arrangement.spacedBy(16.dp),
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxHeight()
.fillMaxWidth()
.padding(horizontal = 24.dp)
) {
Icon(
painterResource(R.drawable.ic_settings_24px),
contentDescription = null,
modifier = Modifier.size(32.dp),
)
Column {
Text(stringResource(R.string.updates_app_count, checkAppsCount))
Text(stringResource(R.string.updates_change_settings))
}
}
}
}
@Composable
fun UpdateAppCard(
app: AppWithUpdates,
isDownloading: Boolean,
downloadProgress: Int,
onUpdateClick: () -> Unit,
onCancelClick: () -> Unit,
onCardClick: () -> Unit
) {
Card(
modifier = Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(12.dp))
.clickable(onClick = onCardClick)
) {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
if (app.iconUrl != null) {
AppIcon(
app.iconUrl,
modifier = Modifier
.size(56.dp)
.clip(RoundedCornerShape(12.dp))
)
} else {
Box(
modifier = Modifier
.size(56.dp)
.clip(RoundedCornerShape(12.dp)),
contentAlignment = Alignment.Center
) {
Icon(
painter = painterResource(R.drawable.ic_android_24px),
contentDescription = null,
modifier = Modifier.size(32.dp)
)
}
}
Column(
modifier = Modifier
.weight(1f)
.padding(horizontal = 12.dp)
) {
Text(
text = app.appName,
fontWeight = FontWeight.Medium,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
Text(
text = "${app.installedVersionCode}${app.latestVersionCode}",
fontSize = 12.sp,
color = MaterialTheme.colorScheme.secondary,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
// Text(
// text = "from ${app.installSource}",
// fontSize = 12.sp,
// color = MaterialTheme.colorScheme.secondary,
// maxLines = 1,
// overflow = TextOverflow.Ellipsis
// )
if (isDownloading) {
Spacer(modifier = Modifier.size(4.dp))
LinearProgressIndicator(
progress = { downloadProgress / 100f },
modifier = Modifier.fillMaxWidth()
)
}
}
if (isDownloading) {
FilledTonalIconButton(onClick = onCancelClick) {
Icon(
painter = painterResource(R.drawable.ic_close_24px),
contentDescription = null
)
}
} else {
FilledTonalButton(onClick = onUpdateClick) {
Text(stringResource(R.string.update))
}
}
}
}
}

View file

@ -0,0 +1,322 @@
package dev.mi6e4ka.openstore.ui.screen.updates
import android.content.Context
import android.content.pm.ApplicationInfo
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.os.Build
import android.widget.Toast
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dev.mi6e4ka.openstore.R
import dev.mi6e4ka.openstore.data.model.AppUpdateRequestEntry
import dev.mi6e4ka.openstore.di.AppModule
import dev.mi6e4ka.openstore.internal.installer.ApkInstaller
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.io.File
data class AppWithUpdates (
val packageName: String,
val appName: String,
val installedVersionCode: Long,
val installedVersionName: String,
val iconUrl: String? = null,
val latestVersionCode: Long? = null,
val latestVersionName: String? = null,
val appId: Int? = null,
val installSource: String
)
data class UpdatesState(
val isLoading: Boolean = false,
val isCheckingUpdates: Boolean = false,
val installedApps: List<AppUpdateRequestEntry> = emptyList(),
val appsWithUpdates: List<AppWithUpdates> = emptyList(),
val error: String? = null,
val downloadingPackages: Set<String> = emptySet(),
val downloadProgress: Map<String, Int> = emptyMap(),
val invalidDownloadedApkFiles: List<File>? = null,
val invalidDownloadedAppPackage: String? = null,
val invalidExpectedHash: String? = null,
val invalidActualHash: String? = null
)
class UpdatesViewModel(private val apkInstaller: ApkInstaller) : ViewModel() {
private val _state = MutableStateFlow(UpdatesState())
val state: StateFlow<UpdatesState> = _state.asStateFlow()
private val cancelDownloads = mutableMapOf<String, () -> Unit>()
companion object {
private const val DEFAULT_SOURCES = "dev.mi6e4ka.openstore;dev.mi6e4ka.openstore.nightly;dev.mi6e4ka.openstore.debug;ru.vk.store"
}
fun loadAndCheckUpdates(context: Context) {
viewModelScope.launch {
// Загружаем список приложений
_state.update { it.copy(isLoading = true, error = null) }
val installedApps = try {
withContext(Dispatchers.IO) {
getInstalledApps(context)
}
} catch (e: Exception) {
_state.update { it.copy(error = e.message, isLoading = false) }
return@launch
}
_state.update { it.copy(installedApps = installedApps, isLoading = false) }
// Сразу запускаем проверку
checkForUpdatesInternal(installedApps)
}
}
fun checkForUpdates(context: Context) {
loadAndCheckUpdates(context)
}
private suspend fun checkForUpdatesInternal(installedApps: List<AppUpdateRequestEntry>) {
_state.update { it.copy(isCheckingUpdates = true, appsWithUpdates = emptyList()) }
val rawUpdates = AppModule.searchRepository.getBatchUpdates(installedApps)
if (rawUpdates.isEmpty()) {
_state.update {
it.copy(
isCheckingUpdates = false,
appsWithUpdates = emptyList()
)
}
return
}
val detailsUpdates = AppModule.searchRepository.getBatchItemDetails(rawUpdates.map {it.packageName} )
val detailsByPackageName = detailsUpdates.associateBy {it.packageName}
val installedAppsByPackageName = installedApps.associateBy {it.packageName}
val appsWithUpdates = rawUpdates.mapNotNull {
val details = detailsByPackageName[it.packageName] ?: return@mapNotNull null
val installedApp = installedAppsByPackageName[it.packageName] ?: return@mapNotNull null
AppWithUpdates(
packageName = it.packageName,
appName = it.appName,
installedVersionCode = installedApp.versionCode,
installedVersionName = installedApp.versionName,
iconUrl = details.iconUrl,
latestVersionCode = details.versionCode,
latestVersionName = "?",
appId = it.appId,
installSource = installedApp.installSource
)
}
_state.update {
it.copy(
isCheckingUpdates = false,
appsWithUpdates = appsWithUpdates
)
}
}
fun downloadAndUpdateApp(context: Context, app: AppWithUpdates) {
if (app.appId == null) return
viewModelScope.launch {
_state.update {
it.copy(
downloadingPackages = it.downloadingPackages + app.packageName,
downloadProgress = it.downloadProgress + (app.packageName to 0)
)
}
try {
val appFiles = withContext(Dispatchers.IO) {
AppModule.searchRepository.getAppFiles(
app.appId,
firstInstall = false,
supportedAbis = Build.SUPPORTED_ABIS.toList(),
withoutSplits = false,
deviceType = "mobile"
)
}
cancelDownloads[app.packageName] = apkInstaller.downloadFilesWithProgress(
appFiles,
onProgress = { percent, _, _ ->
_state.update {
it.copy(downloadProgress = it.downloadProgress + (app.packageName to percent))
}
},
onSuccess = { apkFiles ->
installApp(context, app.packageName, apkFiles)
},
onError = { error ->
handleError(context, app.packageName, error)
},
onCancel = {
_state.update {
it.copy(
downloadingPackages = it.downloadingPackages - app.packageName,
downloadProgress = it.downloadProgress - app.packageName
)
}
},
onInvalidHash = { apkFiles, expectedHash, actualHash ->
_state.update {
it.copy(
downloadingPackages = it.downloadingPackages - app.packageName,
downloadProgress = it.downloadProgress - app.packageName,
invalidDownloadedApkFiles = apkFiles,
invalidDownloadedAppPackage = app.packageName,
invalidExpectedHash = expectedHash,
invalidActualHash = actualHash
)
}
}
)
} catch (e: Exception) {
handleError(context, app.packageName, e)
}
}
}
private fun installApp(context: Context, packageName: String, apkFiles: List<File>) {
apkInstaller.installApp(
packageName = packageName,
apkFiles = apkFiles,
onSessionFinished = { success ->
_state.update {
it.copy(
downloadingPackages = it.downloadingPackages - packageName,
downloadProgress = it.downloadProgress - packageName,
appsWithUpdates = if (success) {
it.appsWithUpdates.filter { app -> app.packageName != packageName }
} else it.appsWithUpdates
)
}
if (success) {
apkInstaller.cleanApkFiles(apkFiles.map { it.name })
}
},
onError = { error ->
handleError(context, packageName, error)
}
)
}
private fun handleError(context: Context, packageName: String, error: Throwable) {
if (error.message?.contains("Failed to allocate") == true) {
Toast.makeText(context, R.string.insufficient_memory, Toast.LENGTH_SHORT).show()
} else {
Toast.makeText(context, R.string.loading_error, Toast.LENGTH_SHORT).show()
}
_state.update {
it.copy(
downloadingPackages = it.downloadingPackages - packageName,
downloadProgress = it.downloadProgress - packageName
)
}
}
fun cancelDownload(packageName: String) {
cancelDownloads[packageName]?.invoke()
cancelDownloads.remove(packageName)
}
fun retryDownloadAfterInvalid(context: Context) {
val packageName = state.value.invalidDownloadedAppPackage ?: return
_state.update {
it.copy(
invalidDownloadedAppPackage = null,
invalidDownloadedApkFiles = null,
invalidExpectedHash = null,
invalidActualHash = null
)
}
val app = state.value.appsWithUpdates.find { it.packageName == packageName } ?: return
downloadAndUpdateApp(context, app)
}
fun installAsIsAfterInvalid(context: Context) {
val packageName = state.value.invalidDownloadedAppPackage ?: return
val apkFiles = state.value.invalidDownloadedApkFiles ?: return
_state.update {
it.copy(
invalidDownloadedAppPackage = null,
invalidDownloadedApkFiles = null,
invalidExpectedHash = null,
invalidActualHash = null
)
}
installApp(context, packageName, apkFiles)
}
fun clearInvalidDownloadState() {
_state.update {
it.copy(
invalidDownloadedAppPackage = null,
invalidDownloadedApkFiles = null,
invalidExpectedHash = null,
invalidActualHash = null
)
}
}
private fun getInstalledApps(context: Context): List<AppUpdateRequestEntry> {
val pm = context.packageManager
val packages = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
pm.getInstalledPackages(PackageManager.PackageInfoFlags.of(0))
} else {
@Suppress("DEPRECATION")
pm.getInstalledPackages(0)
}
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
val allowedSources = prefs.getString("updates_sources", DEFAULT_SOURCES)?.split(";") ?: listOf()
val allowAllSources = prefs.getBoolean("updates_check_all", false)
return packages
.filter { !isSystemApp(it) && (allowAllSources || allowedSources.contains(getInstallSource(pm, it.packageName))) }
.map { packageInfo ->
val versionCode = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
packageInfo.longVersionCode
} else {
@Suppress("DEPRECATION")
packageInfo.versionCode.toLong()
}
println("package "+packageInfo.packageName+" from "+getInstallSource(pm, packageInfo.packageName))
AppUpdateRequestEntry(
packageName = packageInfo.packageName,
appName = pm.getApplicationLabel(packageInfo.applicationInfo!!).toString(),
versionCode = versionCode,
versionName = packageInfo.versionName ?: "Unknown",
installSource = getInstallSource(pm, packageInfo.packageName)
)
}
}
private fun isSystemApp(packageInfo: PackageInfo): Boolean {
return (packageInfo.applicationInfo?.flags?.and(ApplicationInfo.FLAG_SYSTEM) ?: 0) != 0
}
private fun getInstallSource(pm: PackageManager, packageName: String): String {
val installer = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
try {
pm.getInstallSourceInfo(packageName).installingPackageName
} catch (e: Exception) {
null
}
} else {
@Suppress("DEPRECATION")
pm.getInstallerPackageName(packageName)
}
return installer ?: "null"
}
}

View file

@ -0,0 +1,18 @@
package dev.mi6e4ka.openstore.ui.screen.updates
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import dev.mi6e4ka.openstore.internal.installer.ApkInstaller
class UpdatesViewModelFactory(
private val apkInstaller: ApkInstaller
) : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
if (modelClass.isAssignableFrom(UpdatesViewModel::class.java)) {
@Suppress("UNCHECKED_CAST")
return UpdatesViewModel(apkInstaller) as T
}
throw IllegalArgumentException("Unknown ViewModel class")
}
}

View file

@ -1,4 +1,6 @@
package dev.mi6e4ka.openstore.ui.theme
import android.app.Activity
import android.content.Context
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
@ -8,8 +10,13 @@ import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
private val lightScheme = lightColorScheme(
primary = primaryLight,
@ -253,21 +260,36 @@ val unspecified_scheme = ColorFamily(
@Composable
fun AppTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
content: @Composable() () -> Unit
) {
val context = LocalContext.current
val prefs = remember { context.getSharedPreferences("settings", Context.MODE_PRIVATE) }
val appTheme = prefs.getString("app_theme", "auto")
val darkTheme = (isSystemInDarkTheme() && appTheme == "auto") || (appTheme == "dark")
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
if (darkTheme)
dynamicDarkColorScheme(context)
else dynamicLightColorScheme(context)
}
darkTheme -> darkScheme
else -> lightScheme
}
val view = LocalView.current
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as Activity).window
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
WindowCompat.getInsetsController(window, view).isAppearanceLightNavigationBars = !darkTheme
}
}
MaterialTheme(
colorScheme = colorScheme,
//typography = AppTypography,

View file

@ -2,19 +2,19 @@
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="199"
android:viewportHeight="199">
android:viewportWidth="130"
android:viewportHeight="130">
<path
android:pathData="M0,0h199v199h-199z">
android:pathData="M0,0h130v130h-130z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="40"
android:startY="15.5"
android:endX="156.5"
android:endY="180"
<gradient
android:startX="26.13"
android:startY="10.13"
android:endX="102.24"
android:endY="117.59"
android:type="linear">
<item android:offset="0" android:color="#FF009DFF"/>
<item android:offset="1" android:color="#FF004DB1"/>
<item android:offset="0" android:color="#FF05A0FF"/>
<item android:offset="1" android:color="#FF014DB1"/>
</gradient>
</aapt:attr>
</path>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M200,440L200,400Q200,328 232.5,268.5Q265,209 320,171L245,96L280,60L365,145Q391,133 420.5,126.5Q450,120 480,120Q510,120 539.5,126.5Q569,133 595,145L680,60L715,96L640,171Q695,209 727.5,268.5Q760,328 760,400L760,440L200,440ZM600,360Q617,360 628.5,348.5Q640,337 640,320Q640,303 628.5,291.5Q617,280 600,280Q583,280 571.5,291.5Q560,303 560,320Q560,337 571.5,348.5Q583,360 600,360ZM360,360Q377,360 388.5,348.5Q400,337 400,320Q400,303 388.5,291.5Q377,280 360,280Q343,280 331.5,291.5Q320,303 320,320Q320,337 331.5,348.5Q343,360 360,360ZM480,920Q363,920 281.5,838.5Q200,757 200,640L200,480L760,480L760,640Q760,757 678.5,838.5Q597,920 480,920Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M680,800L680,680L560,680L560,600L680,600L680,480L760,480L760,600L880,600L880,680L760,680L760,800L680,800ZM440,680L280,680Q197,680 138.5,621.5Q80,563 80,480Q80,397 138.5,338.5Q197,280 280,280L440,280L440,360L280,360Q230,360 195,395Q160,430 160,480Q160,530 195,565Q230,600 280,600L440,600L440,680ZM320,520L320,440L640,440L640,520L320,520ZM880,480L800,480Q800,430 765,395Q730,360 680,360L520,360L520,280L680,280Q763,280 821.5,338.5Q880,397 880,480Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M40,720Q49,613 105.5,523Q162,433 256,380L182,252Q176,243 179,233Q182,223 192,218Q200,213 210,216Q220,219 226,228L300,356Q386,320 480,320Q574,320 660,356L734,228Q740,219 750,216Q760,213 768,218Q778,223 781,233Q784,243 778,252L704,380Q798,433 854.5,523Q911,613 920,720L40,720ZM280,610Q301,610 315.5,595.5Q330,581 330,560Q330,539 315.5,524.5Q301,510 280,510Q259,510 244.5,524.5Q230,539 230,560Q230,581 244.5,595.5Q259,610 280,610ZM680,610Q701,610 715.5,595.5Q730,581 730,560Q730,539 715.5,524.5Q701,510 680,510Q659,510 644.5,524.5Q630,539 630,560Q630,581 644.5,595.5Q659,610 680,610Z"/>
</vector>

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M313,520L537,744L480,800L160,480L480,160L537,216L313,440L800,440L800,520L313,520Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M440,640L520,640L520,472L584,536L640,480L480,320L320,480L376,536L440,472L440,640ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
</vector>

View file

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M647,520L160,520L160,440L647,440L423,216L480,160L800,480L480,800L423,744L647,520Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M360,920L360,800L160,800L480,440L800,800L600,800L600,920L360,920ZM440,840L520,840L520,720L622,720L480,560L338,720L440,720L440,840ZM160,600L480,240L800,600L693,600L480,360L267,600L160,600ZM160,400L480,40L800,400L693,400L480,160L267,400L160,400ZM480,720L480,720L480,720L480,720L480,720L480,720L480,720Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,932L346,800L160,800L160,614L28,480L160,346L160,160L346,160L480,28L614,160L800,160L800,346L932,480L800,614L800,800L614,800L480,932ZM480,680Q563,680 621.5,621.5Q680,563 680,480Q680,397 621.5,338.5Q563,280 480,280L480,680ZM480,820L580,720L720,720L720,580L820,480L720,380L720,240L580,240L480,140L380,240L240,240L240,380L140,480L240,580L240,720L380,720L480,820ZM480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480L480,480Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M200,840Q167,840 143.5,816.5Q120,793 120,760L120,200Q120,167 143.5,143.5Q167,120 200,120L760,120Q793,120 816.5,143.5Q840,167 840,200L840,760Q840,793 816.5,816.5Q793,840 760,840L200,840ZM240,503L400,343L560,503L720,343L760,383L760,200Q760,200 760,200Q760,200 760,200L200,200Q200,200 200,200Q200,200 200,200L200,463L240,503ZM200,760L760,760Q760,760 760,760Q760,760 760,760L760,496L720,456L560,616L400,456L240,616L200,576L200,760Q200,760 200,760Q200,760 200,760ZM200,760L200,760Q200,760 200,760Q200,760 200,760L200,496L200,576L200,463L200,383L200,200Q200,200 200,200Q200,200 200,200L200,200Q200,200 200,200Q200,200 200,200L200,463L200,463L200,576L200,576L200,760Q200,760 200,760Q200,760 200,760Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M838,895L720,777L720,866L640,866L640,640L866,640L866,720L776,720L894,838L838,895ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,500 878,520Q876,540 872,560L790,560Q795,540 797.5,520Q800,500 800,480Q800,460 797.5,440Q795,420 790,400L654,400Q657,420 658.5,440Q660,460 660,480Q660,500 658.5,520Q657,540 654,560L574,560Q577,540 578.5,520Q580,500 580,480Q580,460 578.5,440Q577,420 574,400L386,400Q383,420 381.5,440Q380,460 380,480Q380,500 381.5,520Q383,540 386,560L520,560L520,640L404,640Q416,683 435,722.5Q454,762 480,798Q500,798 520,795.5Q540,793 560,791L560,873Q540,875 520,877.5Q500,880 480,880ZM170,560L306,560Q303,540 301.5,520Q300,500 300,480Q300,460 301.5,440Q303,420 306,400L170,400Q165,420 162.5,440Q160,460 160,480Q160,500 162.5,520Q165,540 170,560ZM204,320L322,320Q331,283 344.5,247.5Q358,212 376,178Q321,196 277,232.5Q233,269 204,320ZM376,782Q358,748 344.5,712.5Q331,677 322,640L204,640Q233,691 277,727.5Q321,764 376,782ZM404,320L556,320Q544,277 525,237.5Q506,198 480,162Q454,198 435,237.5Q416,277 404,320ZM638,320L756,320Q727,269 683,232.5Q639,196 584,178Q602,212 615.5,247.5Q629,283 638,320Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M382,720L154,492L211,435L382,606L749,239L806,296L382,720Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M424,664L706,382L650,326L424,552L310,438L254,494L424,664ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM480,800Q614,800 707,707Q800,614 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,614 253,707Q346,800 480,800ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M222,760L80,618L136,562L221,647L391,477L447,534L222,760ZM222,440L80,298L136,242L221,327L391,157L447,214L222,440ZM520,680L520,600L880,600L880,680L520,680ZM520,360L520,280L880,280L880,360L520,360Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M256,760L200,704L424,480L200,256L256,200L480,424L704,200L760,256L536,480L760,704L704,760L480,536L256,760Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,640L280,440L336,382L440,486L440,160L520,160L520,486L624,382L680,440L480,640ZM240,800Q207,800 183.5,776.5Q160,753 160,720L160,600L240,600L240,720Q240,720 240,720Q240,720 240,720L720,720Q720,720 720,720Q720,720 720,720L720,600L800,600L800,720Q800,753 776.5,776.5Q753,800 720,800L240,800Z"/>
</vector>

View file

@ -1,14 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="127"
android:viewportHeight="133">
<group android:scaleX="0.40847954"
android:scaleY="0.42777777"
android:translateX="37.56155"
android:translateY="38.052776">
android:viewportWidth="137"
android:viewportHeight="130">
<group android:scaleX="0.7078261"
android:scaleY="0.67165977"
android:translateX="20.462858"
android:translateY="21.342113">
<path
android:pathData="M126.59,82.78C126.64,77.58 122.45,73.06 116.98,73.06H105.29L111.37,48.64C111.56,47.88 111.66,47.12 111.67,46.37C111.72,41.17 107.53,36.65 102.05,36.65H90.41L96.45,12.45C97.96,6.37 93.37,0.47 87.13,0.47L22.23,0.47C16.71,0.47 11.92,4.22 10.58,9.58L0.95,48.25C-0.57,54.33 4.02,60.24 10.27,60.24L75.17,60.24C79.12,60.24 82.7,58.3 84.89,55.24C85.05,55.19 85.23,55.2 85.37,55.3C85.62,55.47 85.74,55.78 85.65,56.06C84.11,61.15 78.91,65.99 72.35,66.48L22.83,68.16C21.17,68.21 19.75,69.31 19.23,70.88L15.86,84.44C14.35,90.53 18.94,96.43 25.18,96.43C46.6,96.59 68.37,96.54 89.86,96.55C92.77,96.55 95.01,95.56 96.64,94.46C96.91,94.28 97.18,94.09 97.44,93.89C97.74,93.64 98.04,93.38 98.32,93.11C98.75,92.7 99.15,92.27 99.51,91.8L99.52,91.8C99.71,91.6 100.01,91.55 100.24,91.71C100.49,91.88 100.6,92.18 100.52,92.47C98.98,97.56 93.78,102.42 87.22,102.89L37.7,104.57C36.05,104.61 34.64,105.71 34.15,107.26L30.76,120.85C29.24,126.93 33.83,132.84 40.07,132.84H104.97C110.49,132.84 115.29,129.08 116.62,123.72L126.25,85.05C126.44,84.29 126.54,83.54 126.54,82.79L126.59,82.78Z"
android:pathData="M107.11,60.88V95.33C107.11,97.72 106.26,99.76 104.56,101.45C102.86,103.15 100.82,104 98.44,104H37.78C35.39,104 33.35,103.15 31.65,101.45C29.96,99.76 29.11,97.72 29.11,95.33V60.88C27.45,59.37 26.17,57.42 25.26,55.03C24.36,52.65 24.34,50.05 25.21,47.23L29.76,32.5C30.34,30.62 31.37,29.07 32.85,27.84C34.33,26.61 36.04,26 37.99,26H98.22C100.18,26 101.87,26.6 103.32,27.79C104.76,28.98 105.81,30.55 106.46,32.5L111.01,47.23C111.88,50.05 111.86,52.61 110.95,54.92C110.05,57.24 108.77,59.22 107.11,60.88ZM77.64,56.33C79.59,56.33 81.07,55.67 82.08,54.33C83.09,52.99 83.49,51.49 83.28,49.83L80.89,34.67H72.44V50.7C72.44,52.22 72.95,53.53 73.96,54.65C74.97,55.77 76.2,56.33 77.64,56.33ZM58.14,56.33C59.8,56.33 61.16,55.77 62.2,54.65C63.25,53.53 63.78,52.22 63.78,50.7V34.67H55.33L52.94,49.83C52.65,51.57 53.03,53.08 54.08,54.38C55.13,55.68 56.48,56.33 58.14,56.33ZM38.86,56.33C40.16,56.33 41.3,55.86 42.27,54.92C43.25,53.99 43.84,52.79 44.06,51.35L46.44,34.67H37.99L33.66,49.18C33.22,50.63 33.46,52.18 34.36,53.84C35.27,55.5 36.76,56.33 38.86,56.33ZM97.36,56.33C99.45,56.33 100.97,55.5 101.91,53.84C102.85,52.18 103.06,50.63 102.56,49.18L98.01,34.67H89.78L92.16,51.35C92.38,52.79 92.97,53.99 93.95,54.92C94.92,55.86 96.06,56.33 97.36,56.33ZM37.78,95.33H98.44V64.78C98.08,64.93 97.85,65 97.74,65H97.36C95.41,65 93.69,64.68 92.21,64.03C90.73,63.38 89.27,62.33 87.82,60.88C86.53,62.18 85.04,63.19 83.38,63.92C81.72,64.64 79.95,65 78.07,65C76.13,65 74.3,64.64 72.6,63.92C70.91,63.19 69.41,62.18 68.11,60.88C66.88,62.18 65.45,63.19 63.83,63.92C62.2,64.64 60.45,65 58.58,65C56.48,65 54.58,64.64 52.89,63.92C51.19,63.19 49.69,62.18 48.39,60.88C46.88,62.4 45.38,63.47 43.9,64.08C42.42,64.69 40.74,65 38.86,65H38.37C38.19,65 37.99,64.93 37.78,64.78V95.33Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View file

@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="137"
android:viewportHeight="130">
<group android:scaleX="0.72"
android:scaleY="0.6832117"
android:translateX="19.18"
android:translateY="20.59124">
<path
android:pathData="M107.11,60.88V95.33C107.11,97.72 106.26,99.76 104.56,101.45C102.86,103.15 100.82,104 98.44,104H37.78C35.39,104 33.35,103.15 31.65,101.45C29.96,99.76 29.11,97.72 29.11,95.33V60.88C27.45,59.37 26.17,57.42 25.26,55.03C24.36,52.65 24.34,50.05 25.21,47.23L29.76,32.5C30.34,30.62 31.37,29.07 32.85,27.84C34.33,26.61 36.04,26 37.99,26H98.22C100.18,26 101.87,26.6 103.32,27.79C104.76,28.98 105.81,30.55 106.46,32.5L111.01,47.23C111.88,50.05 111.86,52.61 110.95,54.92C110.05,57.24 108.77,59.22 107.11,60.88ZM77.64,56.33C79.59,56.33 81.07,55.67 82.08,54.33C83.09,52.99 83.49,51.49 83.28,49.83L80.89,34.67H72.44V50.7C72.44,52.22 72.95,53.53 73.96,54.65C74.97,55.77 76.2,56.33 77.64,56.33ZM58.14,56.33C59.8,56.33 61.16,55.77 62.2,54.65C63.25,53.53 63.78,52.22 63.78,50.7V34.67H55.33L52.94,49.83C52.65,51.57 53.03,53.08 54.08,54.38C55.13,55.68 56.48,56.33 58.14,56.33ZM38.86,56.33C40.16,56.33 41.3,55.86 42.27,54.92C43.25,53.99 43.84,52.79 44.06,51.35L46.44,34.67H37.99L33.66,49.18C33.22,50.63 33.46,52.18 34.36,53.84C35.27,55.5 36.76,56.33 38.86,56.33ZM97.36,56.33C99.45,56.33 100.97,55.5 101.91,53.84C102.85,52.18 103.06,50.63 102.56,49.18L98.01,34.67H89.78L92.16,51.35C92.38,52.79 92.97,53.99 93.95,54.92C94.92,55.86 96.06,56.33 97.36,56.33ZM37.78,95.33H98.44V64.78C98.08,64.93 97.85,65 97.74,65H97.36C95.41,65 93.69,64.68 92.21,64.03C90.73,63.38 89.27,62.33 87.82,60.88C86.53,62.18 85.04,63.19 83.38,63.92C81.72,64.64 79.95,65 78.07,65C76.13,65 74.3,64.64 72.6,63.92C70.91,63.19 69.41,62.18 68.11,60.88C66.88,62.18 65.45,63.19 63.83,63.92C62.2,64.64 60.45,65 58.58,65C56.48,65 54.58,64.64 52.89,63.92C51.19,63.19 49.69,62.18 48.39,60.88C46.88,62.4 45.38,63.47 43.9,64.08C42.42,64.69 40.74,65 38.86,65H38.37C38.19,65 37.99,64.93 37.78,64.78V95.33Z"
android:fillColor="#ffffff"/>
</group>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M440,680L280,680Q197,680 138.5,621.5Q80,563 80,480Q80,397 138.5,338.5Q197,280 280,280L440,280L440,360L280,360Q230,360 195,395Q160,430 160,480Q160,530 195,565Q230,600 280,600L440,600L440,680ZM320,520L320,440L640,440L640,520L320,520ZM520,680L520,600L680,600Q730,600 765,565Q800,530 800,480Q800,430 765,395Q730,360 680,360L520,360L520,280L680,280Q763,280 821.5,338.5Q880,397 880,480Q880,563 821.5,621.5Q763,680 680,680L520,680Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M280,920Q247,920 223.5,896.5Q200,873 200,840L200,120Q200,87 223.5,63.5Q247,40 280,40L680,40Q713,40 736.5,63.5Q760,87 760,120L760,244Q778,251 789,266Q800,281 800,300L800,380Q800,399 789,414Q778,429 760,436L760,840Q760,873 736.5,896.5Q713,920 680,920L280,920ZM280,840L680,840Q680,840 680,840Q680,840 680,840L680,120Q680,120 680,120Q680,120 680,120L280,120Q280,120 280,120Q280,120 280,120L280,840Q280,840 280,840Q280,840 280,840ZM280,840Q280,840 280,840Q280,840 280,840L280,120Q280,120 280,120Q280,120 280,120L280,120Q280,120 280,120Q280,120 280,120L280,840Q280,840 280,840Q280,840 280,840ZM480,240Q497,240 508.5,228.5Q520,217 520,200Q520,183 508.5,171.5Q497,160 480,160Q463,160 451.5,171.5Q440,183 440,200Q440,217 451.5,228.5Q463,240 480,240Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M200,840Q167,840 143.5,816.5Q120,793 120,760L120,200Q120,167 143.5,143.5Q167,120 200,120L760,120Q793,120 816.5,143.5Q840,167 840,200L840,760Q840,793 816.5,816.5Q793,840 760,840L600,840L600,760L760,760Q760,760 760,760Q760,760 760,760L760,280L200,280L200,760Q200,760 200,760Q200,760 200,760L360,760L360,840L200,840ZM440,840L440,594L376,658L320,600L480,440L640,600L584,658L520,594L520,840L440,840Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,800Q346,800 253,707Q160,614 160,480Q160,346 253,253Q346,160 480,160Q549,160 612,188.5Q675,217 720,270L720,160L800,160L800,440L520,440L520,360L688,360Q656,304 600.5,272Q545,240 480,240Q380,240 310,310Q240,380 240,480Q240,580 310,650Q380,720 480,720Q557,720 619,676Q681,632 706,560L790,560Q762,666 676,733Q590,800 480,800Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M784,840L532,588Q502,612 463,626Q424,640 380,640Q271,640 195.5,564.5Q120,489 120,380Q120,271 195.5,195.5Q271,120 380,120Q489,120 564.5,195.5Q640,271 640,380Q640,424 626,463Q612,502 588,532L840,784L784,840ZM380,560Q455,560 507.5,507.5Q560,455 560,380Q560,305 507.5,252.5Q455,200 380,200Q305,200 252.5,252.5Q200,305 200,380Q200,455 252.5,507.5Q305,560 380,560Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,880Q341,845 250.5,720.5Q160,596 160,444L160,200L480,80L800,200L800,444Q800,596 709.5,720.5Q619,845 480,880ZM480,796Q577,766 642,677.5Q707,589 718,480L480,480L480,165L240,255L240,444Q240,455 240,462Q240,469 242,480L480,480L480,796Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M370,880L354,752Q341,747 329.5,740Q318,733 307,725L188,775L78,585L181,507Q180,500 180,493.5Q180,487 180,480Q180,473 180,466.5Q180,460 181,453L78,375L188,185L307,235Q318,227 330,220Q342,213 354,208L370,80L590,80L606,208Q619,213 630.5,220Q642,227 653,235L772,185L882,375L779,453Q780,460 780,466.5Q780,473 780,480Q780,487 780,493.5Q780,500 778,507L881,585L771,775L653,725Q642,733 630,740Q618,747 606,752L590,880L370,880ZM440,800L519,800L533,694Q564,686 590.5,670.5Q617,655 639,633L738,674L777,606L691,541Q696,527 698,511.5Q700,496 700,480Q700,464 698,448.5Q696,433 691,419L777,354L738,286L639,328Q617,305 590.5,289.5Q564,274 533,266L520,160L441,160L427,266Q396,274 369.5,289.5Q343,305 321,327L222,286L183,354L269,418Q264,433 262,448Q260,463 260,480Q260,496 262,511Q264,526 269,541L183,606L222,674L321,632Q343,655 369.5,670.5Q396,686 427,694L440,800ZM482,620Q540,620 581,579Q622,538 622,480Q622,422 581,381Q540,340 482,340Q423,340 382.5,381Q342,422 342,480Q342,538 382.5,579Q423,620 482,620ZM480,480L480,480Q480,480 480,480Q480,480 480,480L480,480L480,480L480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480L480,480L480,480L480,480Q480,480 480,480Q480,480 480,480L480,480L480,480L480,480Q480,480 480,480Q480,480 480,480L480,480L480,480L480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480L480,480L480,480L480,480Q480,480 480,480Q480,480 480,480L480,480Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M354,673L480,597L606,674L573,530L684,434L538,421L480,285L422,420L276,433L387,530L354,673ZM233,840L298,559L80,370L368,345L480,80L592,345L880,370L662,559L727,840L480,691L233,840ZM480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490L480,490Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M233,840L298,559L80,370L368,345L480,80L592,345L880,370L662,559L727,840L480,691L233,840Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M412,792Q457,701 532,670.5Q607,640 660,640Q683,640 705,644Q727,648 748,654Q772,616 786,572Q800,528 800,480Q800,346 707,253Q614,160 480,160Q346,160 253,253Q160,346 160,480Q160,525 171.5,566Q183,607 206,642Q247,622 291,611Q335,600 380,600Q412,600 441.5,605.5Q471,611 500,620Q477,632 456.5,648Q436,664 418,682Q406,680 397.5,680Q389,680 380,680Q348,680 316.5,687Q285,694 256,708Q288,740 327.5,761.5Q367,783 412,792ZM480,880Q397,880 324,848.5Q251,817 197,763Q143,709 111.5,636Q80,563 80,480Q80,397 111.5,324Q143,251 197,197Q251,143 324,111.5Q397,80 480,80Q563,80 636,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,480Q880,563 848.5,636Q817,709 763,763Q709,817 636,848.5Q563,880 480,880ZM380,540Q322,540 281,499Q240,458 240,400Q240,342 281,301Q322,260 380,260Q438,260 479,301Q520,342 520,400Q520,458 479,499Q438,540 380,540ZM380,460Q405,460 422.5,442.5Q440,425 440,400Q440,375 422.5,357.5Q405,340 380,340Q355,340 337.5,357.5Q320,375 320,400Q320,425 337.5,442.5Q355,460 380,460ZM660,580Q618,580 589,551Q560,522 560,480Q560,438 589,409Q618,380 660,380Q702,380 731,409Q760,438 760,480Q760,522 731,551Q702,580 660,580ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M240,120L680,120L680,640L400,920L350,870Q343,863 338.5,851Q334,839 334,828L334,814L378,640L120,640Q88,640 64,616Q40,592 40,560L40,480Q40,473 42,465Q44,457 46,450L166,168Q175,148 196,134Q217,120 240,120ZM600,200L240,200Q240,200 240,200Q240,200 240,200L120,480L120,560Q120,560 120,560Q120,560 120,560L480,560L426,780L600,606L600,200ZM600,606L600,606L600,560L600,560Q600,560 600,560Q600,560 600,560L600,480L600,200Q600,200 600,200Q600,200 600,200L600,200L600,606ZM680,640L680,560L800,560L800,200L680,200L680,120L880,120L880,640L680,640Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M720,840L280,840L280,320L560,40L610,90Q617,97 621.5,109Q626,121 626,132L626,146L582,320L840,320Q872,320 896,344Q920,368 920,400L920,480Q920,487 918,495Q916,503 914,510L794,792Q785,812 764,826Q743,840 720,840ZM360,760L720,760Q720,760 720,760Q720,760 720,760L840,480L840,400Q840,400 840,400Q840,400 840,400L480,400L534,180L360,354L360,760ZM360,354L360,354L360,400L360,400Q360,400 360,400Q360,400 360,400L360,480L360,760Q360,760 360,760Q360,760 360,760L360,760L360,354ZM280,320L280,400L160,400L160,760L280,760L280,840L80,840L80,320L280,320Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M320,840L320,760L160,760Q127,760 103.5,736.5Q80,713 80,680L80,200Q80,167 103.5,143.5Q127,120 160,120L800,120Q833,120 856.5,143.5Q880,167 880,200L880,680Q880,713 856.5,736.5Q833,760 800,760L640,760L640,840L320,840ZM160,680L800,680Q800,680 800,680Q800,680 800,680L800,200Q800,200 800,200Q800,200 800,200L160,200Q160,200 160,200Q160,200 160,200L160,680Q160,680 160,680Q160,680 160,680ZM160,680Q160,680 160,680Q160,680 160,680L160,200Q160,200 160,200Q160,200 160,200L160,200Q160,200 160,200Q160,200 160,200L160,680Q160,680 160,680Q160,680 160,680Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M160,840L160,760L160,760Q127,760 103.5,736.5Q80,713 80,680L80,240Q80,207 103.5,183.5Q127,160 160,160L800,160Q833,160 856.5,183.5Q880,207 880,240L880,680Q880,713 856.5,736.5Q833,760 800,760L800,760L800,840L760,840L734,760L227,760L200,840L160,840ZM160,680L800,680Q800,680 800,680Q800,680 800,680L800,240Q800,240 800,240Q800,240 800,240L160,240Q160,240 160,240Q160,240 160,240L160,680Q160,680 160,680Q160,680 160,680ZM480,460Q480,460 480,460Q480,460 480,460L480,460Q480,460 480,460Q480,460 480,460L480,460Q480,460 480,460Q480,460 480,460L480,460Q480,460 480,460Q480,460 480,460Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M480,840Q405,840 339.5,811.5Q274,783 225.5,734.5Q177,686 148.5,620.5Q120,555 120,480Q120,405 148.5,339.5Q177,274 225.5,225.5Q274,177 339.5,148.5Q405,120 480,120Q562,120 635.5,155Q709,190 760,254L760,160L840,160L840,400L600,400L600,320L710,320Q669,264 609,232Q549,200 480,200Q363,200 281.5,281.5Q200,363 200,480Q200,597 281.5,678.5Q363,760 480,760Q585,760 663.5,692Q742,624 756,520L838,520Q823,657 720.5,748.5Q618,840 480,840ZM592,648L440,496L440,280L520,280L520,464L648,592L592,648Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M440,760L520,760L520,593L584,657L640,600L480,440L320,600L377,656L440,593L440,760ZM240,880Q207,880 183.5,856.5Q160,833 160,800L160,160Q160,127 183.5,103.5Q207,80 240,80L560,80L800,320L800,800Q800,833 776.5,856.5Q753,880 720,880L240,880ZM520,360L520,160L240,160Q240,160 240,160Q240,160 240,160L240,800Q240,800 240,800Q240,800 240,800L720,800Q720,800 720,800Q720,800 720,800L720,360L520,360ZM240,160L240,160L240,360L240,360L240,160L240,360L240,360L240,800Q240,800 240,800Q240,800 240,800L240,800Q240,800 240,800Q240,800 240,800L240,160Q240,160 240,160Q240,160 240,160Z"/>
</vector>

View file

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M40,840L480,80L920,840L40,840ZM178,760L782,760L480,240L178,760ZM480,720Q497,720 508.5,708.5Q520,697 520,680Q520,663 508.5,651.5Q497,640 480,640Q463,640 451.5,651.5Q440,663 440,680Q440,697 451.5,708.5Q463,720 480,720ZM440,600L520,600L520,400L440,400L440,600ZM480,500L480,500L480,500Z"/>
</vector>

View file

@ -2,5 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>

View file

@ -2,5 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

@ -1,7 +1,8 @@
<resources>
<string name="app_name">OpenStore</string>
<string name="safety_card_text">About app safety</string>
<string name="error_message">Error: %1$s</string>
<string name="provided_by">Provided by %1$s</string>
<string name="provided_by_third_party">App from %1$s</string>
<string name="device_unsupported">Not compatible with your device</string>
<string name="installing">Installing…</string>
<string name="downloading">Downloading…%1$s</string>
@ -17,7 +18,7 @@
<string name="search_title">Search</string>
<string name="no_reviews">No reviews yet</string>
<string name="reviews_title">Reviews</string>
<string name="unconfirmed_domains">Domains not verified</string>
<string name="unconfirmed_domains">Open links in the app</string>
<string name="app_uninstalled">App deleted</string>
<string name="app_installed">App installed</string>
<string name="failed_uninstall">Unable to uninstall</string>
@ -31,4 +32,47 @@
<string name="useful_first">Useful</string>
<string name="positive_first">Positive</string>
<string name="negative_first">Negative</string>
<string name="download_has_started">Download has started</string>
<string name="invalid_download_hash_title">File downloaded incorrectly</string>
<string name="invalid_download_hash_message">Checksum does not match. Retry download or install file as is.</string>
<string name="show_hashes">Show hashes</string>
<string name="expected_hash">Expected hash: %1$s</string>
<string name="actual_hash">Actual hash: %1$s</string>
<string name="download_again">Download again</string>
<string name="install_as_is">Install as is</string>
<string name="not_found_error">Nothing found</string>
<string name="settings_title">Settings</string>
<string name="settings_installer_title">Installer</string>
<string name="settings_installer_description">If there are problems installing applications</string>
<string name="settings_updates_sources_title">Tracked sources</string>
<string name="settings_updates_sources_description">Updates will be checked for applications from selected sources</string>
<string name="settings_updates_check_all_title">Check all applications</string>
<string name="settings_updates_check_all_description">Do not limit the update check to selected sources. RuStore will get access to the entire list of applications on device</string>
<string name="settings_save_button">Save</string>
<string name="updates_title">Updates</string>
<string name="check_updates">Check for updates</string>
<string name="checking_updates">Checking for updates…</string>
<string name="all_apps_updated">All apps are up to date</string>
<string name="available_updates">Available updates: %1$d</string>
<string name="check_updates_hint">Tap to check for updates</string>
<string name="exclude_google_play">Exclude Google Play</string>
<string name="updates_change_settings">Open settings</string>
<string name="updates_app_count">Applications checked: %1$d</string>
<string name="intent_installer_warning">Installation via intent, go back to the page after installation</string>
<string name="intent_installer_split_apk_build">The assembly is in progress .apks file, installation is possible only with a custom installer…</string>
<string name="settings_app_theme_title">Color scheme (restart required)</string>
<string name="settings_source_aurora_store">Aurora Store</string>
<string name="settings_group_file_managers">File Managers</string>
<string name="settings_group_browsers">Browsers</string>
<string name="signature_mismatch_warning">Installed from another source</string>
<string name="settings_source_manual">Manual Installed</string>
<string name="settings_source_unknown">Unknown (ADB/Other)</string>
<string name="provided_by_developer">Provided by developer</string>
<string name="mobile_label">Mobile</string>
<string name="tv_label">TV</string>
<string name="theme_auto_label">Auto</string>
<string name="theme_dark_label">Dark</string>
<string name="theme_light_label">Light</string>
<string name="back_button_desc">Back</string>
<string name="tts_current_platform">Apps for platfom</string>
</resources>

View file

@ -1,143 +0,0 @@
<resources>
<color name="md_theme_primary">#A1C9FD</color>
<color name="md_theme_onPrimary">#003259</color>
<color name="md_theme_primaryContainer">#1B4975</color>
<color name="md_theme_onPrimaryContainer">#D2E4FF</color>
<color name="md_theme_secondary">#BBC7DB</color>
<color name="md_theme_onSecondary">#253140</color>
<color name="md_theme_secondaryContainer">#3C4858</color>
<color name="md_theme_onSecondaryContainer">#D7E3F8</color>
<color name="md_theme_tertiary">#D7BEE4</color>
<color name="md_theme_onTertiary">#3B2947</color>
<color name="md_theme_tertiaryContainer">#533F5F</color>
<color name="md_theme_onTertiaryContainer">#F3DAFF</color>
<color name="md_theme_error">#FFB4AB</color>
<color name="md_theme_onError">#690005</color>
<color name="md_theme_errorContainer">#93000A</color>
<color name="md_theme_onErrorContainer">#FFDAD6</color>
<color name="md_theme_background">#111418</color>
<color name="md_theme_onBackground">#E1E2E8</color>
<color name="md_theme_surface">#111418</color>
<color name="md_theme_onSurface">#E1E2E8</color>
<color name="md_theme_surfaceVariant">#43474E</color>
<color name="md_theme_onSurfaceVariant">#C3C6CF</color>
<color name="md_theme_outline">#8D9199</color>
<color name="md_theme_outlineVariant">#43474E</color>
<color name="md_theme_scrim">#000000</color>
<color name="md_theme_inverseSurface">#E1E2E8</color>
<color name="md_theme_inverseOnSurface">#2E3135</color>
<color name="md_theme_inversePrimary">#37618E</color>
<color name="md_theme_primaryFixed">#D2E4FF</color>
<color name="md_theme_onPrimaryFixed">#001C37</color>
<color name="md_theme_primaryFixedDim">#A1C9FD</color>
<color name="md_theme_onPrimaryFixedVariant">#1B4975</color>
<color name="md_theme_secondaryFixed">#D7E3F8</color>
<color name="md_theme_onSecondaryFixed">#101C2B</color>
<color name="md_theme_secondaryFixedDim">#BBC7DB</color>
<color name="md_theme_onSecondaryFixedVariant">#3C4858</color>
<color name="md_theme_tertiaryFixed">#F3DAFF</color>
<color name="md_theme_onTertiaryFixed">#251431</color>
<color name="md_theme_tertiaryFixedDim">#D7BEE4</color>
<color name="md_theme_onTertiaryFixedVariant">#533F5F</color>
<color name="md_theme_surfaceDim">#111418</color>
<color name="md_theme_surfaceBright">#36393E</color>
<color name="md_theme_surfaceContainerLowest">#0B0E13</color>
<color name="md_theme_surfaceContainerLow">#191C20</color>
<color name="md_theme_surfaceContainer">#1D2024</color>
<color name="md_theme_surfaceContainerHigh">#272A2F</color>
<color name="md_theme_surfaceContainerHighest">#32353A</color>
<color name="md_theme_primary_mediumContrast">#C7DEFF</color>
<color name="md_theme_onPrimary_mediumContrast">#002747</color>
<color name="md_theme_primaryContainer_mediumContrast">#6B93C4</color>
<color name="md_theme_onPrimaryContainer_mediumContrast">#000000</color>
<color name="md_theme_secondary_mediumContrast">#D1DDF1</color>
<color name="md_theme_onSecondary_mediumContrast">#1A2635</color>
<color name="md_theme_secondaryContainer_mediumContrast">#8592A4</color>
<color name="md_theme_onSecondaryContainer_mediumContrast">#000000</color>
<color name="md_theme_tertiary_mediumContrast">#EED3FB</color>
<color name="md_theme_onTertiary_mediumContrast">#301E3C</color>
<color name="md_theme_tertiaryContainer_mediumContrast">#9F88AC</color>
<color name="md_theme_onTertiaryContainer_mediumContrast">#000000</color>
<color name="md_theme_error_mediumContrast">#FFD2CC</color>
<color name="md_theme_onError_mediumContrast">#540003</color>
<color name="md_theme_errorContainer_mediumContrast">#FF5449</color>
<color name="md_theme_onErrorContainer_mediumContrast">#000000</color>
<color name="md_theme_background_mediumContrast">#111418</color>
<color name="md_theme_onBackground_mediumContrast">#E1E2E8</color>
<color name="md_theme_surface_mediumContrast">#111418</color>
<color name="md_theme_onSurface_mediumContrast">#FFFFFF</color>
<color name="md_theme_surfaceVariant_mediumContrast">#43474E</color>
<color name="md_theme_onSurfaceVariant_mediumContrast">#D9DCE5</color>
<color name="md_theme_outline_mediumContrast">#AEB2BA</color>
<color name="md_theme_outlineVariant_mediumContrast">#8C9098</color>
<color name="md_theme_scrim_mediumContrast">#000000</color>
<color name="md_theme_inverseSurface_mediumContrast">#E1E2E8</color>
<color name="md_theme_inverseOnSurface_mediumContrast">#272A2F</color>
<color name="md_theme_inversePrimary_mediumContrast">#1C4A76</color>
<color name="md_theme_primaryFixed_mediumContrast">#D2E4FF</color>
<color name="md_theme_onPrimaryFixed_mediumContrast">#001225</color>
<color name="md_theme_primaryFixedDim_mediumContrast">#A1C9FD</color>
<color name="md_theme_onPrimaryFixedVariant_mediumContrast">#003863</color>
<color name="md_theme_secondaryFixed_mediumContrast">#D7E3F8</color>
<color name="md_theme_onSecondaryFixed_mediumContrast">#051220</color>
<color name="md_theme_secondaryFixedDim_mediumContrast">#BBC7DB</color>
<color name="md_theme_onSecondaryFixedVariant_mediumContrast">#2B3747</color>
<color name="md_theme_tertiaryFixed_mediumContrast">#F3DAFF</color>
<color name="md_theme_onTertiaryFixed_mediumContrast">#1A0926</color>
<color name="md_theme_tertiaryFixedDim_mediumContrast">#D7BEE4</color>
<color name="md_theme_onTertiaryFixedVariant_mediumContrast">#412F4D</color>
<color name="md_theme_surfaceDim_mediumContrast">#111418</color>
<color name="md_theme_surfaceBright_mediumContrast">#42454A</color>
<color name="md_theme_surfaceContainerLowest_mediumContrast">#05080B</color>
<color name="md_theme_surfaceContainerLow_mediumContrast">#1B1E22</color>
<color name="md_theme_surfaceContainer_mediumContrast">#25282D</color>
<color name="md_theme_surfaceContainerHigh_mediumContrast">#303337</color>
<color name="md_theme_surfaceContainerHighest_mediumContrast">#3B3E43</color>
<color name="md_theme_primary_highContrast">#E9F0FF</color>
<color name="md_theme_onPrimary_highContrast">#000000</color>
<color name="md_theme_primaryContainer_highContrast">#9DC6F9</color>
<color name="md_theme_onPrimaryContainer_highContrast">#000C1C</color>
<color name="md_theme_secondary_highContrast">#E9F0FF</color>
<color name="md_theme_onSecondary_highContrast">#000000</color>
<color name="md_theme_secondaryContainer_highContrast">#B7C3D7</color>
<color name="md_theme_onSecondaryContainer_highContrast">#010C1A</color>
<color name="md_theme_tertiary_highContrast">#FBEBFF</color>
<color name="md_theme_onTertiary_highContrast">#000000</color>
<color name="md_theme_tertiaryContainer_highContrast">#D3BAE0</color>
<color name="md_theme_onTertiaryContainer_highContrast">#140420</color>
<color name="md_theme_error_highContrast">#FFECE9</color>
<color name="md_theme_onError_highContrast">#000000</color>
<color name="md_theme_errorContainer_highContrast">#FFAEA4</color>
<color name="md_theme_onErrorContainer_highContrast">#220001</color>
<color name="md_theme_background_highContrast">#111418</color>
<color name="md_theme_onBackground_highContrast">#E1E2E8</color>
<color name="md_theme_surface_highContrast">#111418</color>
<color name="md_theme_onSurface_highContrast">#FFFFFF</color>
<color name="md_theme_surfaceVariant_highContrast">#43474E</color>
<color name="md_theme_onSurfaceVariant_highContrast">#FFFFFF</color>
<color name="md_theme_outline_highContrast">#EDF0F9</color>
<color name="md_theme_outlineVariant_highContrast">#BFC3CB</color>
<color name="md_theme_scrim_highContrast">#000000</color>
<color name="md_theme_inverseSurface_highContrast">#E1E2E8</color>
<color name="md_theme_inverseOnSurface_highContrast">#000000</color>
<color name="md_theme_inversePrimary_highContrast">#1C4A76</color>
<color name="md_theme_primaryFixed_highContrast">#D2E4FF</color>
<color name="md_theme_onPrimaryFixed_highContrast">#000000</color>
<color name="md_theme_primaryFixedDim_highContrast">#A1C9FD</color>
<color name="md_theme_onPrimaryFixedVariant_highContrast">#001225</color>
<color name="md_theme_secondaryFixed_highContrast">#D7E3F8</color>
<color name="md_theme_onSecondaryFixed_highContrast">#000000</color>
<color name="md_theme_secondaryFixedDim_highContrast">#BBC7DB</color>
<color name="md_theme_onSecondaryFixedVariant_highContrast">#051220</color>
<color name="md_theme_tertiaryFixed_highContrast">#F3DAFF</color>
<color name="md_theme_onTertiaryFixed_highContrast">#000000</color>
<color name="md_theme_tertiaryFixedDim_highContrast">#D7BEE4</color>
<color name="md_theme_onTertiaryFixedVariant_highContrast">#1A0926</color>
<color name="md_theme_surfaceDim_highContrast">#111418</color>
<color name="md_theme_surfaceBright_highContrast">#4D5055</color>
<color name="md_theme_surfaceContainerLowest_highContrast">#000000</color>
<color name="md_theme_surfaceContainerLow_highContrast">#1D2024</color>
<color name="md_theme_surfaceContainer_highContrast">#2E3135</color>
<color name="md_theme_surfaceContainerHigh_highContrast">#393C40</color>
<color name="md_theme_surfaceContainerHighest_highContrast">#44474C</color>
</resources>

View file

@ -1,50 +1,3 @@
<resources>
<style name="AppTheme" parent="Theme.Material3.Dark.NoActionBar">
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_secondary</item>
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="AppTheme" parent="android:Theme.Material.NoActionBar" />
</resources>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar">
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="colorControlNormal" format="color" />
</resources>

View file

@ -1,143 +0,0 @@
<resources>
<color name="md_theme_primary">#37618E</color>
<color name="md_theme_onPrimary">#FFFFFF</color>
<color name="md_theme_primaryContainer">#D2E4FF</color>
<color name="md_theme_onPrimaryContainer">#1B4975</color>
<color name="md_theme_secondary">#535F70</color>
<color name="md_theme_onSecondary">#FFFFFF</color>
<color name="md_theme_secondaryContainer">#D7E3F8</color>
<color name="md_theme_onSecondaryContainer">#3C4858</color>
<color name="md_theme_tertiary">#6B5778</color>
<color name="md_theme_onTertiary">#FFFFFF</color>
<color name="md_theme_tertiaryContainer">#F3DAFF</color>
<color name="md_theme_onTertiaryContainer">#533F5F</color>
<color name="md_theme_error">#BA1A1A</color>
<color name="md_theme_onError">#FFFFFF</color>
<color name="md_theme_errorContainer">#FFDAD6</color>
<color name="md_theme_onErrorContainer">#93000A</color>
<color name="md_theme_background">#F8F9FF</color>
<color name="md_theme_onBackground">#191C20</color>
<color name="md_theme_surface">#F8F9FF</color>
<color name="md_theme_onSurface">#191C20</color>
<color name="md_theme_surfaceVariant">#DFE2EB</color>
<color name="md_theme_onSurfaceVariant">#43474E</color>
<color name="md_theme_outline">#73777F</color>
<color name="md_theme_outlineVariant">#C3C6CF</color>
<color name="md_theme_scrim">#000000</color>
<color name="md_theme_inverseSurface">#2E3135</color>
<color name="md_theme_inverseOnSurface">#EFF0F7</color>
<color name="md_theme_inversePrimary">#A1C9FD</color>
<color name="md_theme_primaryFixed">#D2E4FF</color>
<color name="md_theme_onPrimaryFixed">#001C37</color>
<color name="md_theme_primaryFixedDim">#A1C9FD</color>
<color name="md_theme_onPrimaryFixedVariant">#1B4975</color>
<color name="md_theme_secondaryFixed">#D7E3F8</color>
<color name="md_theme_onSecondaryFixed">#101C2B</color>
<color name="md_theme_secondaryFixedDim">#BBC7DB</color>
<color name="md_theme_onSecondaryFixedVariant">#3C4858</color>
<color name="md_theme_tertiaryFixed">#F3DAFF</color>
<color name="md_theme_onTertiaryFixed">#251431</color>
<color name="md_theme_tertiaryFixedDim">#D7BEE4</color>
<color name="md_theme_onTertiaryFixedVariant">#533F5F</color>
<color name="md_theme_surfaceDim">#D8DAE0</color>
<color name="md_theme_surfaceBright">#F8F9FF</color>
<color name="md_theme_surfaceContainerLowest">#FFFFFF</color>
<color name="md_theme_surfaceContainerLow">#F2F3FA</color>
<color name="md_theme_surfaceContainer">#ECEEF4</color>
<color name="md_theme_surfaceContainerHigh">#E6E8EE</color>
<color name="md_theme_surfaceContainerHighest">#E1E2E8</color>
<color name="md_theme_primary_mediumContrast">#003863</color>
<color name="md_theme_onPrimary_mediumContrast">#FFFFFF</color>
<color name="md_theme_primaryContainer_mediumContrast">#476F9E</color>
<color name="md_theme_onPrimaryContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondary_mediumContrast">#2B3747</color>
<color name="md_theme_onSecondary_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondaryContainer_mediumContrast">#626E7F</color>
<color name="md_theme_onSecondaryContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiary_mediumContrast">#412F4D</color>
<color name="md_theme_onTertiary_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiaryContainer_mediumContrast">#7B6587</color>
<color name="md_theme_onTertiaryContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_error_mediumContrast">#740006</color>
<color name="md_theme_onError_mediumContrast">#FFFFFF</color>
<color name="md_theme_errorContainer_mediumContrast">#CF2C27</color>
<color name="md_theme_onErrorContainer_mediumContrast">#FFFFFF</color>
<color name="md_theme_background_mediumContrast">#F8F9FF</color>
<color name="md_theme_onBackground_mediumContrast">#191C20</color>
<color name="md_theme_surface_mediumContrast">#F8F9FF</color>
<color name="md_theme_onSurface_mediumContrast">#0E1116</color>
<color name="md_theme_surfaceVariant_mediumContrast">#DFE2EB</color>
<color name="md_theme_onSurfaceVariant_mediumContrast">#32363D</color>
<color name="md_theme_outline_mediumContrast">#4E535A</color>
<color name="md_theme_outlineVariant_mediumContrast">#696D75</color>
<color name="md_theme_scrim_mediumContrast">#000000</color>
<color name="md_theme_inverseSurface_mediumContrast">#2E3135</color>
<color name="md_theme_inverseOnSurface_mediumContrast">#EFF0F7</color>
<color name="md_theme_inversePrimary_mediumContrast">#A1C9FD</color>
<color name="md_theme_primaryFixed_mediumContrast">#476F9E</color>
<color name="md_theme_onPrimaryFixed_mediumContrast">#FFFFFF</color>
<color name="md_theme_primaryFixedDim_mediumContrast">#2C5784</color>
<color name="md_theme_onPrimaryFixedVariant_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixed_mediumContrast">#626E7F</color>
<color name="md_theme_onSecondaryFixed_mediumContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixedDim_mediumContrast">#4A5666</color>
<color name="md_theme_onSecondaryFixedVariant_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixed_mediumContrast">#7B6587</color>
<color name="md_theme_onTertiaryFixed_mediumContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixedDim_mediumContrast">#614D6E</color>
<color name="md_theme_onTertiaryFixedVariant_mediumContrast">#FFFFFF</color>
<color name="md_theme_surfaceDim_mediumContrast">#C5C6CC</color>
<color name="md_theme_surfaceBright_mediumContrast">#F8F9FF</color>
<color name="md_theme_surfaceContainerLowest_mediumContrast">#FFFFFF</color>
<color name="md_theme_surfaceContainerLow_mediumContrast">#F2F3FA</color>
<color name="md_theme_surfaceContainer_mediumContrast">#E6E8EE</color>
<color name="md_theme_surfaceContainerHigh_mediumContrast">#DBDDE3</color>
<color name="md_theme_surfaceContainerHighest_mediumContrast">#D0D1D7</color>
<color name="md_theme_primary_highContrast">#002D52</color>
<color name="md_theme_onPrimary_highContrast">#FFFFFF</color>
<color name="md_theme_primaryContainer_highContrast">#1E4B78</color>
<color name="md_theme_onPrimaryContainer_highContrast">#FFFFFF</color>
<color name="md_theme_secondary_highContrast">#212D3C</color>
<color name="md_theme_onSecondary_highContrast">#FFFFFF</color>
<color name="md_theme_secondaryContainer_highContrast">#3E4A5A</color>
<color name="md_theme_onSecondaryContainer_highContrast">#FFFFFF</color>
<color name="md_theme_tertiary_highContrast">#372543</color>
<color name="md_theme_onTertiary_highContrast">#FFFFFF</color>
<color name="md_theme_tertiaryContainer_highContrast">#554262</color>
<color name="md_theme_onTertiaryContainer_highContrast">#FFFFFF</color>
<color name="md_theme_error_highContrast">#600004</color>
<color name="md_theme_onError_highContrast">#FFFFFF</color>
<color name="md_theme_errorContainer_highContrast">#98000A</color>
<color name="md_theme_onErrorContainer_highContrast">#FFFFFF</color>
<color name="md_theme_background_highContrast">#F8F9FF</color>
<color name="md_theme_onBackground_highContrast">#191C20</color>
<color name="md_theme_surface_highContrast">#F8F9FF</color>
<color name="md_theme_onSurface_highContrast">#000000</color>
<color name="md_theme_surfaceVariant_highContrast">#DFE2EB</color>
<color name="md_theme_onSurfaceVariant_highContrast">#000000</color>
<color name="md_theme_outline_highContrast">#282C33</color>
<color name="md_theme_outlineVariant_highContrast">#454951</color>
<color name="md_theme_scrim_highContrast">#000000</color>
<color name="md_theme_inverseSurface_highContrast">#2E3135</color>
<color name="md_theme_inverseOnSurface_highContrast">#FFFFFF</color>
<color name="md_theme_inversePrimary_highContrast">#A1C9FD</color>
<color name="md_theme_primaryFixed_highContrast">#1E4B78</color>
<color name="md_theme_onPrimaryFixed_highContrast">#FFFFFF</color>
<color name="md_theme_primaryFixedDim_highContrast">#00345D</color>
<color name="md_theme_onPrimaryFixedVariant_highContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixed_highContrast">#3E4A5A</color>
<color name="md_theme_onSecondaryFixed_highContrast">#FFFFFF</color>
<color name="md_theme_secondaryFixedDim_highContrast">#273343</color>
<color name="md_theme_onSecondaryFixedVariant_highContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixed_highContrast">#554262</color>
<color name="md_theme_onTertiaryFixed_highContrast">#FFFFFF</color>
<color name="md_theme_tertiaryFixedDim_highContrast">#3E2B4A</color>
<color name="md_theme_onTertiaryFixedVariant_highContrast">#FFFFFF</color>
<color name="md_theme_surfaceDim_highContrast">#B7B9BF</color>
<color name="md_theme_surfaceBright_highContrast">#F8F9FF</color>
<color name="md_theme_surfaceContainerLowest_highContrast">#FFFFFF</color>
<color name="md_theme_surfaceContainerLow_highContrast">#EFF0F7</color>
<color name="md_theme_surfaceContainer_highContrast">#E1E2E8</color>
<color name="md_theme_surfaceContainerHigh_highContrast">#D3D4DA</color>
<color name="md_theme_surfaceContainerHighest_highContrast">#C5C6CC</color>
</resources>

View file

@ -2,7 +2,8 @@
<string name="app_name">OpenStore</string>
<string name="safety_card_text">О безопасности приложений</string>
<string name="error_message">Ошибка: %1$s</string>
<string name="provided_by">Предоставлено %1$s</string>
<string name="provided_by_developer">Предоставлено разработчиком</string>
<string name="provided_by_third_party">Приложение из %1$s</string>
<string name="device_unsupported">Не поддерживается на этом устройстве</string>
<string name="installing">Установка…</string>
<string name="downloading">Загрузка…%1$s</string>
@ -18,7 +19,7 @@
<string name="search_title">Поиск</string>
<string name="no_reviews">Отзывов пока нет</string>
<string name="reviews_title">Отзывы</string>
<string name="unconfirmed_domains">Домены не подтверждены</string>
<string name="unconfirmed_domains">Открывать ссылки в приложении</string>
<string name="app_uninstalled">Удалено</string>
<string name="app_installed">Установлено</string>
<string name="failed_uninstall">Не удалось удалить</string>
@ -32,4 +33,60 @@
<string name="useful_first">Полезные</string>
<string name="positive_first">Позитивные</string>
<string name="negative_first">Негативные</string>
<string name="download_has_started">Загрузка началась</string>
<string name="invalid_download_hash_title">Файл скачан некорректно</string>
<string name="invalid_download_hash_message">Контрольная сумма не совпадает. Повторите загрузку или установите файл как есть.</string>
<string name="show_hashes">Показать хеши</string>
<string name="expected_hash">Ожидаемый хеш: %1$s</string>
<string name="actual_hash">Фактический хеш: %1$s</string>
<string name="download_again">Скачать по новой</string>
<string name="install_as_is">Установить как есть</string>
<string name="not_found_error">Ничего не найдено</string>
<string name="settings_title">Настройки</string>
<string name="settings_installer_title">Установщик</string>
<string name="settings_installer_description">Если есть проблемы при установке приложений</string>
<string name="settings_updates_sources_title">Отслеживаемые источники</string>
<string name="settings_updates_check_all_title">Проверять все приложения</string>
<string name="settings_updates_check_all_description">Не ограничивать проверку обновлений выбранными источниками. RuStore получит доступ ко всему списку приложений на устройстве</string>
<string name="settings_save_button">Сохранить</string>
<string name="updates_title">Обновления</string>
<string name="check_updates">Проверить обновления</string>
<string name="checking_updates">Проверка обновлений…</string>
<string name="all_apps_updated">Все приложения обновлены</string>
<string name="available_updates">Доступно обновлений: %1$d</string>
<string name="check_updates_hint">Нажмите для проверки обновлений</string>
<string name="exclude_google_play">Исключить Google Play</string>
<string name="updates_change_settings">Открыть настройки</string>
<string name="updates_app_count">Проверяется приложений: %1$d</string>
<string name="intent_installer_warning">Установка через intent, перезайдите на страницу после установки</string>
<string name="intent_installer_split_apk_build">Выполняется сборка .apks файла, установка возможно только кастомным установщиком…</string>
<string name="settings_app_theme_title">Тема (необходим перезапуск)</string>
<string name="settings_source_aurora_store">Aurora Store</string>
<string name="settings_group_file_managers">Файловые менеджеры</string>
<string name="settings_group_browsers">Браузеры</string>
<string name="settings_source_manual">Установлено вручную</string>
<string name="settings_source_unknown">Неизвестно (ADB/Другое)</string>
<string name="signature_mismatch_warning">Установлено из другого источника</string>
<string name="mobile_label">Телефон</string>
<string name="tv_label">ТВ</string>
<string name="theme_auto_label">Системная</string>
<string name="theme_dark_label">Тёмная</string>
<string name="theme_light_label">Светлая</string>
<string name="settings_updates_sources_description">Обновления будут проверяться для приложений из выбранных источников</string>
<string name="back_button_desc">Назад</string>
<string name="tts_current_platform">Приложения для платформы</string>
<string name="copy_link_desc">Скопировать ссылку на apk</string>
<string name="download_apk_desc">Скачать apk без установки</string>
<string name="open_in_browser_desc">Открыть страницу приложения в браузере</string>
<string name="app_size_desc">Вес приложения</string>
<string name="latest_version_desc">Текущая версия</string>
<string name="last_update_desc">Последнее обновление</string>
<string name="min_api_desc">Минимальная версия android</string>
<string name="installer_type_desc">Тип установочного файла</string>
<string name="downloads_desc">Количество установок</string>
<string name="age_legal_desc">Возрастная категория</string>
<string name="reviews_desc">Рейтинг и отзывы\nСредняя оценка: %1$.2f\nВсего оценок: %2$d</string>
<string name="review_rating_desc">оценка: %1$d</string>
<string name="likes_desc">Лайки</string>
<string name="dislikes_desc">Дизлайки</string>
</resources>

View file

@ -1,50 +1,3 @@
<resources>
<style name="AppTheme" parent="Theme.Material3.Light.NoActionBar">
<item name="colorPrimary">@color/md_theme_primary</item>
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
<item name="colorSecondary">@color/md_theme_secondary</item>
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
<item name="colorTertiary">@color/md_theme_tertiary</item>
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
<item name="colorError">@color/md_theme_error</item>
<item name="colorOnError">@color/md_theme_onError</item>
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
<item name="android:colorBackground">@color/md_theme_background</item>
<item name="colorOnBackground">@color/md_theme_onBackground</item>
<item name="colorSurface">@color/md_theme_surface</item>
<item name="colorOnSurface">@color/md_theme_onSurface</item>
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
<item name="colorOutline">@color/md_theme_outline</item>
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
</style>
<style name="AppTheme" parent="android:Theme.Material.Light.NoActionBar" />
</resources>

View file

@ -1,14 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="199"
android:viewportHeight="199">
<group android:scaleX="0.64166665"
android:scaleY="0.64166665"
android:translateX="35.654167"
android:translateY="35.654167">
android:viewportWidth="960"
android:viewportHeight="960">
<group android:scaleX="0.50769234"
android:scaleY="0.50769234"
android:translateX="234.05128"
android:translateY="236.3077">
<path
android:pathData="M36.66,83.52C36.61,88.72 40.8,93.25 46.27,93.25H57.96L51.88,117.67C51.69,118.43 51.59,119.19 51.58,119.93C51.53,125.13 55.72,129.66 61.2,129.66H72.84L66.8,153.85C65.29,159.93 69.88,165.84 76.12,165.84L141.02,165.84C146.54,165.84 151.33,162.08 152.67,156.72L162.3,118.06C163.82,111.97 159.23,106.07 152.99,106.07L88.08,106.07C84.13,106.07 80.55,108.01 78.36,111.07C78.2,111.12 78.02,111.11 77.88,111C77.63,110.84 77.51,110.53 77.6,110.25C79.14,105.16 84.34,100.32 90.9,99.82L140.42,98.14C142.08,98.1 143.5,96.99 144.02,95.43L147.38,81.86C148.9,75.78 144.31,69.88 138.07,69.88C116.65,69.72 94.88,69.76 73.39,69.76C70.48,69.76 68.24,70.74 66.61,71.85C66.34,72.03 66.07,72.22 65.81,72.42C65.51,72.66 65.21,72.93 64.93,73.2C64.5,73.6 64.1,74.03 63.74,74.5L63.73,74.51C63.54,74.7 63.24,74.76 63.01,74.6C62.76,74.43 62.65,74.12 62.73,73.84C64.27,68.75 69.47,63.89 76.03,63.41L125.55,61.74C127.2,61.69 128.6,60.6 129.1,59.04L132.49,45.45C134.01,39.37 129.42,33.47 123.18,33.47L58.28,33.47C52.76,33.47 47.96,37.22 46.63,42.58L37,81.25C36.81,82.01 36.71,82.77 36.71,83.51L36.66,83.52Z"
android:fillColor="#ffffff"/>
android:pathData="M841,442v318q0,33 -23.5,56.5T761,840L201,840q-33,0 -56.5,-23.5T121,760v-318q-23,-21 -35.5,-54t-0.5,-72l42,-136q8,-26 28.5,-43t47.5,-17h556q27,0 47,16.5t29,43.5l42,136q12,39 -0.5,71T841,442ZM569,400q27,0 41,-18.5t11,-41.5l-22,-140h-78v148q0,21 14,36.5t34,15.5ZM389,400q23,0 37.5,-15.5T441,348v-148h-78l-22,140q-4,24 10.5,42t37.5,18ZM211,400q18,0 31.5,-13t16.5,-33l22,-154h-78l-40,134q-6,20 6.5,43t41.5,23ZM751,400q29,0 42,-23t6,-43l-42,-134h-76l22,154q3,20 16.5,33t31.5,13ZM201,760h560v-282q-5,2 -6.5,2L751,480q-27,0 -47.5,-9T663,442q-18,18 -41,28t-49,10q-27,0 -50.5,-10T481,442q-17,18 -39.5,28T393,480q-29,0 -52.5,-10T299,442q-21,21 -41.5,29.5T211,480h-4.5q-2.5,0 -5.5,-2v282ZM761,760L201,760h560Z"
android:fillColor="#FFFFFF"/>
</group>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

View file

@ -0,0 +1 @@
Rewritten in kotlin and added many new features!

Some files were not shown because too many files have changed in this diff Show more