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
e04f9439
Commit
e04f9439
authored
Jan 05, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backwards support back to API 21
Things still crash pre-21
parent
b38e9400
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
24 additions
and
24 deletions
+24
-24
build.gradle
app/build.gradle
+1
-1
MainActivity.kt
...c/main/java/com/topjohnwu/magisk/redesign/MainActivity.kt
+2
-2
CompatDelegate.kt
...va/com/topjohnwu/magisk/redesign/compat/CompatDelegate.kt
+1
-1
CompatView.kt
...n/java/com/topjohnwu/magisk/redesign/compat/CompatView.kt
+2
-2
CompatViewModel.kt
...a/com/topjohnwu/magisk/redesign/compat/CompatViewModel.kt
+2
-2
HideFragment.kt
...n/java/com/topjohnwu/magisk/redesign/hide/HideFragment.kt
+2
-2
HomeFragment.kt
...n/java/com/topjohnwu/magisk/redesign/home/HomeFragment.kt
+2
-2
InstallFragment.kt
.../com/topjohnwu/magisk/redesign/install/InstallFragment.kt
+2
-2
LogFragment.kt
...ain/java/com/topjohnwu/magisk/redesign/log/LogFragment.kt
+2
-2
ModuleFragment.kt
...va/com/topjohnwu/magisk/redesign/module/ModuleFragment.kt
+2
-2
SettingsFragment.kt
...om/topjohnwu/magisk/redesign/settings/SettingsFragment.kt
+2
-2
SuperuserFragment.kt
.../topjohnwu/magisk/redesign/superuser/SuperuserFragment.kt
+2
-2
ThemeFragment.kt
...java/com/topjohnwu/magisk/redesign/theme/ThemeFragment.kt
+2
-2
No files found.
app/build.gradle
View file @
e04f9439
...
@@ -130,7 +130,7 @@ dependencies {
...
@@ -130,7 +130,7 @@ dependencies {
implementation
'androidx.work:work-runtime:2.2.0'
implementation
'androidx.work:work-runtime:2.2.0'
implementation
'androidx.transition:transition:1.3.0-rc02'
implementation
'androidx.transition:transition:1.3.0-rc02'
implementation
'androidx.multidex:multidex:2.0.1'
implementation
'androidx.multidex:multidex:2.0.1'
implementation
'androidx.core:core-ktx:1.
1.0
'
implementation
'androidx.core:core-ktx:1.
2.0-rc01
'
// DO NOT UPDATE, 1.2.x has bunch of things broken in functionality against 1.1.x
// DO NOT UPDATE, 1.2.x has bunch of things broken in functionality against 1.1.x
implementation
'com.google.android.material:material:1.1.0-beta02'
implementation
'com.google.android.material:material:1.1.0-beta02'
}
}
app/src/main/java/com/topjohnwu/magisk/redesign/MainActivity.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign
package
com.topjohnwu.magisk.redesign
import
android.graphics.Insets
import
android.os.Bundle
import
android.os.Bundle
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.View
import
android.view.View
import
android.view.ViewTreeObserver
import
android.view.ViewTreeObserver
import
androidx.coordinatorlayout.widget.CoordinatorLayout
import
androidx.coordinatorlayout.widget.CoordinatorLayout
import
androidx.core.graphics.Insets
import
androidx.core.view.setPadding
import
androidx.core.view.setPadding
import
androidx.core.view.updateLayoutParams
import
androidx.core.view.updateLayoutParams
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.Fragment
...
@@ -155,4 +155,4 @@ open class MainActivity : CompatActivity<MainViewModel, ActivityMainMd2Binding>(
...
@@ -155,4 +155,4 @@ open class MainActivity : CompatActivity<MainViewModel, ActivityMainMd2Binding>(
binding
.
mainToolbar
.
invalidate
()
binding
.
mainToolbar
.
invalidate
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatDelegate.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.compat
package
com.topjohnwu.magisk.redesign.compat
import
android.graphics.Insets
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
import
androidx.core.view.ViewCompat
import
androidx.core.view.ViewCompat
import
androidx.core.view.WindowInsetsCompat
import
androidx.core.view.WindowInsetsCompat
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.Fragment
...
...
app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatView.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.compat
package
com.topjohnwu.magisk.redesign.compat
import
android.graphics.Insets
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
internal
interface
CompatView
<
ViewModel
:
CompatViewModel
>
{
internal
interface
CompatView
<
ViewModel
:
CompatViewModel
>
{
...
@@ -12,4 +12,4 @@ internal interface CompatView<ViewModel : CompatViewModel> {
...
@@ -12,4 +12,4 @@ internal interface CompatView<ViewModel : CompatViewModel> {
fun
peekSystemWindowInsets
(
insets
:
Insets
)
=
Unit
fun
peekSystemWindowInsets
(
insets
:
Insets
)
=
Unit
fun
consumeSystemWindowInsets
(
insets
:
Insets
):
Insets
?
=
null
fun
consumeSystemWindowInsets
(
insets
:
Insets
):
Insets
?
=
null
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatViewModel.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.compat
package
com.topjohnwu.magisk.redesign.compat
import
android.graphics.Insets
import
androidx.annotation.CallSuper
import
androidx.annotation.CallSuper
import
androidx.core.graphics.Insets
import
androidx.databinding.Observable
import
androidx.databinding.Observable
import
com.topjohnwu.magisk.base.viewmodel.BaseViewModel
import
com.topjohnwu.magisk.base.viewmodel.BaseViewModel
import
com.topjohnwu.magisk.utils.KObservableField
import
com.topjohnwu.magisk.utils.KObservableField
...
@@ -42,4 +42,4 @@ abstract class CompatViewModel(
...
@@ -42,4 +42,4 @@ abstract class CompatViewModel(
super
.
onCleared
()
super
.
onCleared
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.hide
package
com.topjohnwu.magisk.redesign.hide
import
android.content.Context
import
android.content.Context
import
android.graphics.Insets
import
android.os.Bundle
import
android.os.Bundle
import
android.view.Menu
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
...
@@ -83,4 +83,4 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
...
@@ -83,4 +83,4 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
return
super
.
onOptionsItemSelected
(
item
)
return
super
.
onOptionsItemSelected
(
item
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/home/HomeFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.home
package
com.topjohnwu.magisk.redesign.home
import
android.graphics.Insets
import
android.view.Menu
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.MenuItem
import
androidx.core.graphics.Insets
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentHomeMd2Binding
import
com.topjohnwu.magisk.model.navigation.Navigation
import
com.topjohnwu.magisk.model.navigation.Navigation
...
@@ -32,4 +32,4 @@ class HomeFragment : CompatFragment<HomeViewModel, FragmentHomeMd2Binding>() {
...
@@ -32,4 +32,4 @@ class HomeFragment : CompatFragment<HomeViewModel, FragmentHomeMd2Binding>() {
else
->
null
else
->
null
}
?.
let
{
true
}
?:
super
.
onOptionsItemSelected
(
item
)
}
?.
let
{
true
}
?:
super
.
onOptionsItemSelected
(
item
)
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/install/InstallFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.install
package
com.topjohnwu.magisk.redesign.install
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Insets
import
android
x.core
.graphics.Insets
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentInstallMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentInstallMd2Binding
import
com.topjohnwu.magisk.model.events.RequestFileEvent
import
com.topjohnwu.magisk.model.events.RequestFileEvent
...
@@ -25,4 +25,4 @@ class InstallFragment : CompatFragment<InstallViewModel, FragmentInstallMd2Bindi
...
@@ -25,4 +25,4 @@ class InstallFragment : CompatFragment<InstallViewModel, FragmentInstallMd2Bindi
requireActivity
().
setTitle
(
R
.
string
.
install
)
requireActivity
().
setTitle
(
R
.
string
.
install
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/log/LogFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.log
package
com.topjohnwu.magisk.redesign.log
import
android.graphics.Insets
import
android.os.Bundle
import
android.os.Bundle
import
android.view.Menu
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentLogMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentLogMd2Binding
...
@@ -73,4 +73,4 @@ class LogFragment : CompatFragment<LogViewModel, FragmentLogMd2Binding>() {
...
@@ -73,4 +73,4 @@ class LogFragment : CompatFragment<LogViewModel, FragmentLogMd2Binding>() {
return
super
.
onBackPressed
()
return
super
.
onBackPressed
()
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.module
package
com.topjohnwu.magisk.redesign.module
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Insets
import
android.os.Bundle
import
android.os.Bundle
import
android.view.Menu
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
import
androidx.core.view.isVisible
import
androidx.core.view.isVisible
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.StaggeredGridLayoutManager
import
androidx.recyclerview.widget.StaggeredGridLayoutManager
...
@@ -140,4 +140,4 @@ class ModuleFragment : CompatFragment<ModuleViewModel, FragmentModuleMd2Binding>
...
@@ -140,4 +140,4 @@ class ModuleFragment : CompatFragment<ModuleViewModel, FragmentModuleMd2Binding>
listeners
.
add
(
listener
)
listeners
.
add
(
listener
)
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/settings/SettingsFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.settings
package
com.topjohnwu.magisk.redesign.settings
import
android.graphics.Insets
import
android.os.Bundle
import
android.os.Bundle
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentSettingsMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentSettingsMd2Binding
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
...
@@ -37,4 +37,4 @@ class SettingsFragment : CompatFragment<SettingsViewModel, FragmentSettingsMd2Bi
...
@@ -37,4 +37,4 @@ class SettingsFragment : CompatFragment<SettingsViewModel, FragmentSettingsMd2Bi
viewModel
.
items
.
forEach
{
it
.
refresh
()
}
viewModel
.
items
.
forEach
{
it
.
refresh
()
}
}
}
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/superuser/SuperuserFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.superuser
package
com.topjohnwu.magisk.redesign.superuser
import
android.graphics.Insets
import
android.os.Bundle
import
android.os.Bundle
import
android.view.Menu
import
android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.MenuItem
import
android.view.View
import
android.view.View
import
androidx.core.graphics.Insets
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentSuperuserMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentSuperuserMd2Binding
import
com.topjohnwu.magisk.model.navigation.Navigation
import
com.topjohnwu.magisk.model.navigation.Navigation
...
@@ -45,4 +45,4 @@ class SuperuserFragment : CompatFragment<SuperuserViewModel, FragmentSuperuserMd
...
@@ -45,4 +45,4 @@ class SuperuserFragment : CompatFragment<SuperuserViewModel, FragmentSuperuserMd
else
->
null
else
->
null
}
?.
let
{
true
}
?:
super
.
onOptionsItemSelected
(
item
)
}
?.
let
{
true
}
?:
super
.
onOptionsItemSelected
(
item
)
}
}
\ No newline at end of file
app/src/main/java/com/topjohnwu/magisk/redesign/theme/ThemeFragment.kt
View file @
e04f9439
package
com.topjohnwu.magisk.redesign.theme
package
com.topjohnwu.magisk.redesign.theme
import
android.graphics.Insets
import
android
x.core
.graphics.Insets
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentThemeMd2Binding
import
com.topjohnwu.magisk.databinding.FragmentThemeMd2Binding
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
import
com.topjohnwu.magisk.redesign.compat.CompatFragment
...
@@ -19,4 +19,4 @@ class ThemeFragment : CompatFragment<ThemeViewModel, FragmentThemeMd2Binding>()
...
@@ -19,4 +19,4 @@ class ThemeFragment : CompatFragment<ThemeViewModel, FragmentThemeMd2Binding>()
activity
.
title
=
getString
(
R
.
string
.
section_theme
)
activity
.
title
=
getString
(
R
.
string
.
section_theme
)
}
}
}
}
\ 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