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

Commit 3691ddae authored by YUKAI HUNG's avatar YUKAI HUNG Committed by Automerger Merge Worker
Browse files

Merge "[Security] resolve CRLF attack on RequestIgnoreBatteryOptimizations"...

Merge "[Security] resolve CRLF attack on RequestIgnoreBatteryOptimizations" into sc-v2-dev am: 93f6df76

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15898227

Change-Id: Ib506e95ea5bbdf2c92b640e8df01f5233460e7c7
parents b7838414 93f6df76
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.settings.fuelgauge;
import android.Manifest;
import android.content.DialogInterface;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageItemInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
@@ -85,8 +86,11 @@ public class RequestIgnoreBatteryOptimizations extends AlertActivity implements
        }

        final AlertController.AlertParams p = mAlertParams;
        final CharSequence appLabel = ai.loadSafeLabel(getPackageManager(),
                PackageItemInfo.DEFAULT_MAX_LABEL_SIZE_PX, PackageItemInfo.SAFE_LABEL_FLAG_TRIM
                        | PackageItemInfo.SAFE_LABEL_FLAG_FIRST_LINE);
        p.mTitle = getText(R.string.high_power_prompt_title);
        p.mMessage = getString(R.string.high_power_prompt_body, ai.loadLabel(getPackageManager()));
        p.mMessage = getString(R.string.high_power_prompt_body, appLabel);
        p.mPositiveButtonText = getText(R.string.allow);
        p.mNegativeButtonText = getText(R.string.deny);
        p.mPositiveButtonListener = this;