android 源码中 INetworkPolicyListener 的接口含义
2014-08-14 来自:daisymraz 0 人回应

android下载源码下载线程类使用了INetworkPolicyListener接口,大概可以理解是监听网络还击功能的一些变化,但是该接口中每个回调的含义看不大懂,官网上查不到,搜索信息也过少。向有了解的朋友请教了。

private INetworkPolicyListener mPolicyListener = new INetworkPolicyListener.Stub() {
@Override
public void onUidRulesChanged(int uid, int uidRules) {
// caller is NPMS, since we only register with them
if (uid == mInfo.mUid) {
mPolicyDirty = true;
}
}

@Override
public void onMeteredIfacesChanged(String[] meteredIfaces) {
// caller is NPMS, since we only register with them
mPolicyDirty = true;
}

@Override
public void onRestrictBackgroundChanged(boolean restrictBackground) {
// caller is NPMS, since we only register with them
mPolicyDirty = true;
}
};
还没有人回应!

您的回应

你还未登陆,不能回应!登陆