package io.gavinhungry.xposed.oneplus.noquickpulldown;

import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;

import android.os.Build;
import android.view.MotionEvent;

public class NoQuickPulldown implements IXposedHookLoadPackage {

  private static final String qsExpandFieldName = Build.VERSION.SDK_INT == 21 ? "mTwoFingerQsExpand" : "mQsExpandImmediate";

  public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
    if (lpparam.packageName.equals("com.android.systemui")) {
      try {

        XposedHelpers.findAndHookMethod("com.android.systemui.statusbar.phone.NotificationPanelView", lpparam.classLoader,
          "onTouchEvent", MotionEvent.class, new XC_MethodHook() {

          @Override
          protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
            XposedHelpers.setBooleanField(param.thisObject, qsExpandFieldName, false);
          }
        });

      } catch(Throwable t) {
        XposedBridge.log(t);
      }
    }
  }
}

@@ -89,24 +89,69 @@
 osedBridge;%0A
+import de.robv.android.xposed.XposedHelpers;%0A
 import de.ro
@@ -313,53 +313,8 @@
 ook;
-%0Aimport de.robv.android.xposed.XposedHelpers;
 %0A%0Aim

Reorder imports