コード例 #1
0
  @Override
  protected void afterHookedMethod(MethodHookParam param) throws Throwable {
    if (Common.LAUNCHER_INSTANCE == null) return;

    if ((Boolean) callMethod(Common.LAUNCHER_INSTANCE, Methods.launcherHasCustomContentToLeft)
        && !Common.IS_DRAGGING) {
      GoogleSearchBarHooks.hideSearchbar();
    }
  }
コード例 #2
0
  @Override
  protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
    if (Common.LAUNCHER_INSTANCE == null) {
      return;
    }

    // show the search if a text search is started
    GoogleSearchBarHooks.setLayoutParams(
        Common.LAUNCHER_INSTANCE,
        LayoutParams.MATCH_PARENT,
        LayoutParams.MATCH_PARENT,
        Common.SEARCH_BAR_SPACE_WIDTH,
        Common.SEARCH_BAR_SPACE_HEIGHT);
  }
コード例 #3
0
  @Override
  protected void afterHookedMethod(MethodHookParam param) throws Throwable {
    if (Common.LAUNCHER_INSTANCE == null) {
      return;
    }

    boolean hasGNowEnabled =
        (Boolean) callMethod(Common.LAUNCHER_INSTANCE, "hasCustomContentToLeft");

    if ((hasGNowEnabled && getIntField(Common.WORKSPACE_INSTANCE, Fields.workspaceCurrentPage) != 0)
        || !hasGNowEnabled) {

      // hide the search bar on stop search
      GoogleSearchBarHooks.hideSearchbar();
    }
  }