Java Code Examples for de.robv.android.xposed.XposedHelpers#setFloatField()

The following examples show how to use de.robv.android.xposed.XposedHelpers#setFloatField() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HookLocationFaker.java    From PokeFaker with MIT License 6 votes vote down vote up
public static List<GpsSatellite> fetchGpsSatellites() {
    if (cacheGpsSatelliteList == null) {
        cacheGpsSatelliteList = new ArrayList<>();
        for (FakeGpsSatellite fake: staticList) {
            GpsSatellite real = ((GpsSatellite) XposedHelpers.newInstance(GpsSatellite.class, fake.mPrn));
            XposedHelpers.setBooleanField(real, "mValid", fake.mValid);
            XposedHelpers.setBooleanField(real, "mUsedInFix", fake.mUsedInFix);
            XposedHelpers.setBooleanField(real, "mHasAlmanac", fake.mHasAlmanac);
            XposedHelpers.setBooleanField(real, "mHasEphemeris", fake.mHasEphemeris);
            XposedHelpers.setFloatField(real, "mSnr", fake.mSnr);
            XposedHelpers.setFloatField(real, "mElevation", fake.mElevation);
            XposedHelpers.setFloatField(real, "mAzimuth", fake.mAzimuth);
            cacheGpsSatelliteList.add(real);
        }
    }
    return cacheGpsSatelliteList;

}
 
Example 2
Source File: XposedHelpersWraper.java    From MIUIAnesthetist with MIT License 5 votes vote down vote up
public static void setFloatField(Object obj, String fieldName, float value) {
    try {
        XposedHelpers.setFloatField(obj, fieldName, value);
    } catch (Throwable t) {
        log(t);
    }
}