Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e4c4685 authored by Ivan Chiang's avatar Ivan Chiang
Browse files

[PM] Update the layout of the PIA

- Remove the title of the Anonymous source dialog

Flag: android.content.pm.use_pia_v2
Test: manual
Bug: 274120822
Change-Id: Ic8a531002a4054e13e88fe9d06293c8b73eef96c
parent efb756fd
Loading
Loading
Loading
Loading
+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>
+0 −1
Original line number Diff line number Diff line
@@ -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&#8230;</string>
+2 −5
Original line number Diff line number Diff line
@@ -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(