Update frameworks/base patches for android-7.1.1_r21
[GitHub/Stricted/android_vendor_extra.git] / patches / frameworks / base / 0036-graphics-ADB-N-icon-compatible-with-OMS7.patch
CommitLineData
a7bdce84 1From 2594471d446539bc66928f7238ca89de2d585431 Mon Sep 17 00:00:00 2001
6bcbafcd
L
2From: George G <kreach3r@users.noreply.github.com>
3Date: Thu, 2 Feb 2017 01:52:27 +0200
c00f212d 4Subject: [PATCH 36/39] graphics: ADB "N" icon compatible with OMS7
6bcbafcd
L
5
6It's the same problem as the booleans again. This time, it affected the adb "N" icon in the statusbar.
7This commit should fix this.
8
9After: http://i.imgur.com/RPh6WKK.jpg
10
11Previous commits on the same matter:
12OMS7 introduced this fine piece of code: https://github.com/SubstratumResources/platform_frameworks_base/blob/n-oms7/core/java/android/app/ResourcesManager.java#L897..#L904
13
14// Resources.getSystem Resources are created on request and aren't tracked by
15// mResourceReferences.
16//
17// If overlays targeting "android" are to be used, we must create the system
18// resources regardless of whether they already exist, since otherwise the
19// information on what overlays to use would be lost. This is wasteful for most
20// applications, so limit this operation to the system user only. (This means
21// Resources.getSystem() will *not* use overlays for applications.)
22
23Replaced deprecated Resources.getSystem() with compatible method.
24
25Change-Id: Ibab2ce1571360a9e03043d1bf3144c89e54e1947
26---
27 graphics/java/android/graphics/drawable/Icon.java | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30diff --git a/graphics/java/android/graphics/drawable/Icon.java b/graphics/java/android/graphics/drawable/Icon.java
5596c080 31index 2b950d3d5c5..fb26bee68fa 100644
6bcbafcd
L
32--- a/graphics/java/android/graphics/drawable/Icon.java
33+++ b/graphics/java/android/graphics/drawable/Icon.java
34@@ -294,7 +294,7 @@ public final class Icon implements Parcelable {
35 resPackage = context.getPackageName();
36 }
37 if ("android".equals(resPackage)) {
38- mObj1 = Resources.getSystem();
39+ mObj1 = context.getResources();
40 } else {
41 final PackageManager pm = context.getPackageManager();
42 try {
43--
5596c080 442.11.1
6bcbafcd 45