Revert "[AAPM] Add advanced protection dialog according to API f..."

Revert submission 30767017-aapm-dialog-api-feedback

Reason for revert: Droidmonitor created revert due to b/384828570. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:30767017-aapm-dialog-api-feedback

Change-Id: Ibf26aca2453f2007370974290f5c16d6b091341e
This commit is contained in:
Priyanka Advani (xWF)
2024-12-23 13:41:43 -08:00
committed by Android (Google) Code Review
parent e2248f1c4f
commit 2574343b43
7 changed files with 22 additions and 100 deletions

View File

@@ -1,59 +0,0 @@
/*
* 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)
}
}