When the user restriction DISALLOW_INSTALL_UNKNOWN_SOURCES is set, changing the preferences in settings is meaningless as package installer will not let the install proceed. Disabling the settings switch and updated the summaries to reflect when a switch is disabled. Removing robolectric test as the logic is no longer testable due to missing stubs for UserManager and UserHandle. Test: CtsVerifier -> Device Owner Tests -> Policy Transparency Test Bug: 34688413 Change-Id: I7cf6cc09a5d29721186a0df9405d3c7e486295ee Merged-In: I7cf6cc09a5d29721186a0df9405d3c7e486295ee
31 lines
1.2 KiB
XML
31 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2017 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
|
android:title="@string/install_other_apps">
|
|
|
|
<com.android.settingslib.RestrictedSwitchPreference
|
|
android:key="external_sources_settings_switch"
|
|
android:title="@string/external_source_switch_title" />
|
|
|
|
<Preference
|
|
android:key="external_sources_settings_description"
|
|
android:summary="@string/install_all_warning"
|
|
android:selectable="false" />
|
|
|
|
</PreferenceScreen>
|