本文整理匯總了Java中de.robv.android.xposed.XposedHelpers.setStaticObjectField方法的典型用法代碼示例。如果您正苦於以下問題:Java XposedHelpers.setStaticObjectField方法的具體用法?Java XposedHelpers.setStaticObjectField怎麽用?Java XposedHelpers.setStaticObjectField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類de.robv.android.xposed.XposedHelpers
的用法示例。
在下文中一共展示了XposedHelpers.setStaticObjectField方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: handleLoadPackage
import de.robv.android.xposed.XposedHelpers; //導入方法依賴的package包/類
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam p1) throws Throwable
{
String pn=p1.packageName;
Log.d(tag, "PackageName:" + pn);
XSharedPreferences xsp=new XSharedPreferences(this.getClass().getPackage().getName(), "xposed_blacklist");
XSharedPreferences xsp2=new XSharedPreferences(this.getClass().getPackage().getName(), "config");
String manufacturer=xsp2.getString("manufacturer", null);
String model=xsp2.getString("model", null);
String brand=xsp2.getString("brand", null);
String product=xsp2.getString("product", null);
String device=xsp2.getString("device", null);
String blacklist=xsp.getString("main", null);
if (!blacklist.contains(pn))
{
Log.d(tag, pn + ":return_OutOfBlackList");
return;
}
Class<?> clz=XposedHelpers.findClass("android.os.Build", p1.classLoader);
XposedHelpers.setStaticObjectField(clz, "MANUFACTURER", manufacturer);
XposedHelpers.setStaticObjectField(clz, "BRAND", brand);
XposedHelpers.setStaticObjectField(clz, "PRODUCT", product);
XposedHelpers.setStaticObjectField(clz, "DEVICE", device);
XposedHelpers.setStaticObjectField(clz, "MODEL", model);
}