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
967ca172
Commit
967ca172
authored
Dec 03, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix custom channel dialog
parent
595c7214
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
18 deletions
+37
-18
build.gradle
app/build.gradle
+1
-1
changelog.md
app/src/main/assets/changelog.md
+1
-1
SettingsActivity.java
app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java
+10
-16
custom_channel_dialog.xml
app/src/main/res/layout/custom_channel_dialog.xml
+25
-0
No files found.
app/build.gradle
View file @
967ca172
...
@@ -8,7 +8,7 @@ android {
...
@@ -8,7 +8,7 @@ android {
applicationId
"com.topjohnwu.magisk"
applicationId
"com.topjohnwu.magisk"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
27
targetSdkVersion
27
versionCode
7
0
versionCode
7
1
versionName
"5.4.3"
versionName
"5.4.3"
ndk
{
ndk
{
moduleName
'zipadjust'
moduleName
'zipadjust'
...
...
app/src/main/assets/changelog.md
View file @
967ca172
### v5.4.3 (7
0
)
### v5.4.3 (7
1
)
-
Fix dynamic resource loading, should prevent crashing when checking SafetyNet
-
Fix dynamic resource loading, should prevent crashing when checking SafetyNet
-
Update SignAPK to use very little RAM, should expand old device support
-
Update SignAPK to use very little RAM, should expand old device support
-
Support settings migration after hiding Magisk Manager
-
Support settings migration after hiding Magisk Manager
...
...
app/src/main/java/com/topjohnwu/magisk/SettingsActivity.java
View file @
967ca172
...
@@ -11,16 +11,16 @@ import android.preference.PreferenceFragment;
...
@@ -11,16 +11,16 @@ import android.preference.PreferenceFragment;
import
android.preference.PreferenceScreen
;
import
android.preference.PreferenceScreen
;
import
android.preference.SwitchPreference
;
import
android.preference.SwitchPreference
;
import
android.support.v7.app.ActionBar
;
import
android.support.v7.app.ActionBar
;
import
android.support.v7.app.AlertDialog
;
import
android.support.v7.widget.Toolbar
;
import
android.support.v7.widget.Toolbar
;
import
android.text.InputType
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.Toast
;
import
android.widget.Toast
;
import
com.topjohnwu.magisk.asyncs.CheckUpdates
;
import
com.topjohnwu.magisk.asyncs.CheckUpdates
;
import
com.topjohnwu.magisk.asyncs.HideManager
;
import
com.topjohnwu.magisk.asyncs.HideManager
;
import
com.topjohnwu.magisk.components.Activity
;
import
com.topjohnwu.magisk.components.Activity
;
import
com.topjohnwu.magisk.components.AlertDialogBuilder
;
import
com.topjohnwu.magisk.utils.Const
;
import
com.topjohnwu.magisk.utils.Const
;
import
com.topjohnwu.magisk.utils.Shell
;
import
com.topjohnwu.magisk.utils.Shell
;
import
com.topjohnwu.magisk.utils.Topic
;
import
com.topjohnwu.magisk.utils.Topic
;
...
@@ -116,21 +116,15 @@ public class SettingsActivity extends Activity implements Topic.Subscriber {
...
@@ -116,21 +116,15 @@ public class SettingsActivity extends Activity implements Topic.Subscriber {
updateChannel
.
setOnPreferenceChangeListener
((
pref
,
o
)
->
{
updateChannel
.
setOnPreferenceChangeListener
((
pref
,
o
)
->
{
mm
.
updateChannel
=
Integer
.
parseInt
((
String
)
o
);
mm
.
updateChannel
=
Integer
.
parseInt
((
String
)
o
);
if
(
mm
.
updateChannel
==
Const
.
Value
.
CUSTOM_CHANNEL
)
{
if
(
mm
.
updateChannel
==
Const
.
Value
.
CUSTOM_CHANNEL
)
{
LinearLayout
layout
=
new
LinearLayout
(
getActivity
());
View
v
=
LayoutInflater
.
from
(
getActivity
()).
inflate
(
R
.
layout
.
custom_channel_dialog
,
null
);
EditText
url
=
new
EditText
(
getActivity
());
EditText
url
=
v
.
findViewById
(
R
.
id
.
custom_url
);
url
.
setInputType
(
InputType
.
TYPE_CLASS_TEXT
|
InputType
.
TYPE_TEXT_VARIATION_URI
);
url
.
setText
(
mm
.
customChannelUrl
);
url
.
setText
(
mm
.
customChannelUrl
);
layout
.
setOrientation
(
LinearLayout
.
VERTICAL
);
new
AlertDialog
.
Builder
(
getActivity
())
layout
.
addView
(
url
);
LinearLayout
.
LayoutParams
params
=
(
LinearLayout
.
LayoutParams
)
url
.
getLayoutParams
();
params
.
setMargins
(
Utils
.
dpInPx
(
15
),
0
,
Utils
.
dpInPx
(
15
),
0
);
new
AlertDialogBuilder
(
getActivity
())
.
setTitle
(
R
.
string
.
settings_update_custom
)
.
setTitle
(
R
.
string
.
settings_update_custom
)
.
setMessage
(
R
.
string
.
settings_update_custom_msg
)
.
setView
(
v
)
.
setView
(
layout
)
.
setPositiveButton
(
R
.
string
.
ok
,
(
d
,
i
)
->
.
setPositiveButton
(
R
.
string
.
ok
,
(
d
,
i
)
->
{
prefs
.
edit
().
putString
(
Const
.
Key
.
CUSTOM_CHANNEL
,
prefs
.
edit
().
putString
(
Const
.
Key
.
CUSTOM_CHANNEL
,
url
.
getText
().
toString
()).
apply
();
url
.
getText
().
toString
()).
apply
())
})
.
setNegativeButton
(
R
.
string
.
close
,
null
)
.
setNegativeButton
(
R
.
string
.
close
,
null
)
.
show
();
.
show
();
}
}
...
...
app/src/main/res/layout/custom_channel_dialog.xml
0 → 100644
View file @
967ca172
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:paddingBottom=
"5dp"
android:paddingEnd=
"15dp"
android:paddingStart=
"15dp"
android:paddingTop=
"5dp"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"5dp"
android:labelFor=
"@id/custom_url"
android:text=
"@string/settings_update_custom_msg"
android:textColor=
"?android:textColorPrimary"
android:textAppearance=
"?android:attr/textAppearanceMedium"
/>
<EditText
android:id=
"@+id/custom_url"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:inputType=
"textUri"
/>
</LinearLayout>
\ No newline at end of file
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