Loading packages/PackageInstaller/res/layout/anonymous_material_layout.xml 0 → 100644 +31 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2025 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. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="match_parent" android:orientation="vertical" android:paddingHorizontal="?android:attr/dialogPreferredPadding" android:paddingBottom="@dimen/alert_dialog_inner_padding" android:paddingTop="@dimen/alert_dialog_inner_padding"> <TextView style="?attr/textAppearanceInstallerCustomMessage" android:id="@+id/custom_message" android:layout_height="wrap_content" android:layout_width="match_parent" /> </ScrollView> packages/PackageInstaller/res/values/strings_v2.xml +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ <!-- Dialog Titles --> <string name="title_unknown_source_blocked">Permission required</string> <string name="title_anonymous_source_warning">Install unknown app?</string> <string name="title_install_blocked">Install blocked</string> <string name="title_install_staging">Preparing app…</string> Loading packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/AnonymousSourceFragment.java +2 −5 Original line number Diff line number Diff line Loading @@ -58,15 +58,12 @@ public class AnonymousSourceFragment extends DialogFragment { // There is no root view here. Ok to pass null view root @SuppressWarnings("InflateParams") View dialogView = getLayoutInflater().inflate( UiUtil.getInstallationLayoutResId(requireContext()), null); View dialogView = getLayoutInflater().inflate(R.layout.anonymous_material_layout, null); TextView customMessage = dialogView.requireViewById(R.id.custom_message); customMessage.setText(R.string.message_anonymous_source_warning); customMessage.setVisibility(View.VISIBLE); mDialog = UiUtil.getAlertDialog(requireContext(), getString(R.string.title_anonymous_source_warning), dialogView, R.string.button_continue, R.string.button_cancel, /* title= */ "", dialogView, R.string.button_continue, R.string.button_cancel, ((dialog, which) -> mInstallActionListener.onPositiveResponse( InstallUserActionRequired.USER_ACTION_REASON_ANONYMOUS_SOURCE)), ((dialog, which) -> mInstallActionListener.onNegativeResponse( Loading Loading
packages/PackageInstaller/res/layout/anonymous_material_layout.xml 0 → 100644 +31 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2025 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. --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="match_parent" android:orientation="vertical" android:paddingHorizontal="?android:attr/dialogPreferredPadding" android:paddingBottom="@dimen/alert_dialog_inner_padding" android:paddingTop="@dimen/alert_dialog_inner_padding"> <TextView style="?attr/textAppearanceInstallerCustomMessage" android:id="@+id/custom_message" android:layout_height="wrap_content" android:layout_width="match_parent" /> </ScrollView>
packages/PackageInstaller/res/values/strings_v2.xml +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ <!-- Dialog Titles --> <string name="title_unknown_source_blocked">Permission required</string> <string name="title_anonymous_source_warning">Install unknown app?</string> <string name="title_install_blocked">Install blocked</string> <string name="title_install_staging">Preparing app…</string> Loading
packages/PackageInstaller/src/com/android/packageinstaller/v2/ui/fragments/AnonymousSourceFragment.java +2 −5 Original line number Diff line number Diff line Loading @@ -58,15 +58,12 @@ public class AnonymousSourceFragment extends DialogFragment { // There is no root view here. Ok to pass null view root @SuppressWarnings("InflateParams") View dialogView = getLayoutInflater().inflate( UiUtil.getInstallationLayoutResId(requireContext()), null); View dialogView = getLayoutInflater().inflate(R.layout.anonymous_material_layout, null); TextView customMessage = dialogView.requireViewById(R.id.custom_message); customMessage.setText(R.string.message_anonymous_source_warning); customMessage.setVisibility(View.VISIBLE); mDialog = UiUtil.getAlertDialog(requireContext(), getString(R.string.title_anonymous_source_warning), dialogView, R.string.button_continue, R.string.button_cancel, /* title= */ "", dialogView, R.string.button_continue, R.string.button_cancel, ((dialog, which) -> mInstallActionListener.onPositiveResponse( InstallUserActionRequired.USER_ACTION_REASON_ANONYMOUS_SOURCE)), ((dialog, which) -> mInstallActionListener.onNegativeResponse( Loading