Snap for 7795143 from 14a90d0639 to sc-v2-release
Change-Id: I6c0f22c26c0929d2758372bf7baafcfda6bbfabb
This commit is contained in:
@@ -84,9 +84,7 @@
|
||||
<Preference
|
||||
android:key="safety_info"
|
||||
android:order="17"
|
||||
android:title="@string/safety_and_regulatory_info">
|
||||
<intent android:action="android.settings.SHOW_SAFETY_AND_REGULATORY_INFO"/>
|
||||
</Preference>
|
||||
android:title="@string/safety_and_regulatory_info"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
||||
@@ -421,6 +421,11 @@ public class DashboardFeatureProviderImpl implements DashboardFeatureProvider {
|
||||
ProfileSelectDialog.updateUserHandlesIfNeeded(mContext, tile);
|
||||
mMetricsFeatureProvider.logStartedIntent(intent, sourceMetricCategory);
|
||||
|
||||
//TODO(b/201970810): Add test cases.
|
||||
if (tile.isNewTask(mContext)) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
|
||||
if (tile.userHandle == null || tile.isPrimaryProfileOnly()) {
|
||||
activity.startActivity(intent);
|
||||
} else if (tile.userHandle.size() == 1) {
|
||||
|
||||
@@ -18,6 +18,9 @@ package com.android.settings.deviceinfo;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
@@ -44,4 +47,16 @@ public class SafetyInfoPreferenceController extends AbstractPreferenceController
|
||||
public String getPreferenceKey() {
|
||||
return "safety_info";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handlePreferenceTreeClick(Preference preference) {
|
||||
if (!TextUtils.equals(preference.getKey(), getPreferenceKey())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final Intent intent = new Intent(INTENT_PROBE);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
mContext.startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user