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

Commit 1fb50fdc authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[pm] clean up getRealPackageSetting

It is no longer used and was always a source of confusion.

BUG: 321139675
Test: builds
FLAG: EXEMPT clean up
Change-Id: I5081e1e747bbc6aa9353873cb2ec4a69dcf4464f
parent 1d909ba9
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -644,20 +644,6 @@ final class InstallRequest {
        return mScanResult.mPkgSetting;
    }

    @Nullable
    public PackageSetting getRealPackageSetting() {
        // TODO: Fix this to have 1 mutable PackageSetting for scan/install. If the previous
        //  setting needs to be passed to have a comparison, hide it behind an immutable
        //  interface. There's no good reason to have 3 different ways to access the real
        //  PackageSetting object, only one of which is actually correct.
        PackageSetting realPkgSetting = isExistingSettingCopied()
                ? getScanRequestPackageSetting() : getScannedPackageSetting();
        if (realPkgSetting == null) {
            realPkgSetting = getScannedPackageSetting();
        }
        return realPkgSetting;
    }

    public boolean isExistingSettingCopied() {
        assertScanResultExists();
        return mScanResult.mExistingSettingCopied;