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

Commit 9bd539ce authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Modify logic for showing the Unsupported Display Size dialog" into aosp-main-future

parents d981a430 048885f0
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -152,10 +152,12 @@ class AppWarnings {
     * @param r activity record for which the warning may be displayed
     */
    public void showUnsupportedDisplaySizeDialogIfNeeded(ActivityRecord r) {
        final Configuration globalConfig = mAtm.getGlobalConfiguration();
        if (globalConfig.densityDpi != DisplayMetrics.DENSITY_DEVICE_STABLE
        final DisplayContent dc = r.getDisplayContent();
        final Configuration config = dc == null
                ? mAtm.getGlobalConfiguration() : dc.getConfiguration();
        if (config.densityDpi != DisplayMetrics.DENSITY_DEVICE_STABLE
                && r.info.applicationInfo.requiresSmallestWidthDp
                > globalConfig.smallestScreenWidthDp) {
                > config.smallestScreenWidthDp) {
            mUiHandler.showUnsupportedDisplaySizeDialog(r);
        }
    }