Commit Graph

317 Commits

Author SHA1 Message Date
topjohnwu ccde8b73a2 Cleanup install screen layout 2020-08-24 00:19:08 -07:00
topjohnwu 1fcf35ebeb Do not hardcode appcompat widget classes
They should be handled by the theme
2020-08-19 05:19:24 -07:00
topjohnwu 34450cdddd More refactoring
Cleanups, move classes to sane locations, etc.
2020-08-19 02:05:23 -07:00
Viktor De Pasquale 79aa261ca2 Fixed manager beginning to hide immediately on field change
Bug was caused by lenient usage of "value" property defined in the "line item" in settings. Developer error allowed to use the internal value, that was not properly protected, in a way that did not conform with the latest "Observer" rewrite.

Additional comments were added to hopefully prevent bugs of this kind in the future. The property is now properly protected so it gives away clues that this access is considered "not cool".
2020-08-14 02:23:03 -07:00
topjohnwu ac2a9da4c4 Fix Markdown rendering
Close #3074
2020-08-14 02:00:06 -07:00
topjohnwu feb0f4b7b5 Fix MagiskDialog 2020-08-12 03:33:19 -07:00
topjohnwu 537ae1a315 Cleanup setting items 2020-08-11 03:30:00 -07:00
topjohnwu 87b6bf2c26 Remove strip in settings item 2020-08-11 00:54:19 -07:00
topjohnwu 9df6b0618a Update MagiskHide list 2020-08-10 07:05:07 -07:00
topjohnwu c7e30ac63e Update superuser list 2020-08-10 02:33:44 -07:00
topjohnwu f5e547944a Do not toggle when clicking cards 2020-08-09 22:30:38 -07:00
topjohnwu d10680187d Nest CardView with alpha in another FrameLayout
RecyclerView animator will mess with alpha when animating
Check this StackOverflow question for more info:
https://stackoverflow.com/questions/40942116/setalpha-on-onbindview-in-recyclerview-doesnt-work-on-first-display
2020-08-09 22:04:09 -07:00
topjohnwu f5aa6a3cf8 Update module fragment
Update UI and logic for loading modules
2020-08-09 21:41:23 -07:00
topjohnwu c944277e78 Use switches with 2 way binding instead of custom ImageView 2020-08-09 14:50:16 -07:00
topjohnwu 2e5402d741 Disable scroll effect for icon links 2020-08-09 13:29:18 -07:00
topjohnwu 24f6024383 More homescreen UI improvements 2020-08-09 06:52:02 -07:00
topjohnwu 15b1215972 Only show SafetyNet when GMS exists 2020-08-09 04:39:12 -07:00
topjohnwu 893a8ec8d9 Strip out most StaggeredGridLayoutManager in code 2020-08-09 03:30:00 -07:00
topjohnwu da2b00de59 Several home screen changes 2020-08-09 02:32:13 -07:00
topjohnwu 4c2570628d Make SettingsItems make much more sense 2020-07-17 03:02:58 -07:00
topjohnwu 2c12fe6eb2 More efficient databinding 2020-07-12 03:17:50 -07:00
topjohnwu 6348d0a6fb Remove more code using RxJava 2020-07-10 04:19:18 -07:00
topjohnwu 89e11c9cc8 Minor changes in flash viewmodel 2020-07-06 21:05:43 -07:00
topjohnwu 0f7caa66fb Remove usage of grid layouts 2020-07-04 03:28:21 -07:00
topjohnwu 706eba329d Add release notes to the install fragment 2020-07-04 02:55:19 -07:00
topjohnwu 73203a55ca Use fancy NestedScrollView for Magisk logs 2020-06-30 04:14:23 -07:00
topjohnwu 397f7326a3 Update SafetyNet UI to show evalType 2020-06-30 03:56:41 -07:00
topjohnwu a0b47f3ca3 Precompute TextView in I/O thread for performance 2020-06-29 05:26:07 -07:00
topjohnwu 89e9e7c176 Simplify UI code for Magisk logs
We have all texts, no need to go through recyclerview
2020-06-29 05:22:16 -07:00
Viktor De Pasquale 4bcc2b2f03 Added bottom padding to hide screen
Close #2903
2020-06-25 10:01:37 -07:00
topjohnwu 23a33b4351 Remove core only mode
Replaced by native safe mode
2020-06-21 15:59:06 -07:00
topjohnwu 43146b8316 Update su request process
Due to changes in ec3705f2ed, the app can
no longer communicate with the dameon through a socket opened on the
daemon side due to SELinux restrictions. The workaround here is to have
the daemon decide a socket name, send it to the app, have the app create
the socket server, then finally the daemon connects to the app through
the socket.
2020-06-19 03:52:25 -07:00
topjohnwu b71b4bd4e5 Fix colors in su request dialog 2020-06-19 03:14:23 -07:00
Viktor De Pasquale d810e6c82d Fixed modules screen crashing on load
This commit fixes the issue of adding single-span items in between full-span items whilst using `StaggeredGridLayoutManager` on recycler view.

