Commit | Line | Data |
---|---|---|
c00f212d | 1 | From 4160deefa178641c4ad0a04d4666e2f1f5032d79 Mon Sep 17 00:00:00 2001 |
6bcbafcd L |
2 | From: George G <kreach3r@users.noreply.github.com> |
3 | Date: Thu, 2 Feb 2017 01:52:27 +0200 | |
c00f212d | 4 | Subject: [PATCH 36/39] graphics: ADB "N" icon compatible with OMS7 |
6bcbafcd L |
5 | |
6 | It's the same problem as the booleans again. This time, it affected the adb "N" icon in the statusbar. | |
7 | This commit should fix this. | |
8 | ||
9 | After: http://i.imgur.com/RPh6WKK.jpg | |
10 | ||
11 | Previous commits on the same matter: | |
12 | OMS7 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 | ||
23 | Replaced deprecated Resources.getSystem() with compatible method. | |
24 | ||
25 | Change-Id: Ibab2ce1571360a9e03043d1bf3144c89e54e1947 | |
26 | --- | |
27 | graphics/java/android/graphics/drawable/Icon.java | 2 +- | |
28 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
29 | ||
30 | diff --git a/graphics/java/android/graphics/drawable/Icon.java b/graphics/java/android/graphics/drawable/Icon.java | |
5596c080 | 31 | index 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 | 44 | 2.11.1 |
6bcbafcd | 45 |