Hook maintenance

July 16, 2026 ยท View on GitHub

Current compatibility fixture

  • Application: OnePlus System Launcher
  • Package: com.android.launcher
  • Version: 16.6.9 (160060009)
  • Minimum/target SDK reported by the APK: 33/36
  • APK SHA-256: d0b9afa99a0e80e496b1297760ac7cb64ffc0b3a259636f6bc8eb1182b65935f

The production implementation supports this fixture only. Exact class and method names are intentional because this launcher build retains descriptive symbols. If a later release obfuscates these targets or produces ambiguous alternatives, reassess whether DexKit is justified rather than adding broad fallback reflection.

Target descriptors

Swipe-up autofocus

com.android.launcher3.touch.OplusAbstractStateChangeTouchController
    .onDragEndUpdateStateInject(
    com.android.launcher3.LauncherState
): void

The argument is the gesture's committed destination. Focus only when it equals LauncherState.ALL_APPS. The supported focus path is:

Launcher.getAppsView()
ActivityAllAppsContainerView.getSearchUiManager()
LauncherTaskbarAppsSearchContainerLayout.onSearchBarClick()

For module-triggered opens, temporarily set LauncherAppsSearchContainerLayout.imeControllable to false around onSearchBarClick(). This selects OnePlus's normal system-IME fallback without changing manual search-bar taps.

Enter-key launch

Install the editor listener after:

com.android.launcher3.allapps.search.OplusAllAppsSearchBarController.initialize(
    ActivityAllAppsContainerView,
    SearchAlgorithm,
    EditText,
    ActivityContext,
    SearchCallback,
    COUISearchBar
): void

When enabled, delegate Search/Go actions to:

com.android.launcher3.allapps.search.AllAppsSearchBarController.onEditorAction(
    TextView,
    int,
    KeyEvent
): boolean

This preserves the launcher's own statistics and launchHighlightedItem() path.

com.android.launcher3.allapps.search.OplusDefaultAppSearchAlgorithm.getTitleMatchResult(
    java.util.List,
    java.lang.String
): java.util.ArrayList

Always run the original method first. Preserve its DMP, pinyin, alias, and multi-app results. Newly added title matches must be checked with:

com.android.launcher.filter.DeepProtectedAppsManager
    .isAppHiddenEntryAndSupportPrivacyLock(ItemInfo): boolean

Create additional results only through:

BaseAllAppsAdapter.AdapterItem.asApp(int, String, AppInfo)

Never rebuild the entire search list without OnePlus's privacy filter.

Global-search-button redirect

com.android.launcher3.search.IndicatorEntry.startIndicatorApp(Intent): boolean

Read its exact private mLauncher field, call:

com.android.launcher3.Launcher.showAllAppsFromIntent(boolean): void

and return false after a successful redirect. If reflection or redirection fails, proceed with the original launcher action.

Swipe-down search redirect

com.android.launcher.touch.WorkspacePullDownDetectController.showSearchBar(
    com.android.launcher.Launcher,
    java.lang.String,
    boolean,
    android.os.Bundle,
    boolean
): boolean

This method is reached only after swipe-down has resolved to Global Search. When enabled, call Launcher.showAllAppsFromIntent(true), then use the controller's public pullCancel() method to unwind the pull-down blur and scale. Return true after a successful redirect; otherwise run the original method. Do not manually detach blur surfaces or recreate the old cleanup code.

Updating for another launcher release

  1. Put the APK under the ignored decompiled/ directory and record its version and SHA-256.
  2. Decompile it with JADX and inspect all five feature targets above before editing production code.
  3. Trace callers and side effects, not just matching method names. Prefer the launcher's public behavior over manually recreating it.
  4. Update only the affected feature and add or adjust pure unit fixtures where applicable.
  5. Build the debug APK and confirm each feature reports exactly one installed hook.
  6. Restart System Launcher and validate one feature at a time with its toggle enabled and disabled.
  7. Use user-led checks for visual behavior; use ADB for logs, process state, and deterministic verification.

Do not commit launcher APKs, decompiled sources, mappings, or device logs.