How pepsimaxin/aosp_launcher3_gradle works
Project type and purpose
• This is AOSP’s Launcher3, an Android home-screen/recents application.
• The quickstep module (under quickstep/src/com/android/quickstep/) implements gesture-based navigation (swipe-up, back, overview) and hand-off to the Recents UI and animation pipeline.
File-structure analysis (quickstep module)
• Top-level in quickstep/src/com/android/quickstep/:
• InputConsumer.java + many concrete *InputConsumer classes (e.g., OverviewInputConsumer, StatusBarInputConsumer)
• Swipe handlers: AbsSwipeUpHandler.java, LauncherSwipeHandlerV2.java, FallbackSwipeHandler.java
• TouchInteractionService.java – entry point for raw touch events from the system
• GestureState.java – state machine definition
• OrientationTouchTransformer.java – transforms raw touch coords by display rotation
• Controllers/Managers: QuickstepProcessInitializer.kt, SystemUiProxy.java, TaskAnimationManager.java
• Recents orchestration: RecentsActivity.java, RecentsAnimationController.java, RecentsModel.java, RemoteAnimationTargets.java
Key insights from README
• AOSP-based, pure upstream code
• Built with Gradle, targets Android 14/15
• No custom modifications—follow AOSP patterns
Designing the gesture-handling flowchart
1. TouchInteractionService (TIS) – receives raw MotionEvents from WindowManager
2. InputConsumer chain – one or more consumers registered to TIS (OverviewInputConsumer, StatusBarInputConsumer, etc.)
3. SwipeUpHandler – selects between LauncherSwipeHandlerV2 or FallbackSwipeHandler via AbsSwipeUpHandler
4. GestureState machine – tracks gesture progress (BEGIN, DRAGGING, RELEASING, CANCELLED)
5. QuickstepTransitionManager (via SystemUiProxy) – decides action: go Home, open Recents, launch App
6. RecentsAnimationController – kicks off remote animation with System UI
7. RecentsActivity / Overview UI – final rendering of recents screen
b. Relationships & data-flow
• Decision diamond: “gesture distance & velocity thresholds?”
c. Architectural patterns & design principles
• Chain of Responsibility for InputConsumers
• State pattern for gesture progression (GestureState)
• MVC: RecentsModel supplies data → RecentsActivity (View) uses controllers
• Remote animation via Binder/IPC (RemoteAnimationTargets, RemoteRunnable)
d. Technologies & frameworks
• Java / Kotlin on Android SDK
• Android input pipeline (MotionEvent, InputChannel)
• SurfaceTransaction (in RecentsAnimationController)
• Binder IPC to SystemUI (via SystemUiProxy)