Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
ccb55205
Commit
ccb55205
authored
Feb 20, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pre 21 support
parent
9cc91b30
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
11 deletions
+13
-11
Locales.kt
app/src/main/java/com/topjohnwu/magisk/core/utils/Locales.kt
+1
-1
XJava.kt
app/src/main/java/com/topjohnwu/magisk/ktx/XJava.kt
+1
-1
bg_line_bottom_rounded.xml
app/src/main/res/drawable/bg_line_bottom_rounded.xml
+2
-2
bg_line_top_rounded.xml
app/src/main/res/drawable/bg_line_top_rounded.xml
+2
-2
item_log_track_md2.xml
app/src/main/res/layout/item_log_track_md2.xml
+6
-4
connect.cpp
native/jni/su/connect.cpp
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/core/utils/Locales.kt
View file @
ccb55205
...
@@ -38,7 +38,7 @@ withContext(Dispatchers.Default) {
...
@@ -38,7 +38,7 @@ withContext(Dispatchers.Default) {
add
(
"pt-BR"
)
add
(
"pt-BR"
)
// Then add all supported locales
// Then add all supported locales
addAll
(
res
.
assets
.
locales
)
addAll
(
Resources
.
getSystem
()
.
assets
.
locales
)
}.
map
{
}.
map
{
it
.
langTagToLocale
()
it
.
langTagToLocale
()
}.
distinctBy
{
}.
distinctBy
{
...
...
app/src/main/java/com/topjohnwu/magisk/ktx/XJava.kt
View file @
ccb55205
...
@@ -51,7 +51,7 @@ fun String.langTagToLocale(): Locale {
...
@@ -51,7 +51,7 @@ fun String.langTagToLocale(): Locale {
if
(
Build
.
VERSION
.
SDK_INT
>=
21
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
21
)
{
return
Locale
.
forLanguageTag
(
this
)
return
Locale
.
forLanguageTag
(
this
)
}
else
{
}
else
{
val
tok
=
split
(
"
-
"
.
toRegex
()).
dropLastWhile
{
it
.
isEmpty
()
}.
toTypedArray
()
val
tok
=
split
(
"
[-_]
"
.
toRegex
()).
dropLastWhile
{
it
.
isEmpty
()
}.
toTypedArray
()
if
(
tok
.
isEmpty
())
{
if
(
tok
.
isEmpty
())
{
return
Locale
(
""
)
return
Locale
(
""
)
}
}
...
...
app/src/main/res/drawable/bg_line_bottom_rounded.xml
View file @
ccb55205
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<item>
<item>
<shape
android:shape=
"rectangle"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"
?colorSecondary
"
/>
<solid
android:color=
"
@android:color/black
"
/>
<corners
android:bottomLeftRadius=
"2dp"
android:bottomRightRadius=
"2dp"
/>
<corners
android:bottomLeftRadius=
"2dp"
android:bottomRightRadius=
"2dp"
/>
</shape>
</shape>
</item>
</item>
</selector>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_line_top_rounded.xml
View file @
ccb55205
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<item>
<item>
<shape
android:shape=
"rectangle"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"
?colorSecondary
"
/>
<solid
android:color=
"
@android:color/black
"
/>
<corners
android:topLeftRadius=
"2dp"
android:topRightRadius=
"2dp"
/>
<corners
android:topLeftRadius=
"2dp"
android:topRightRadius=
"2dp"
/>
</shape>
</shape>
</item>
</item>
</selector>
</selector>
\ No newline at end of file
app/src/main/res/layout/item_log_track_md2.xml
View file @
ccb55205
...
@@ -29,14 +29,15 @@
...
@@ -29,14 +29,15 @@
tools:layout_gravity=
"center"
tools:layout_gravity=
"center"
tools:minHeight=
"?listPreferredItemHeightSmall"
>
tools:minHeight=
"?listPreferredItemHeightSmall"
>
<View
<
Image
View
android:id=
"@+id/track_top"
android:id=
"@+id/track_top"
invisible=
"@{isTop}"
invisible=
"@{isTop}"
android:layout_width=
"2dp"
android:layout_width=
"2dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_marginBottom=
"2dp"
android:layout_marginBottom=
"2dp"
android:alpha=
".3"
android:alpha=
".3"
android:background=
"@drawable/bg_line_bottom_rounded"
app:tint=
"?colorSecondary"
app:srcCompat=
"@drawable/bg_line_bottom_rounded"
app:layout_constraintBottom_toTopOf=
"@+id/track_bullet"
app:layout_constraintBottom_toTopOf=
"@+id/track_bullet"
app:layout_constraintEnd_toEndOf=
"@+id/track_bullet"
app:layout_constraintEnd_toEndOf=
"@+id/track_bullet"
app:layout_constraintStart_toStartOf=
"@+id/track_bullet"
app:layout_constraintStart_toStartOf=
"@+id/track_bullet"
...
@@ -54,14 +55,15 @@
...
@@ -54,14 +55,15 @@
app:tint=
"@color/color_primary_error_transient"
app:tint=
"@color/color_primary_error_transient"
tools:srcCompat=
"@drawable/ic_check_md2"
/>
tools:srcCompat=
"@drawable/ic_check_md2"
/>
<View
<
Image
View
android:id=
"@+id/track_bottom"
android:id=
"@+id/track_bottom"
invisible=
"@{isBottom}"
invisible=
"@{isBottom}"
android:layout_width=
"2dp"
android:layout_width=
"2dp"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"2dp"
android:layout_marginTop=
"2dp"
android:alpha=
".3"
android:alpha=
".3"
android:background=
"@drawable/bg_line_top_rounded"
app:tint=
"?colorSecondary"
app:srcCompat=
"@drawable/bg_line_top_rounded"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/track_bullet"
app:layout_constraintEnd_toEndOf=
"@+id/track_bullet"
app:layout_constraintStart_toStartOf=
"@+id/track_bullet"
app:layout_constraintStart_toStartOf=
"@+id/track_bullet"
...
...
native/jni/su/connect.cpp
View file @
ccb55205
...
@@ -145,7 +145,7 @@ static void exec_cmd(const char *action, vector<Extra> &data,
...
@@ -145,7 +145,7 @@ static void exec_cmd(const char *action, vector<Extra> &data,
// Finally, fallback to start activity with component name
// Finally, fallback to start activity with component name
args
[
4
]
=
"-n"
;
args
[
4
]
=
"-n"
;
sprintf
(
target
,
"%s/
a.m
"
,
info
->
str
[
SU_MANAGER
].
data
());
sprintf
(
target
,
"%s/
.ui.surequest.SuRequestActivity
"
,
info
->
str
[
SU_MANAGER
].
data
());
exec
.
fd
=
-
2
;
exec
.
fd
=
-
2
;
exec
.
fork
=
fork_dont_care
;
exec
.
fork
=
fork_dont_care
;
exec_command
(
exec
);
exec_command
(
exec
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment