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

Commit 57d92315 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Adding Manage External Sources Settings

Added a settings fragment to manage external sources. It lists all
applications that have either requested REQUEST_INSTALL_PACKAGES or have
their app op changed from default.

Test: Will include in follow-up CL. Tracked in b/33792674

Bug: 31002700
Change-Id: Ibd2a1922be214b62aec4eefa45f7b9691256b205
parent 27cb8b4a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2905,6 +2905,17 @@
                android:value="com.android.settings.applications.ManageApplications" />
        </activity>

        <activity android:name="Settings$ManageExternalSourcesActivity"
                android:label="@string/install_other_apps"
                android:taskAffinity="">
            <intent-filter android:priority="1">
                <action android:name="android.settings.action.MANAGE_EXTERNAL_SOURCES" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.applications.ManageApplications" />
        </activity>

        <activity android:name="Settings$AppWriteSettingsActivity"
                android:label="@string/write_settings_title"
                android:taskAffinity="">
+14 −0
Original line number Diff line number Diff line
@@ -7224,6 +7224,12 @@
    <!-- Summary of app not allowed to draw overlay [CHAR LIMIT=60] -->
    <string name="system_alert_window_off">No</string>
    <!-- Title for settings screen for controlling apps that can install other apps on device [CHAR LIMIT=30] -->
    <string name="install_other_apps">Install other apps</string>
    <!-- Keywords for setting screen for controlling apps that can install other apps on device -->
    <string name="keywords_install_other_apps">install apps external unknown sources</string>
    <!-- Label for setting which controls whether app is trusted to install apps on the device [CHAR LIMIT=45] -->
    <string name="permit_install_other_apps">Allows to install other apps</string>
    <!-- Write Settings settings -->
    <!-- Settings title in main settings screen for WRITE_SETTINGS [CHAR LIMIT=30] -->
@@ -7233,6 +7239,8 @@
    <!-- Summary of number of apps currently can draw overlays [CHAR LIMIT=60] -->
    <string name="write_settings_summary"><xliff:g id="count" example="10">%1$d</xliff:g> of <xliff:g id="count" example="10">%2$d</xliff:g> apps allowed to modify system settings</string>
    <!-- Label for showing apps that can install other apps [CHAR LIMIT=45] -->
    <string name="filter_install_sources_apps">Can install other apps</string>
    <!-- Label for showing apps that can write system settings [CHAR LIMIT=45] -->
    <string name="filter_write_settings_apps">Can modify system settings</string>
    <!-- Title for the apps that are allowed to write system settings [CHAR LIMIT=60] -->
@@ -7249,6 +7257,12 @@
    <string name="write_settings_on">Yes</string>
    <!-- Summary of app not allowed to write system settings [CHAR LIMIT=45] -->
    <string name="write_settings_off">No</string>
    <!-- Summary of app trusted to install apps [CHAR LIMIT=45] -->
    <string name="external_source_trusted">Yes</string>
    <!-- Summary of app not trusted to install apps [CHAR LIMIT=45] -->
    <string name="external_source_untrusted">No</string>
    <!-- Title of switch preference that controls whether an external app source is trusted or not [CHAR LIMIT=100] -->
    <string name="external_source_switch_title">Trust apps from this source</string>
    <!-- Title of setting that controls gesture to open camera [CHAR LIMIT=40] -->
    <string name="camera_gesture_title">Double twist for camera</string>
+26 −0
Original line number Diff line number Diff line
<?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">

    <SwitchPreference
        android:key="external_sources_settings_switch" />

    <Preference
        android:key="external_sources_settings_description"
        android:selectable="false" />

</PreferenceScreen>
+11 −0
Original line number Diff line number Diff line
@@ -92,4 +92,15 @@
            android:name="classname"
            android:value="com.android.settings.Settings$UsageAccessSettingsActivity" />
    </Preference>

    <Preference
        android:key="manage_external_sources"
        android:title="@string/install_other_apps"
        android:fragment="com.android.settings.applications.ManageApplications"
        settings:keywords="@string/keywords_install_other_apps">
        <extra
            android:name="classname"
            android:value="com.android.settings.Settings$ManageExternalSourcesActivity" />
    </Preference>

</PreferenceScreen>
+3 −0
Original line number Diff line number Diff line
@@ -138,6 +138,9 @@ public class Settings extends SettingsActivity {
    public static class AppWriteSettingsActivity extends SettingsActivity { /* empty */ }
    public static class AdvancedAppsActivity extends SettingsActivity { /* empty */ }

    public static class ManageExternalSourcesActivity extends SettingsActivity {
        /* empty */ }

    public static class WifiCallingSuggestionActivity extends SettingsActivity { /* empty */ }
    public static class ZenModeAutomationSuggestionActivity extends SettingsActivity { /* empty */ }
    public static class FingerprintSuggestionActivity extends FingerprintSettings { /* empty */ }
Loading