Adding such items results in:
```
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 13
	at java.util.Arrays.rangeCheck(Arrays.java:123)
	at java.util.Arrays.fill(Arrays.java:2828)
	at androidx.recyclerview.widget.StaggeredGridLayoutManager$LazySpanLookup.invalidateAfter(StaggeredGridLayoutManager.java:2876)
	at androidx.recyclerview.widget.StaggeredGridLayoutManager.handleUpdate(StaggeredGridLayoutManager.java:1548)
	at androidx.recyclerview.widget.StaggeredGridLayoutManager.onItemsUpdated(StaggeredGridLayoutManager.java:1524)
	at androidx.recyclerview.widget.RecyclerView$6.dispatchUpdate(RecyclerView.java:1021)
	at androidx.recyclerview.widget.RecyclerView$6.onDispatchSecondPass(RecyclerView.java:1032)
	at androidx.recyclerview.widget.AdapterHelper.consumePostponedUpdates(AdapterHelper.java:121)
	at androidx.recyclerview.widget.AdapterHelper.consumeUpdatesInOnePass(AdapterHelper.java:557)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4128)
	at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
	at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
	...and more
```

Affects versions including and prior to androidx.recyclerview:recyclerview:1.2.0-alpha02 (at the time of this commit) and possibly more after that.

This bug is caused by a single fact and that is - array inside of `LazySpanLookup` is not being invalidated and resized correctly when non-full-span item is being added in between of two full-span items. The invalidation however passes on some (high performance) devices so it doesn't necessarily cause issues for _some_ users; others keep getting the same crash over and over again.

Possible fix for anyone reading this, in the hope of fixing the same error, is to copy-paste the `StaggeredGridLayoutManager` and fix the array length before calling `Arrays.fill()`. There's no fix from user's perspective if you need to keep the UI as-is.
We however don't need the UI as-is, so we're instead opting to use LinearLayoutManager until is the issue resolved.

Continues tracking at https://issuetracker.google.com/issues/37034096

Close #2631
2020-04-12 05:40:19 -07:00
topjohnwu 5537b083a8 Move surequest out of legacy 2020-03-30 23:53:21 -07:00
Viktor De Pasquale 6b0854749f Added setting resetting state on install screen
It will additionally show that download is complete rather than being stuck on loading.
2020-03-30 21:58:26 -07:00
Viktor De Pasquale 1920a52829 Added progressbar indicating content loading on modules screen 2020-03-29 06:10:19 -07:00
Viktor De Pasquale 6907651756 Updated flash screen so it's a fragment
The FlashActivity has been removed and all of it's functionality has been transferred to the FlashFragment.
The FlashFragment needs to be however launched in a different way than the activity using the MainActivity's stub and so seemingly massive changes had to be made.

Notably the RemoteFileService didn't seem to be calling Service.startForeground(), which has been crashing the application due to the system requirements, so that's been fixed.
2020-03-26 03:42:52 -07:00
Viktor De Pasquale 1b8813228b Updated the app to use navigation components instead of custom solution
Welcome to mid 2018.
2020-03-26 03:42:52 -07:00
Viktor De Pasquale 922e36cfb0 Updated the width of bottom navigation 2020-03-26 03:42:52 -07:00
Viktor De Pasquale edff094626 Added log as primary fragment 2020-03-26 03:42:52 -07:00
Viktor De Pasquale 9f4958e869 Updated safetynet success color to primary 2020-03-12 00:30:00 -07:00
Viktor De Pasquale 409cb06ea0 Fixed layout not reacting to nested scroll on su screen 2020-03-04 23:51:06 -08:00
topjohnwu 915fd3020b Small string resource reorganization
Close #2454
2020-02-29 14:49:06 -08:00
topjohnwu 5c0e86383c Add test button toggle in code 2020-02-28 11:53:25 -08:00
topjohnwu 64f5ff5475 Use global A/B detection 2020-02-28 10:30:53 -08:00
topjohnwu b90e0430f8 Don't do layered cards 2020-02-27 01:43:00 -08:00
Viktor De Pasquale e6464c5c7f Fixed module filter list not respecting single column layout 2020-02-25 15:03:31 -08:00
topjohnwu 8453282fa6 Improve flash console screen 2020-02-16 19:04:26 -08:00
topjohnwu 40f971d18a Add entrypoint for testing
Should do it with proper unit test, but duh
2020-02-15 21:57:03 -08:00