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

Commit eb2d718e authored by Ivan Chiang's avatar Ivan Chiang
Browse files

[PM] Remove Material library in PackageInstaller

Flag: android.content.pm.use_pia_v2
Bug: 410204560
Test: atest CtsPackageInstallerCUJInstallationViaIntentForResultTestCasesV2
Test: atest CtsPackageInstallerCUJInstallationTestCasesV2
Test: atest CtsPackageUninstallTestCases:ArchiveTest
Test: atest CtsPackageInstallerCUJUninstallationTestCasesV2
Change-Id: Iac90f723fd2cbf1fa0e2e6206626778f800b1eb0
parent 654123ab
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ java_defaults {
        "androidx.leanback_leanback",
        "androidx.lifecycle_lifecycle-extensions",
        "androidx.lifecycle_lifecycle-livedata",
        "com.google.android.material_material",
        "kotlin-parcelize-runtime",
    ],

+4 −2
Original line number Diff line number Diff line
@@ -23,12 +23,14 @@

    <include layout="@layout/app_snippet_layout" />

    <com.google.android.material.progressindicator.LinearProgressIndicator
        style="@style/Widget.PackageInstaller.ProgressBar"
    <ProgressBar
        android:id="@+id/progress_bar"
        android:indeterminate="true"
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:layout_marginTop="@dimen/dialog_inter_element_margin"
        android:paddingVertical="4dp"
        style="?android:attr/progressBarStyleHorizontal"
        android:visibility="gone" />

    <TextView
+0 −8
Original line number Diff line number Diff line
@@ -120,11 +120,6 @@
        <item name="android:layout_marginTop">@dimen/dialog_inter_element_margin</item>
    </style>

    <style name="Widget.PackageInstaller.ProgressBar" parent="Widget.Material3.LinearProgressIndicator">
        <item name="android:layout_marginTop">@dimen/dialog_inter_element_margin</item>
        <item name="android:paddingVertical">4dp</item>
    </style>

    <style name="Widget.PackageInstaller.ViewGroup.KeepData" parent="">
        <item name="android:layout_marginTop">@dimen/dialog_inter_element_margin</item>
    </style>
@@ -141,7 +136,4 @@
    <style name="Widget.PackageInstaller.TextView.KeepData.SubHeading" parent="@android:style/TextAppearance.DeviceDefault.Small">
        <item name="android:textColor">?android:attr/textColorSecondary</item>
    </style>



</resources>
+0 −9
Original line number Diff line number Diff line
@@ -28,14 +28,12 @@ import android.os.UserManager
import android.provider.Settings
import android.util.Log
import android.view.Window

import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentManager
import androidx.lifecycle.ViewModelProvider

import com.android.packageinstaller.R
import com.android.packageinstaller.v2.model.InstallAborted
import com.android.packageinstaller.v2.model.InstallFailed
@@ -84,13 +82,6 @@ class InstallLaunch : FragmentActivity(), InstallActionListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        requestWindowFeature(Window.FEATURE_NO_TITLE)
        // The base theme inherits a deviceDefault theme. Applying a material style on the base
        // theme below will enable using Material components, like the Material Progress Bar in the
        // fragments
        theme.applyStyle(
            com.google.android.material.R.style.Theme_Material3_DynamicColors_DayNight,
            /* force= */ false)

        fragmentManager = supportFragmentManager
        appOpsManager = getSystemService(AppOpsManager::class.java)
        installRepository = InstallRepository(applicationContext)
+0 −7
Original line number Diff line number Diff line
@@ -66,13 +66,6 @@ class UnarchiveLaunch : FragmentActivity(), UnarchiveActionListener {
        )
        super.onCreate(savedInstanceState)

        // The base theme inherits a deviceDefault theme. Applying a material style on the base
        // theme below will enable using Material components, like the Material Progress Bar in the
        // fragments
        theme.applyStyle(
            com.google.android.material.R.style.Theme_Material3_DynamicColors_DayNight,
            /* force= */ false)

        fragmentManager = supportFragmentManager

        unarchiveRepository = UnarchiveRepository(applicationContext)
Loading