Loading AndroidManifest.xml +0 −13 Original line number Diff line number Diff line Loading @@ -4460,19 +4460,6 @@ </intent-filter> </activity> <activity android:name=".security.ActionDisabledByAdvancedProtectionDialog" android:theme="@style/Theme.AlertDialog" android:taskAffinity="com.android.settings.security" android:excludeFromRecents="true" android:exported="false" android:launchMode="singleTop" android:featureFlag="android.security.aapm_api"> <intent-filter android:priority="1"> <action android:name="android.security.advancedprotection.action.SHOW_ADVANCED_PROTECTION_SUPPORT_DIALOG" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name="Settings$ManageExternalStorageActivity" android:knownActivityEmbeddingCerts="@array/config_known_host_certs" Loading res/values/strings.xml +0 −5 Original line number Diff line number Diff line Loading @@ -10696,11 +10696,6 @@ <string name="admin_financed_message">Your device administrator may be able to access data associated with this device, manage apps, and change this device\’s settings.</string> <!-- Title for dialog displayed when user taps a setting on their phone that's blocked by Advanced Protection. [CHAR LIMIT=50] --> <string name="disabled_by_advanced_protection_title">Prevented by Advanced Protection</string> <!-- Short summary for dialog displayed when user taps a setting on their phone that's blocked by Advanced Protection. [CHAR LIMIT=NONE] --> <string name="disabled_by_advanced_protection_message">This action is not allowed because Advanced Protection is on for your device.</string> <!-- Turn off a conditional state of the device (e.g. airplane mode, or hotspot) [CHAR LIMIT=30] --> <string name="condition_turn_off">Turn off</string> src/com/android/settings/enterprise/ActionDisabledByAdminDialog.java +6 −3 Original line number Diff line number Diff line Loading @@ -109,9 +109,12 @@ public class ActionDisabledByAdminDialog extends Activity } if (enforcingAdmin.getAuthority() instanceof UnknownAuthority authority && ADVANCED_PROTECTION_SYSTEM_ENTITY.equals(authority.getName())) { Intent apmSupportIntent = AdvancedProtectionManager .createSupportIntentForPolicyIdentifierOrRestriction(restriction, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_UNKNOWN); AdvancedProtectionManager apm = getSystemService(AdvancedProtectionManager.class); if (apm == null) { return; } Intent apmSupportIntent = apm.createSupportIntentForPolicyIdentifierOrRestriction( restriction, /* type */ null); startActivityAsUser(apmSupportIntent, UserHandle.of(userId)); finish(); } else { Loading src/com/android/settings/security/ActionDisabledByAdvancedProtectionDialog.ktdeleted 100644 → 0 +0 −59 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.settings.security; import android.app.Activity import android.content.DialogInterface import android.os.Bundle import android.view.View import android.view.ViewGroup import android.widget.TextView import com.android.settings.R import androidx.appcompat.app.AlertDialog; class ActionDisabledByAdvancedProtectionDialog : Activity(), DialogInterface.OnDismissListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val dialogView = layoutInflater.inflate(R.layout.support_details_dialog, null) as ViewGroup val builder = AlertDialog.Builder(this) .setPositiveButton(R.string.okay, null) .setView(dialogView) .setOnDismissListener(this) initializeDialogView(dialogView) builder.show() } override fun onDismiss(dialog: DialogInterface) { finish() } private fun initializeDialogView(dialogView: View) { setSupportTitle(dialogView) setSupportDetails(dialogView) } private fun setSupportTitle(root: View) { val titleView: TextView = root.findViewById(R.id.admin_support_dialog_title) ?: return titleView.setText(R.string.disabled_by_advanced_protection_title) } private fun setSupportDetails(root: View) { val textView: TextView = root.findViewById(R.id.admin_support_msg) textView.setText(R.string.disabled_by_advanced_protection_message) } } src/com/android/settings/wifi/WepNetworksPreferenceController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -162,10 +162,10 @@ class WepNetworksPreferenceController(context: Context, preferenceKey: String) : emit(aapmManager?.isAdvancedProtectionEnabled ?: false) }.flowOn(Dispatchers.Default) private fun startSupportIntent() { AdvancedProtectionManager.createSupportIntent( aapmManager?.createSupportIntent( AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_DISABLED_SETTING ).let { mContext.startActivity(it) } )?.let { mContext.startActivity(it) } } val wepAllowedFlow = Loading Loading
AndroidManifest.xml +0 −13 Original line number Diff line number Diff line Loading @@ -4460,19 +4460,6 @@ </intent-filter> </activity> <activity android:name=".security.ActionDisabledByAdvancedProtectionDialog" android:theme="@style/Theme.AlertDialog" android:taskAffinity="com.android.settings.security" android:excludeFromRecents="true" android:exported="false" android:launchMode="singleTop" android:featureFlag="android.security.aapm_api"> <intent-filter android:priority="1"> <action android:name="android.security.advancedprotection.action.SHOW_ADVANCED_PROTECTION_SUPPORT_DIALOG" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:name="Settings$ManageExternalStorageActivity" android:knownActivityEmbeddingCerts="@array/config_known_host_certs" Loading
res/values/strings.xml +0 −5 Original line number Diff line number Diff line Loading @@ -10696,11 +10696,6 @@ <string name="admin_financed_message">Your device administrator may be able to access data associated with this device, manage apps, and change this device\’s settings.</string> <!-- Title for dialog displayed when user taps a setting on their phone that's blocked by Advanced Protection. [CHAR LIMIT=50] --> <string name="disabled_by_advanced_protection_title">Prevented by Advanced Protection</string> <!-- Short summary for dialog displayed when user taps a setting on their phone that's blocked by Advanced Protection. [CHAR LIMIT=NONE] --> <string name="disabled_by_advanced_protection_message">This action is not allowed because Advanced Protection is on for your device.</string> <!-- Turn off a conditional state of the device (e.g. airplane mode, or hotspot) [CHAR LIMIT=30] --> <string name="condition_turn_off">Turn off</string>
src/com/android/settings/enterprise/ActionDisabledByAdminDialog.java +6 −3 Original line number Diff line number Diff line Loading @@ -109,9 +109,12 @@ public class ActionDisabledByAdminDialog extends Activity } if (enforcingAdmin.getAuthority() instanceof UnknownAuthority authority && ADVANCED_PROTECTION_SYSTEM_ENTITY.equals(authority.getName())) { Intent apmSupportIntent = AdvancedProtectionManager .createSupportIntentForPolicyIdentifierOrRestriction(restriction, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_UNKNOWN); AdvancedProtectionManager apm = getSystemService(AdvancedProtectionManager.class); if (apm == null) { return; } Intent apmSupportIntent = apm.createSupportIntentForPolicyIdentifierOrRestriction( restriction, /* type */ null); startActivityAsUser(apmSupportIntent, UserHandle.of(userId)); finish(); } else { Loading
src/com/android/settings/security/ActionDisabledByAdvancedProtectionDialog.ktdeleted 100644 → 0 +0 −59 Original line number Diff line number Diff line /* * Copyright (C) 2024 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.settings.security; import android.app.Activity import android.content.DialogInterface import android.os.Bundle import android.view.View import android.view.ViewGroup import android.widget.TextView import com.android.settings.R import androidx.appcompat.app.AlertDialog; class ActionDisabledByAdvancedProtectionDialog : Activity(), DialogInterface.OnDismissListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val dialogView = layoutInflater.inflate(R.layout.support_details_dialog, null) as ViewGroup val builder = AlertDialog.Builder(this) .setPositiveButton(R.string.okay, null) .setView(dialogView) .setOnDismissListener(this) initializeDialogView(dialogView) builder.show() } override fun onDismiss(dialog: DialogInterface) { finish() } private fun initializeDialogView(dialogView: View) { setSupportTitle(dialogView) setSupportDetails(dialogView) } private fun setSupportTitle(root: View) { val titleView: TextView = root.findViewById(R.id.admin_support_dialog_title) ?: return titleView.setText(R.string.disabled_by_advanced_protection_title) } private fun setSupportDetails(root: View) { val textView: TextView = root.findViewById(R.id.admin_support_msg) textView.setText(R.string.disabled_by_advanced_protection_message) } }
src/com/android/settings/wifi/WepNetworksPreferenceController.kt +2 −2 Original line number Diff line number Diff line Loading @@ -162,10 +162,10 @@ class WepNetworksPreferenceController(context: Context, preferenceKey: String) : emit(aapmManager?.isAdvancedProtectionEnabled ?: false) }.flowOn(Dispatchers.Default) private fun startSupportIntent() { AdvancedProtectionManager.createSupportIntent( aapmManager?.createSupportIntent( AdvancedProtectionManager.FEATURE_ID_DISALLOW_WEP, AdvancedProtectionManager.SUPPORT_DIALOG_TYPE_DISABLED_SETTING ).let { mContext.startActivity(it) } )?.let { mContext.startActivity(it) } } val wepAllowedFlow = Loading