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

Commit 5c6072c9 authored by Pawan Wagh's avatar Pawan Wagh
Browse files

Show page size compat warnings on 4 KB device

Page size compat warnings should be shown based on alignment
checks for 4 KB devices as well. Removing page size check to show
warnings on 4 KB devices.

Test: m PageSizeCompatWarningsTest && atest -c PageSizeCompatWarningsTest
Bug: 416538966
Flag: android.content.pm.app_compat_warnings_16kb
Change-Id: I7c5f6734c12f91f606c942f086e375e6a4df6177
parent fbe63294
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -41,8 +41,6 @@ import android.os.Looper;
import android.os.Message;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.system.Os;
import android.system.OsConstants;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.AtomicFile;
@@ -263,11 +261,9 @@ class AppWarnings {
        if (appCompatEnabled) {
            return;
        }
        boolean is16KbDevice = Os.sysconf(OsConstants._SC_PAGESIZE) == 16384;
        if (is16KbDevice) {

        mUiHandler.showPageSizeMismatchDialog(r);
    }
    }

    /**
     * Called when an activity is being started.
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class PageSizeMismatchDialog extends AppWarnings.BaseDialog {

        final AlertDialog.Builder builder =
                new AlertDialog.Builder(context)
                        .setPositiveButton(R.string.ok, (dialog, which) ->
                        .setPositiveButton(R.string.page_size_compat_never_show, (dialog, which) ->
                                        manager.setPackageFlag(
                                                mUserId, mPackageName,
                                                AppWarnings.FLAG_HIDE_PAGE_SIZE_MISMATCH,