Use non-logging compat framework calls
Use the internal, non-logging, compat framework calls in OomAdjuster. This should improve some of the slowdowns described in b/188660834 . These calls are in the same process as the platform_compat service, so will be direct calls, the only slowdown experienced was the logging. Test: m Bug: 188660834 Change-Id: I7bae8a5cdc0a347a88cc8bfd1dab06389f0afd71
This commit is contained in:
@@ -328,7 +328,8 @@ public class OomAdjuster {
|
||||
final int index = mCache.indexOfKey(app.packageName);
|
||||
Pair<Boolean, WeakReference<ApplicationInfo>> p;
|
||||
if (index < 0) {
|
||||
p = new Pair<>(mPlatformCompat.isChangeEnabled(mChangeId, app),
|
||||
p = new Pair<>(mPlatformCompat.isChangeEnabledInternalNoLogging(mChangeId,
|
||||
app),
|
||||
new WeakReference<>(app));
|
||||
mCache.put(app.packageName, p);
|
||||
return p.first;
|
||||
@@ -338,7 +339,8 @@ public class OomAdjuster {
|
||||
return p.first;
|
||||
}
|
||||
// Cache is invalid, regenerate it
|
||||
p = new Pair<>(mPlatformCompat.isChangeEnabled(mChangeId, app),
|
||||
p = new Pair<>(mPlatformCompat.isChangeEnabledInternalNoLogging(mChangeId,
|
||||
app),
|
||||
new WeakReference<>(app));
|
||||
mCache.setValueAt(index, p);
|
||||
return p.first;
|
||||
|
||||
Reference in New Issue
Block a user