when device didn't support PersistentDataBlockManager, Settings will
crash at get PersistentDataBlock service.
So we need to check if device support PersistentDataBlockManager
before call getService.
Fixes: 196634851
Test: manual verify on aosp build.
Change-Id: I5afba5df8c4831499478490b442c0fcf367d23ae
- Sometimes, listview may not created instantly, so move the action of
addHeaderView after fragment finished the onResume;
Bug: 228563549
Test: local
Change-Id: Ie5d53c962bed35783decd374c743a168a98cbf6a
This will prevent screen readers from saying the button is selected when
the outer container is selected.
Bug: 227717835
Test: locally on device
Change-Id: Ic7b4a36eb3b79ff847909ab6fcbd984eaf93d618
We have CL[1] to fix the NPE when keyboard settings
is launched by work app. CL[1] overlooked the work
profile with multi-user case.
Work profile user ID is not available(return null)
when calling Utils#getManagedProfile by work identity.
For work case, distinguish it's running on managed
profile user(launched by work app) or not. And use
corresponding userId as:
-. If it's a managed profile user, use currentUserId.
-. For a owner user, get managed profile userId.
[1]: Iea573922ee789d9932c0de05bf71179c4f005eeb
Bug: 216395439
Test: Manual test with bugs steps
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: If018d2fddbbcf932927d2235bb8e99393df1e67c
- Filter out unnecessary onSwitchChanged callbacks when the switch is
disabled, which should not be triggered by user input.
- Refine the state handling function to avoid unnecessary
onSwitchChanged callback.
- Refine the error handling of isHotspotPasswordValid function.
Bug: 227719584
Test: manual test
make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiTetherSwitchBarControllerTest
Change-Id: If62aaadc8ddb214769b1367d7801b6125bb5377c
Fix the issue that the screen title name of the app language page is displayed incorrectly
Bug: 227285277
Test: Verify the issue by testing between the system language and app
language page
Change-Id: I5dbb10763bd5cc346bff9c270b14b945eb499273
- Disable Wi-Fi toggle when user is not allowed to change Wi-Fi state.
- Show restriction message in Wi-Fi toggle summary.
- See the result screenshot in b/203168097#comment24
Bug: 203168097
Test: manual test
atest -c WifiSwitchPreferenceControllerTest
Change-Id: I3cfe2f4f0e855dde91a82babe3a03005c3985d59
To improve security.
Bug: 181962311
Test: manual
Show an AlertDialog and observe if it will hide after below command.
adb shell am start -a android.intent.action.PICK_ACTIVITY -n com.android.settings/.ActivityPicker
Change-Id: I800f0f39a469a95eb36eeaaeb2aa60a39fd916d3
Merged-In: I800f0f39a469a95eb36eeaaeb2aa60a39fd916d3
To improve security.
Bug: 181962311
Test: manual
Show an AlertDialog and observe if it will hide after below command.
adb shell am start -a android.intent.action.PICK_ACTIVITY -n com.android.settings/.ActivityPicker
Change-Id: I800f0f39a469a95eb36eeaaeb2aa60a39fd916d3
If the intent's package equals to the app's package, this intent
will be allowed to startActivityForResult.
But this check is unsafe, because if the component of this intent
is set, the package field will just be ignored. So if we set the
component to any activity we like and set package to the app's
package, it will pass the assertSafeToStartCustomActivity check
and now we can launch anywhere.
Bug: 223578534
Test: robotest and manual verify
Change-Id: I40496105bae313fe5cff2a36dfe329c1e2b5bbe4
updateRule() should be called before super.onResume() because rule will
be used in updatePreferenceStates() in super.onResume().
This is follow up of Change: Ief9963091847d58654f26851616563ae910716a5
Bug: 226523115
Test: manual
Change-Id: I2fe0cfb2b4a76273283bb2d3aca629b5d647db91
Set rule to header, switch and action buttons controllers before their
isAvailable() is called in onCreate().
Fix: 228262001
Test: manual
Change-Id: Idc0ea779ab768497a8426ac847c4bbb2c6c4faea
This ensures that we apply the alpha recursively to all views when the
item is disabled/enabled.
Bug: 226573932
Test: locally on device
Change-Id: I28ee1a21227706d01a6e4f6284871bf78af983f5