Snap for 8468820 from 467b85d088 to tm-release

Change-Id: Ic7cf4d2da171ee54dcfd3e5ad8bcbb776fbbc30f
This commit is contained in:
Android Build Coastguard Worker
2022-04-19 01:16:24 +00:00
12 changed files with 40 additions and 46 deletions

View File

@@ -3319,6 +3319,22 @@
android:value="@string/menu_key_notifications"/> android:value="@string/menu_key_notifications"/>
</activity> </activity>
<!-- Application-level notification settings page, same as above but only accessible
internally from system server -->
<activity android:name="Settings$NotificationReviewPermissionsActivity"
android:label="@string/app_notifications_title"
android:icon="@drawable/ic_notifications"
android:exported="false">
<intent-filter android:priority="1">
<action android:name="android.settings.ALL_APPS_NOTIFICATION_SETTINGS_FOR_REVIEW" />
<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.ManageApplications" />
<meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
android:value="@string/menu_key_notifications"/>
</activity>
<!-- Show application-level notification settings (app passed in as extras) --> <!-- Show application-level notification settings (app passed in as extras) -->
<activity android:name="Settings$AppNotificationSettingsActivity" <activity android:name="Settings$AppNotificationSettingsActivity"
android:exported="true"> android:exported="true">

View File

@@ -26,5 +26,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:theme="@style/Widget.PopupWindow.Settings"/> android:theme="@style/Widget.PopupWindow.Settings"/>
</FrameLayout> </FrameLayout>

View File

@@ -13770,12 +13770,6 @@
<!-- Title for if toggle access is disabled by carrier [CHAR LIMIT=NONE] --> <!-- Title for if toggle access is disabled by carrier [CHAR LIMIT=NONE] -->
<string name="enable_2g_summary_disabled_carrier"><xliff:g id="carrier_name_2g" example="Google Fi">%1$s</xliff:g> requires 2G to be available</string> <string name="enable_2g_summary_disabled_carrier"><xliff:g id="carrier_name_2g" example="Google Fi">%1$s</xliff:g> requires 2G to be available</string>
<!-- Label for extra app info settings for a specific app [CHAR LIMIT=40] -->
<string name="extra_app_info_label" translatable="false"></string>
<!-- Summary for extra app info settings for a specific app [CHAR LIMIT=40] -->
<string name="extra_app_info_summary" translatable="false"></string>
<!-- Label for All Services preference in App info settings [CHAR LIMIT=40] --> <!-- Label for All Services preference in App info settings [CHAR LIMIT=40] -->
<string name="app_info_all_services_label">All Services</string> <string name="app_info_all_services_label">All Services</string>

View File

@@ -77,12 +77,6 @@
android:summary="@string/summary_placeholder" android:summary="@string/summary_placeholder"
settings:controller="com.android.settings.applications.appinfo.AppDataUsagePreferenceController" /> settings:controller="com.android.settings.applications.appinfo.AppDataUsagePreferenceController" />
<Preference
android:key="extra_app_info_settings"
android:title="@string/extra_app_info_label"
android:summary="@string/extra_app_info_summary"
settings:controller="com.android.settings.applications.appinfo.ExtraAppInfoPreferenceController" />
<Preference <Preference
android:key="time_spent_in_app" android:key="time_spent_in_app"
android:title="@string/time_spent_in_app_pref_title" android:title="@string/time_spent_in_app_pref_title"

View File

@@ -49,7 +49,7 @@
<PreferenceCategory <PreferenceCategory
android:key="previously_connected_devices" android:key="previously_connected_devices"
android:title="@string/connected_device_previously_connected_title" android:title="@string/connected_device_saved_title"
settings:controller="com.android.settings.connecteddevice.PreviouslyConnectedDevicePreferenceController"> settings:controller="com.android.settings.connecteddevice.PreviouslyConnectedDevicePreferenceController">
<Preference <Preference

View File

@@ -17,7 +17,7 @@
<PreferenceScreen <PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto" xmlns:settings="http://schemas.android.com/apk/res-auto"
android:title="@string/connected_device_previously_connected_screen_title"> android:title="@string/connected_device_saved_title">
<PreferenceCategory <PreferenceCategory
android:key="saved_device_list" android:key="saved_device_list"

View File

