Redirect Default Application settings to PermissionController
Bug: 130348508
Test: manual
Change-Id: Ic3e5935e2e9436c5b06a76680e07534ffb98385a
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 24a2bfd..0d17287 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -175,11 +175,6 @@
</intent-filter>
<intent-filter android:priority="100">
- <action android:name="android.settings.MANAGE_DEFAULT_APPS_SETTINGS" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
-
- <intent-filter android:priority="100">
<action android:name="android.settings.INTERNAL_STORAGE_SETTINGS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
diff --git a/res/xml/apps_and_notifications_fragment.xml b/res/xml/apps_and_notifications_fragment.xml
index 5314a41..40188a0 100644
--- a/res/xml/apps_and_notifications_fragment.xml
+++ b/res/xml/apps_and_notifications_fragment.xml
@@ -25,10 +25,11 @@
android:title="@string/all_applications"
settings:controller="com.android.car.settings.common.DefaultRestrictionsPreferenceController"/>
<Preference
- android:fragment="com.android.car.settings.applications.DefaultApplicationsSettingsFragment"
android:key="@string/pk_default_applications_settings_entry"
android:title="@string/default_applications"
- settings:controller="com.android.car.settings.common.DefaultRestrictionsPreferenceController"/>
+ settings:controller="com.android.car.settings.common.DefaultRestrictionsPreferenceController">
+ <intent android:action="android.settings.MANAGE_DEFAULT_APPS_SETTINGS"/>
+ </Preference>
<Preference
android:key="@string/pk_app_permissions_entry"
android:title="@string/app_permissions"
diff --git a/res/xml/default_applications_settings_fragment.xml b/res/xml/default_applications_settings_fragment.xml
deleted file mode 100644
index d713dff..0000000
--- a/res/xml/default_applications_settings_fragment.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright 2019 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-auto"
- android:title="@string/default_applications">
- <com.android.car.settings.common.ButtonPreference
- android:fragment="com.android.car.settings.applications.defaultapps.DefaultAssistantPickerFragment"
- android:key="@string/pk_default_assist_and_voice"
- android:title="@string/assist_and_voice_input_settings"
- android:widgetLayout="@layout/details_preference_widget"
- settings:controller="com.android.car.settings.applications.defaultapps.DefaultAssistantPickerEntryPreferenceController"
- settings:iconSpaceReserved="true"/>
-</PreferenceScreen>
diff --git a/src/com/android/car/settings/applications/DefaultApplicationsSettingsFragment.java b/src/com/android/car/settings/applications/DefaultApplicationsSettingsFragment.java
deleted file mode 100644
index 3b7eb58..0000000
--- a/src/com/android/car/settings/applications/DefaultApplicationsSettingsFragment.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-package com.android.car.settings.applications;
-
-import androidx.annotation.XmlRes;
-
-import com.android.car.settings.R;
-import com.android.car.settings.common.SettingsFragment;
-
-/** Shows the default applications settings. */
-public class DefaultApplicationsSettingsFragment extends SettingsFragment {
-
- @Override
- @XmlRes
- protected int getPreferenceScreenResId() {
- return R.xml.default_applications_settings_fragment;
- }
-}
diff --git a/src/com/android/car/settings/common/FragmentResolver.java b/src/com/android/car/settings/common/FragmentResolver.java
index 13a31af..bf0aa3d 100644
--- a/src/com/android/car/settings/common/FragmentResolver.java
+++ b/src/com/android/car/settings/common/FragmentResolver.java
@@ -28,7 +28,6 @@
import com.android.car.settings.accounts.ChooseAccountFragment;
import com.android.car.settings.applications.ApplicationDetailsFragment;
import com.android.car.settings.applications.ApplicationsSettingsFragment;
-import com.android.car.settings.applications.DefaultApplicationsSettingsFragment;
import com.android.car.settings.applications.assist.ManageAssistFragment;
import com.android.car.settings.applications.defaultapps.DefaultAutofillPickerFragment;
import com.android.car.settings.bluetooth.BluetoothSettingsFragment;
@@ -76,9 +75,6 @@
case Settings.ACTION_SETTINGS:
return new HomepageFragment();
- case Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS:
- return new DefaultApplicationsSettingsFragment();
-
case Settings.ACTION_INTERNAL_STORAGE_SETTINGS:
return new StorageSettingsFragment();