Show different strings when PO/DO user approves a cert
1. This is confusing for restricted users who don't have any options other than 'Trust'. 2. show dialog title of "Check certificate" instead of "Trust or remove certificate" The change only applies to ProfileOwner and DeviceOwner case Fix: 28875819 Change-Id: I3f7dc8f3dcac75b4d99814cbc9af67433676a8c7
This commit is contained in:
@@ -27,6 +27,8 @@ import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
|
||||
/**
|
||||
* Activity that shows a dialog explaining that a CA cert is allowing someone to monitor network
|
||||
* traffic. This activity should be launched for the user into which the CA cert is installed
|
||||
@@ -46,8 +48,10 @@ public class MonitoringCertInfoActivity extends Activity implements OnClickListe
|
||||
DevicePolicyManager dpm = getSystemService(DevicePolicyManager.class);
|
||||
final int numberOfCertificates = getIntent().getIntExtra(
|
||||
Settings.EXTRA_NUMBER_OF_CERTIFICATES, 1);
|
||||
final CharSequence title = getResources().getQuantityText(
|
||||
R.plurals.ssl_ca_cert_dialog_title, numberOfCertificates);
|
||||
final int titleId = RestrictedLockUtils.getProfileOrDeviceOwner(this, mUserId) != null
|
||||
? R.plurals.ssl_ca_cert_settings_button // Check certificate
|
||||
: R.plurals.ssl_ca_cert_dialog_title; // Trust or remove certificate
|
||||
final CharSequence title = getResources().getQuantityText(titleId, numberOfCertificates);
|
||||
setTitle(title);
|
||||
|
||||
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
|
Reference in New Issue
Block a user