Skip to content
Snippets Groups Projects
Commit 9b6df849 authored by Manjeet Rulhania's avatar Manjeet Rulhania Committed by Android (Google) Code Review
Browse files

Merge "Get safety center service when sending notification" into main

parents b7b10ae8 a6f9f2f9
No related branches found
No related tags found
No related merge requests found
......@@ -174,8 +174,6 @@ public final class SensorPrivacyService extends SystemService {
private CallStateHelper mCallStateHelper;
private KeyguardManager mKeyguardManager;
private SafetyCenterManager mSafetyCenterManager;
private int mCurrentUser = USER_NULL;
public SensorPrivacyService(Context context) {
......@@ -191,7 +189,6 @@ public final class SensorPrivacyService extends SystemService {
mTelephonyManager = context.getSystemService(TelephonyManager.class);
mPackageManagerInternal = getLocalService(PackageManagerInternal.class);
mSensorPrivacyServiceImpl = new SensorPrivacyServiceImpl();
mSafetyCenterManager = mContext.getSystemService(SafetyCenterManager.class);
}
@Override
......@@ -656,7 +653,9 @@ public final class SensorPrivacyService extends SystemService {
String contentTitle = getUiContext().getString(messageRes);
Spanned contentText = Html.fromHtml(getUiContext().getString(
R.string.sensor_privacy_start_use_notification_content_text, packageLabel), 0);
String action = mSafetyCenterManager.isSafetyCenterEnabled()
SafetyCenterManager safetyCenterManager =
mContext.getSystemService(SafetyCenterManager.class);
String action = safetyCenterManager.isSafetyCenterEnabled()
? Settings.ACTION_PRIVACY_CONTROLS : Settings.ACTION_PRIVACY_SETTINGS;
PendingIntent contentIntent = PendingIntent.getActivity(mContext, sensor,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment