Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0439854b authored by Robin Lee's avatar Robin Lee
Browse files

Fix two common NPEs, remove TV radio widget layout

TV layout:
 - Removed because the code specifically depends on a certain layout
   ID which was not in sync with the handheld layout ID. The custom
   layout wasn't adding any value anyway.

NPE 1 (ManagePermissionsFragment):
 - Using the wrong context in ManagePermissionsFragment. We get the
   right context and explicitly null-check it, but one line in the
   update function was going and getting its own context from
   somewhere else and this could be null.

NPE 2 (FooterPreference):
 - TV currently reuses handheld code. The reason this code runs into
   a NullPointerException on ATV and not mobile currently is that one
   uses a DeviceDefault theme and the other does not.

   Interestingly, the resource ID for the icon_frame ViewGroup is
   different depending on where the theme comes from! This is fixed in
   other classes in PermissionController already.

   See this commit in AndroidX from 2015 for an example (unfortunately
   original bug isn't documented):

   https://android.googlesource.com/platform/frameworks/support/+/3fadd62b614e4a69aefe920aac640bdb629e502e%5E%21/v7/preference/src/android/support/v7/preference/Preference.java

Fix: 160262096
Test: atest AutoRevokeTest # 5 tests, 4 pass, 1 fail (ki)
Test: atest CtsRoleTestCases # 55 tests, 43 pass, 12 skipped
Change-Id: Ia579144f308076804642728dcc1e103f4b645e7b
parent 6cb5fcd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment