Plumb context object to PowerWhitelistBackend.

Change-Id: Ice0d037625d47f1f668b00499a7f1ad2302cc0ba
Fixes: 76435804
Test: robotests
This commit is contained in:
Fan Zhang
2018-05-29 11:14:42 -07:00
parent 58019a84ed
commit 7e395e1a00
7 changed files with 22 additions and 22 deletions

View File

@@ -893,7 +893,7 @@ public class ManageApplications extends InstrumentedFragment
} else if (mManageApplications.mListType == LIST_TYPE_USAGE_ACCESS) {
mExtraInfoBridge = new AppStateUsageBridge(mContext, mState, this);
} else if (mManageApplications.mListType == LIST_TYPE_HIGH_POWER) {
mExtraInfoBridge = new AppStatePowerBridge(mState, this);
mExtraInfoBridge = new AppStatePowerBridge(mContext, mState, this);
} else if (mManageApplications.mListType == LIST_TYPE_OVERLAY) {
mExtraInfoBridge = new AppStateOverlayBridge(mContext, mState, this);
} else if (mManageApplications.mListType == LIST_TYPE_WRITE_SETTINGS) {
@@ -1285,7 +1285,8 @@ public class ManageApplications extends InstrumentedFragment
return true;
}
ApplicationsState.AppEntry entry = mEntries.get(position);
return !PowerWhitelistBackend.getInstance().isSysWhitelisted(entry.info.packageName);
return !PowerWhitelistBackend.getInstance(mContext)
.isSysWhitelisted(entry.info.packageName);
}
@Override