@@ -295,6 +295,7 @@ public class Settings extends SettingsActivity {
public static class AppBubbleNotificationSettingsActivity extends SettingsActivity { /* empty */ } public static class AppBubbleNotificationSettingsActivity extends SettingsActivity { /* empty */ }
public static class NotificationAssistantSettingsActivity extends SettingsActivity{ /* empty */ } public static class NotificationAssistantSettingsActivity extends SettingsActivity{ /* empty */ }
public static class NotificationAppListActivity extends SettingsActivity { /* empty */ } public static class NotificationAppListActivity extends SettingsActivity { /* empty */ }
public static class NotificationReviewPermissionsActivity extends SettingsActivity { /* empty */ }
public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ } public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ }
public static class ChannelNotificationSettingsActivity extends SettingsActivity { /* empty */ } public static class ChannelNotificationSettingsActivity extends SettingsActivity { /* empty */ }
public static class ChannelGroupNotificationSettingsActivity extends SettingsActivity { /* empty */ } public static class ChannelGroupNotificationSettingsActivity extends SettingsActivity { /* empty */ }

View File

@@ -319,12 +319,21 @@ public class ManageApplications extends InstrumentedFragment
mListType = LIST_TYPE_MEDIA_MANAGEMENT_APPS; mListType = LIST_TYPE_MEDIA_MANAGEMENT_APPS;
} else if (className.equals(Settings.AlarmsAndRemindersActivity.class.getName())) { } else if (className.equals(Settings.AlarmsAndRemindersActivity.class.getName())) {
mListType = LIST_TYPE_ALARMS_AND_REMINDERS; mListType = LIST_TYPE_ALARMS_AND_REMINDERS;
} else if (className.equals(Settings.NotificationAppListActivity.class.getName())) { } else if (className.equals(Settings.NotificationAppListActivity.class.getName())
|| className.equals(
Settings.NotificationReviewPermissionsActivity.class.getName())) {
mListType = LIST_TYPE_NOTIFICATION; mListType = LIST_TYPE_NOTIFICATION;
mUsageStatsManager = IUsageStatsManager.Stub.asInterface( mUsageStatsManager = IUsageStatsManager.Stub.asInterface(
ServiceManager.getService(Context.USAGE_STATS_SERVICE)); ServiceManager.getService(Context.USAGE_STATS_SERVICE));
mNotificationBackend = new NotificationBackend(); mNotificationBackend = new NotificationBackend();
mSortOrder = R.id.sort_order_recent_notification; mSortOrder = R.id.sort_order_recent_notification;
if (className.equals(Settings.NotificationReviewPermissionsActivity.class.getName())) {
// Special-case for a case where a user is directed to the all apps notification
// preferences page via a notification prompt to review permissions settings.
android.provider.Settings.Secure.putInt(getContext().getContentResolver(),
android.provider.Settings.Secure.REVIEW_PERMISSIONS_NOTIFICATION_STATE,
1); // USER_INTERACTED
}
} else if (className.equals(AppLocaleDetails.class.getName())) { } else if (className.equals(AppLocaleDetails.class.getName())) {
mListType = LIST_TYPE_APPS_LOCALE; mListType = LIST_TYPE_APPS_LOCALE;
} else { } else {
@@ -915,7 +924,9 @@ public class ManageApplications extends InstrumentedFragment
screenTitle = R.string.media_management_apps_title; screenTitle = R.string.media_management_apps_title;
} else if (className.equals(Settings.AlarmsAndRemindersActivity.class.getName())) { } else if (className.equals(Settings.AlarmsAndRemindersActivity.class.getName())) {
screenTitle = R.string.alarms_and_reminders_title; screenTitle = R.string.alarms_and_reminders_title;
} else if (className.equals(Settings.NotificationAppListActivity.class.getName())) { } else if (className.equals(Settings.NotificationAppListActivity.class.getName())
|| className.equals(
Settings.NotificationReviewPermissionsActivity.class.getName())) {
screenTitle = R.string.app_notifications_title; screenTitle = R.string.app_notifications_title;
} else if (className.equals(AppLocaleDetails.class.getName())) { } else if (className.equals(AppLocaleDetails.class.getName())) {
screenTitle = R.string.app_locales_picker_menu_title; screenTitle = R.string.app_locales_picker_menu_title;

View File

@@ -18,14 +18,7 @@ package com.android.settings.fuelgauge;
import android.content.ComponentName; import android.content.ComponentName;
/** /** Feature provider for battery settings usage. */
* Feature provider for battery settings usage.
*/
public interface BatterySettingsFeatureProvider { public interface BatterySettingsFeatureProvider {
/**
* Get replacement activity for a given activity or fragment path.
*/
ComponentName getReplacingActivity(ComponentName originalActivity);
} }

View File

@@ -16,12 +16,9 @@
package com.android.settings.fuelgauge; package com.android.settings.fuelgauge;
import android.content.ComponentName;
import android.content.Context; import android.content.Context;
/** /** Feature provider implementation for battery settings usage. */
* Feature provider implementation for battery settings usage.
*/
public class BatterySettingsFeatureProviderImpl implements BatterySettingsFeatureProvider { public class BatterySettingsFeatureProviderImpl implements BatterySettingsFeatureProvider {
protected Context mContext; protected Context mContext;
@@ -29,9 +26,4 @@ public class BatterySettingsFeatureProviderImpl implements BatterySettingsFeatur
public BatterySettingsFeatureProviderImpl(Context context) { public BatterySettingsFeatureProviderImpl(Context context) {
mContext = context.getApplicationContext(); mContext = context.getApplicationContext();
} }
@Override
public ComponentName getReplacingActivity(ComponentName originalActivity) {
return originalActivity;
}
} }

View File

@@ -28,7 +28,6 @@ import androidx.preference.PreferenceCategory;
import androidx.preference.PreferenceScreen; import androidx.preference.PreferenceScreen;
import com.android.settings.R; import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
import com.android.settings.dashboard.DashboardFragment; import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.profileselector.ProfileSelectFragment; import com.android.settings.dashboard.profileselector.ProfileSelectFragment;
import com.android.settingslib.applications.RecentAppOpsAccess; import com.android.settingslib.applications.RecentAppOpsAccess;
@@ -41,8 +40,7 @@ import java.util.List;
/** /**
* Preference controller that handles the display of apps that access locations. * Preference controller that handles the display of apps that access locations.
*/ */
public class RecentLocationAccessPreferenceController extends LocationBasePreferenceController public class RecentLocationAccessPreferenceController extends LocationBasePreferenceController {
implements BasePreferenceController.UiBlocker {
public static final int MAX_APPS = 3; public static final int MAX_APPS = 3;
@VisibleForTesting @VisibleForTesting
RecentAppOpsAccess mRecentLocationApps; RecentAppOpsAccess mRecentLocationApps;
@@ -131,16 +129,12 @@ public class RecentLocationAccessPreferenceController extends LocationBasePrefer
banner.setSelectable(false); banner.setSelectable(false);
mCategoryRecentLocationRequests.addPreference(banner); mCategoryRecentLocationRequests.addPreference(banner);
} }
if (mUiBlockListener != null) {
mUiBlockListener.onBlockerWorkFinished(this);
}
} }
@Override @Override
public void onLocationModeChanged(int mode, boolean restricted) { public void onLocationModeChanged(int mode, boolean restricted) {
boolean enabled = mLocationEnabler.isEnabled(mode); boolean enabled = mLocationEnabler.isEnabled(mode);
updatePreferenceVisibilityDelegate(mCategoryRecentLocationRequests, enabled); mCategoryRecentLocationRequests.setVisible(enabled);
} }
/** /**

View File

@@ -20,13 +20,11 @@ import android.content.Context;
import androidx.preference.Preference; import androidx.preference.Preference;
import androidx.preference.PreferenceScreen; import androidx.preference.PreferenceScreen;
import com.android.settings.core.BasePreferenceController;
/** /**
* Preference controller that handles the "See All" button for recent location access. * Preference controller that handles the "See All" button for recent location access.
*/ */
public class RecentLocationAccessSeeAllButtonPreferenceController extends public class RecentLocationAccessSeeAllButtonPreferenceController extends
LocationBasePreferenceController implements BasePreferenceController.UiBlocker { LocationBasePreferenceController {
private Preference mPreference; private Preference mPreference;
@@ -46,6 +44,6 @@ public class RecentLocationAccessSeeAllButtonPreferenceController extends
@Override @Override
public void onLocationModeChanged(int mode, boolean restricted) { public void onLocationModeChanged(int mode, boolean restricted) {
boolean enabled = mLocationEnabler.isEnabled(mode); boolean enabled = mLocationEnabler.isEnabled(mode);
updatePreferenceVisibilityDelegate(mPreference, enabled); mPreference.setVisible(enabled);
} }
} }