├── .gitignore ├── Android.mk ├── AndroidManifest-common.xml ├── AndroidManifest.xml ├── CleanSpec.mk ├── MODULE_LICENSE_APACHE2 ├── NOTICE ├── build.gradle ├── fill_screens.py ├── print_db.py ├── proguard.flags ├── protos └── launcher_log.proto ├── res ├── anim │ ├── discovery_bounce.xml │ ├── no_anim.xml │ └── task_open_enter.xml ├── animator-v21 │ └── overview_button_anim.xml ├── drawable-hdpi │ ├── ic_all_apps_bg_hand.png │ ├── ic_allapps.png │ ├── ic_allapps_pressed.png │ ├── ic_info_launcher.png │ ├── ic_remove_launcher.png │ ├── ic_uninstall_launcher.png │ ├── ic_widget_resize_handle.png │ ├── page_hover_left.9.png │ ├── page_hover_left_active.9.png │ ├── page_hover_right.9.png │ ├── page_hover_right_active.9.png │ ├── quantum_panel_bitmap.9.png │ ├── quantum_panel_dark_bitmap.9.png │ ├── screenpanel.9.png │ ├── screenpanel_hover.9.png │ ├── virtual_preload.9.png │ ├── virtual_preload_folder.9.png │ ├── widget_resize_frame.9.png │ ├── widget_resize_shadow.9.png │ ├── widget_tile.png │ └── workspace_bg.9.png ├── drawable-ldrtl │ └── container_fastscroll_popup_bg.xml ├── drawable-mdpi │ ├── ic_all_apps_bg_hand.png │ ├── ic_allapps.png │ ├── ic_allapps_pressed.png │ ├── ic_info_launcher.png │ ├── ic_remove_launcher.png │ ├── ic_uninstall_launcher.png │ ├── ic_widget_resize_handle.png │ ├── page_hover_left.9.png │ ├── page_hover_left_active.9.png │ ├── page_hover_right.9.png │ ├── page_hover_right_active.9.png │ ├── quantum_panel_bitmap.9.png │ ├── quantum_panel_dark_bitmap.9.png │ ├── screenpanel.9.png │ ├── screenpanel_hover.9.png │ ├── virtual_preload.9.png │ ├── virtual_preload_folder.9.png │ ├── widget_resize_frame.9.png │ ├── widget_resize_shadow.9.png │ ├── widget_tile.png │ └── workspace_bg.9.png ├── drawable-v21 │ ├── quantum_panel.xml │ └── quantum_panel_dark.xml ├── drawable-xhdpi │ ├── ic_all_apps_bg_hand.png │ ├── ic_allapps.png │ ├── ic_allapps_pressed.png │ ├── ic_info_launcher.png │ ├── ic_remove_launcher.png │ ├── ic_uninstall_launcher.png │ ├── ic_widget_resize_handle.png │ ├── page_hover_left.9.png │ ├── page_hover_left_active.9.png │ ├── page_hover_right.9.png │ ├── page_hover_right_active.9.png │ ├── quantum_panel_bitmap.9.png │ ├── quantum_panel_dark_bitmap.9.png │ ├── screenpanel.9.png │ ├── screenpanel_hover.9.png │ ├── virtual_preload.9.png │ ├── virtual_preload_folder.9.png │ ├── widget_resize_frame.9.png │ ├── widget_resize_shadow.9.png │ ├── widget_tile.png │ └── workspace_bg.9.png ├── drawable-xxhdpi │ ├── ic_all_apps_bg_hand.png │ ├── ic_allapps.png │ ├── ic_allapps_pressed.png │ ├── ic_info_launcher.png │ ├── ic_remove_launcher.png │ ├── ic_uninstall_launcher.png │ ├── ic_widget_resize_handle.png │ ├── page_hover_left.9.png │ ├── page_hover_left_active.9.png │ ├── page_hover_right.9.png │ ├── page_hover_right_active.9.png │ ├── quantum_panel_bitmap.9.png │ ├── quantum_panel_dark_bitmap.9.png │ ├── screenpanel.9.png │ ├── screenpanel_hover.9.png │ ├── virtual_preload.9.png │ ├── virtual_preload_folder.9.png │ ├── widget_resize_frame.9.png │ ├── widget_resize_shadow.9.png │ ├── widget_tile.png │ └── workspace_bg.9.png ├── drawable-xxxhdpi │ ├── ic_all_apps_bg_hand.png │ ├── ic_info_launcher.png │ ├── ic_remove_launcher.png │ ├── ic_uninstall_launcher.png │ ├── ic_widget_resize_handle.png │ ├── quantum_panel_bitmap.9.png │ ├── quantum_panel_dark_bitmap.9.png │ ├── widget_resize_frame.9.png │ ├── widget_resize_shadow.9.png │ └── workspace_bg.9.png ├── drawable │ ├── all_apps_button_icon.xml │ ├── all_apps_divider.xml │ ├── all_apps_search_divider.xml │ ├── all_apps_search_hint.xml │ ├── bg_celllayout.xml │ ├── bg_pill_focused.xml │ ├── bg_screenpanel.xml │ ├── bg_white_pill.xml │ ├── container_fastscroll_popup_bg.xml │ ├── deep_shortcuts_drag_handle.xml │ ├── ic_all_apps_bg_icon_1.xml │ ├── ic_all_apps_bg_icon_2.xml │ ├── ic_all_apps_bg_icon_3.xml │ ├── ic_all_apps_bg_icon_4.xml │ ├── ic_allapps_search.xml │ ├── ic_setting.xml │ ├── ic_wallpaper.xml │ ├── ic_widget.xml │ ├── quantum_panel.xml │ ├── quantum_panel_dark.xml │ ├── quantum_panel_shape.xml │ ├── quantum_panel_shape_dark.xml │ ├── widget_internal_focus_bg.xml │ └── widgets_row_divider.xml ├── interpolator │ ├── decelerate_quart.xml │ ├── decelerate_quint.xml │ ├── disco_bounce_section1.xml │ ├── disco_bounce_section2.xml │ └── disco_bounce_section3.xml ├── layout-land │ └── launcher.xml ├── layout-port │ └── launcher.xml ├── layout-sw720dp │ └── launcher.xml ├── layout │ ├── all_apps.xml │ ├── all_apps_button.xml │ ├── all_apps_divider.xml │ ├── all_apps_empty_search.xml │ ├── all_apps_icon.xml │ ├── all_apps_search_divider.xml │ ├── all_apps_search_market.xml │ ├── app_icon.xml │ ├── appwidget_error.xml │ ├── appwidget_not_ready.xml │ ├── deep_shortcut.xml │ ├── deep_shortcuts_container.xml │ ├── drop_target_bar_horz.xml │ ├── drop_target_bar_vert.xml │ ├── folder_application.xml │ ├── folder_icon.xml │ ├── hotseat.xml │ ├── overview_panel.xml │ ├── page_indicator.xml │ ├── qsb_blocker_view.xml │ ├── qsb_container.xml │ ├── qsb_default_view.xml │ ├── user_folder.xml │ ├── user_folder_icon_normalized.xml │ ├── widget_cell.xml │ ├── widgets_list_row_view.xml │ ├── widgets_view.xml │ ├── workspace_screen.xml │ ├── zzz_dummy_widget.xml │ └── zzz_weight_watcher.xml ├── mipmap-hdpi │ └── ic_launcher_home.png ├── mipmap-mdpi │ └── ic_launcher_home.png ├── mipmap-xhdpi │ └── ic_launcher_home.png ├── mipmap-xxhdpi │ └── ic_launcher_home.png ├── values-af │ └── strings.xml ├── values-am │ └── strings.xml ├── values-ar │ └── strings.xml ├── values-az-rAZ │ └── strings.xml ├── values-b+sr+Latn │ └── strings.xml ├── values-be-rBY │ └── strings.xml ├── values-be │ └── strings.xml ├── values-bg │ └── strings.xml ├── values-bn-rBD │ └── strings.xml ├── values-bs-rBA │ └── strings.xml ├── values-ca │ └── strings.xml ├── values-cs │ └── strings.xml ├── values-da │ └── strings.xml ├── values-de │ └── strings.xml ├── values-el │ └── strings.xml ├── values-en-rAU │ └── strings.xml ├── values-en-rGB │ └── strings.xml ├── values-en-rIN │ └── strings.xml ├── values-es-rUS │ └── strings.xml ├── values-es │ └── strings.xml ├── values-et-rEE │ └── strings.xml ├── values-et │ └── strings.xml ├── values-eu-rES │ └── strings.xml ├── values-fa │ └── strings.xml ├── values-fi │ └── strings.xml ├── values-fr-rCA │ └── strings.xml ├── values-fr │ └── strings.xml ├── values-gl-rES │ └── strings.xml ├── values-gu-rIN │ └── strings.xml ├── values-hi │ └── strings.xml ├── values-hr │ └── strings.xml ├── values-hu │ └── strings.xml ├── values-hy-rAM │ └── strings.xml ├── values-in │ └── strings.xml ├── values-is-rIS │ └── strings.xml ├── values-it │ └── strings.xml ├── values-iw │ └── strings.xml ├── values-ja │ └── strings.xml ├── values-ka-rGE │ └── strings.xml ├── values-kk-rKZ │ └── strings.xml ├── values-km-rKH │ └── strings.xml ├── values-kn-rIN │ └── strings.xml ├── values-ko │ └── strings.xml ├── values-ky-rKG │ └── strings.xml ├── values-land │ └── dimens.xml ├── values-lo-rLA │ └── strings.xml ├── values-lt │ └── strings.xml ├── values-lv │ └── strings.xml ├── values-mk-rMK │ └── strings.xml ├── values-ml-rIN │ └── strings.xml ├── values-mn-rMN │ └── strings.xml ├── values-mr-rIN │ └── strings.xml ├── values-ms-rMY │ └── strings.xml ├── values-ms │ └── strings.xml ├── values-my-rMM │ └── strings.xml ├── values-nb │ └── strings.xml ├── values-ne-rNP │ └── strings.xml ├── values-nl │ └── strings.xml ├── values-pa-rIN │ └── strings.xml ├── values-pl │ └── strings.xml ├── values-pt-rPT │ └── strings.xml ├── values-pt │ └── strings.xml ├── values-rm │ └── strings.xml ├── values-ro │ └── strings.xml ├── values-ru │ └── strings.xml ├── values-si-rLK │ └── strings.xml ├── values-sk │ └── strings.xml ├── values-sl │ └── strings.xml ├── values-sq-rAL │ └── strings.xml ├── values-sr │ └── strings.xml ├── values-sv │ └── strings.xml ├── values-sw │ └── strings.xml ├── values-sw340dp │ └── dimens.xml ├── values-sw600dp │ ├── config.xml │ └── dimens.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-sw720dp-port │ └── dimens.xml ├── values-sw720dp │ ├── config.xml │ ├── dimens.xml │ └── styles.xml ├── values-ta-rIN │ └── strings.xml ├── values-te-rIN │ └── strings.xml ├── values-th │ └── strings.xml ├── values-tl │ └── strings.xml ├── values-tr │ └── strings.xml ├── values-uk │ └── strings.xml ├── values-ur-rPK │ └── strings.xml ├── values-uz-rUZ │ └── strings.xml ├── values-v19 │ └── styles.xml ├── values-v21 │ └── styles.xml ├── values-v25 │ └── styles.xml ├── values-vi │ └── strings.xml ├── values-zh-rCN │ └── strings.xml ├── values-zh-rHK │ └── strings.xml ├── values-zh-rTW │ └── strings.xml ├── values-zu │ └── strings.xml ├── values │ ├── attrs.xml │ ├── colors.xml │ ├── config.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── xml │ ├── app_target_browser.xml │ ├── app_target_camera.xml │ ├── app_target_email.xml │ ├── app_target_gallery.xml │ ├── app_target_messenger.xml │ ├── app_target_phone.xml │ ├── backupscheme.xml │ ├── default_workspace_3x3.xml │ ├── default_workspace_4x4.xml │ ├── default_workspace_5x5.xml │ ├── default_workspace_5x6.xml │ ├── device_profiles.xml │ ├── dw_phone_hotseat.xml │ ├── dw_tablet_hotseat.xml │ └── launcher_preferences.xml ├── src └── com │ └── android │ └── launcher3 │ ├── Alarm.java │ ├── AllAppsList.java │ ├── AnotherWindowDropTarget.java │ ├── AppFilter.java │ ├── AppInfo.java │ ├── AppWidgetResizeFrame.java │ ├── AppWidgetsRestoredReceiver.java │ ├── AutoInstallsLayout.java │ ├── BaseContainerView.java │ ├── BaseRecyclerView.java │ ├── BaseRecyclerViewFastScrollBar.java │ ├── BaseRecyclerViewFastScrollPopup.java │ ├── BubbleTextView.java │ ├── ButtonDropTarget.java │ ├── CellLayout.java │ ├── CheckLongPressHelper.java │ ├── ClickShadowView.java │ ├── CommonAppTypeParser.java │ ├── CustomAppWidget.java │ ├── DefaultLayoutParser.java │ ├── DeferredHandler.java │ ├── DeleteDropTarget.java │ ├── DeviceProfile.java │ ├── DragSource.java │ ├── DropTarget.java │ ├── DropTargetBar.java │ ├── ExtendedEditText.java │ ├── FastBitmapDrawable.java │ ├── FirstFrameAnimatorHelper.java │ ├── FocusHelper.java │ ├── FolderInfo.java │ ├── HolographicOutlineHelper.java │ ├── Hotseat.java │ ├── IconCache.java │ ├── IconProvider.java │ ├── InfoDropTarget.java │ ├── Insettable.java │ ├── InsettableFrameLayout.java │ ├── InstallShortcutReceiver.java │ ├── InterruptibleInOutAnimator.java │ ├── InvariantDeviceProfile.java │ ├── ItemInfo.java │ ├── Launcher.java │ ├── LauncherAnimUtils.java │ ├── LauncherAppState.java │ ├── LauncherAppWidgetHost.java │ ├── LauncherAppWidgetHostView.java │ ├── LauncherAppWidgetInfo.java │ ├── LauncherAppWidgetProviderInfo.java │ ├── LauncherBackupAgent.java │ ├── LauncherCallbacks.java │ ├── LauncherClings.java │ ├── LauncherExterns.java │ ├── LauncherFiles.java │ ├── LauncherModel.java │ ├── LauncherProvider.java │ ├── LauncherProviderChangeListener.java │ ├── LauncherRootView.java │ ├── LauncherScroller.java │ ├── LauncherSettings.java │ ├── LauncherStateTransitionAnimation.java │ ├── LauncherTransitionable.java │ ├── LauncherViewPropertyAnimator.java │ ├── LogAccelerateInterpolator.java │ ├── LogDecelerateInterpolator.java │ ├── MainThreadExecutor.java │ ├── OnAlarmListener.java │ ├── PagedView.java │ ├── Partner.java │ ├── PendingAddItemInfo.java │ ├── PendingAppWidgetHostView.java │ ├── PinchAnimationManager.java │ ├── PinchThresholdManager.java │ ├── PinchToOverviewListener.java │ ├── PreloadIconDrawable.java │ ├── QsbBlockerView.java │ ├── QsbContainerView.java │ ├── SettingsActivity.java │ ├── ShortcutAndWidgetContainer.java │ ├── ShortcutInfo.java │ ├── SimpleOnStylusPressListener.java │ ├── StylusEventHelper.java │ ├── UninstallDropTarget.java │ ├── Utilities.java │ ├── WidgetPreviewLoader.java │ ├── Workspace.java │ ├── WorkspaceStateTransitionAnimation.java │ ├── accessibility │ ├── AccessibileDragListenerAdapter.java │ ├── DragAndDropAccessibilityDelegate.java │ ├── DragViewStateAnnouncer.java │ ├── FolderAccessibilityHelper.java │ ├── LauncherAccessibilityDelegate.java │ ├── OverviewAccessibilityDelegate.java │ ├── OverviewScreenAccessibilityDelegate.java │ ├── ShortcutMenuAccessibilityDelegate.java │ └── WorkspaceAccessibilityHelper.java │ ├── allapps │ ├── AllAppsBackgroundDrawable.java │ ├── AllAppsCaretController.java │ ├── AllAppsContainerView.java │ ├── AllAppsFastScrollHelper.java │ ├── AllAppsGridAdapter.java │ ├── AllAppsRecyclerView.java │ ├── AllAppsRecyclerViewContainerView.java │ ├── AllAppsSearchBarController.java │ ├── AllAppsTransitionController.java │ ├── AlphabeticalAppsList.java │ ├── DefaultAppSearchAlgorithm.java │ ├── DefaultAppSearchController.java │ ├── HeaderElevationController.java │ └── VerticalPullDetector.java │ ├── compat │ ├── AlphabeticIndexCompat.java │ ├── AppWidgetManagerCompat.java │ ├── AppWidgetManagerCompatV16.java │ ├── AppWidgetManagerCompatVL.java │ ├── DeferredLauncherActivityInfo.java │ ├── LauncherActivityInfoCompat.java │ ├── LauncherActivityInfoCompatV16.java │ ├── LauncherActivityInfoCompatVL.java │ ├── LauncherAppsCompat.java │ ├── LauncherAppsCompatV16.java │ ├── LauncherAppsCompatVL.java │ ├── PackageInstallerCompat.java │ ├── PackageInstallerCompatV16.java │ ├── PackageInstallerCompatVL.java │ ├── UserHandleCompat.java │ ├── UserManagerCompat.java │ ├── UserManagerCompatV16.java │ ├── UserManagerCompatV17.java │ ├── UserManagerCompatVL.java │ ├── UserManagerCompatVM.java │ ├── UserManagerCompatVN.java │ └── UserManagerCompatVNMr1.java │ ├── dragndrop │ ├── AnotherWindowDragSource.java │ ├── DragController.java │ ├── DragDriver.java │ ├── DragLayer.java │ ├── DragOptions.java │ ├── DragScroller.java │ ├── DragView.java │ ├── ExternalDragPreviewProvider.java │ └── SpringLoadedDragController.java │ ├── dynamicui │ ├── ColorExtractionService.java │ ├── ExtractedColors.java │ └── ExtractionUtils.java │ ├── folder │ ├── ClippedFolderIconLayoutRule.java │ ├── Folder.java │ ├── FolderIcon.java │ ├── FolderPagedView.java │ └── StackFolderIconLayoutRule.java │ ├── graphics │ ├── DragPreviewProvider.java │ ├── ShadowGenerator.java │ ├── TintedDrawableSpan.java │ └── TriangleShape.java │ ├── keyboard │ ├── FocusIndicatorHelper.java │ ├── FocusedItemDecorator.java │ └── ViewGroupFocusHelper.java │ ├── logging │ ├── FileLog.java │ ├── LoggerUtils.java │ └── UserEventDispatcher.java │ ├── model │ ├── AbstractUserComparator.java │ ├── AppNameComparator.java │ ├── GridSizeMigrationTask.java │ ├── PackageItemInfo.java │ ├── WidgetItem.java │ └── WidgetsModel.java │ ├── pageindicators │ ├── CaretDrawable.java │ ├── PageIndicator.java │ ├── PageIndicatorCaretLandscape.java │ ├── PageIndicatorDots.java │ └── PageIndicatorLineCaret.java │ ├── provider │ ├── ImportDataTask.java │ ├── LauncherDbUtils.java │ ├── LossyScreenMigrationTask.java │ └── RestoreDbTask.java │ ├── shortcuts │ ├── DeepShortcutManager.java │ ├── DeepShortcutTextView.java │ ├── DeepShortcutView.java │ ├── DeepShortcutsContainer.java │ ├── ShortcutCache.java │ ├── ShortcutDragPreviewProvider.java │ ├── ShortcutFilter.java │ ├── ShortcutInfoCompat.java │ └── ShortcutKey.java │ ├── testing │ ├── DummyWidget.java │ ├── LauncherExtension.java │ ├── MemoryDumpActivity.java │ ├── MemoryTracker.java │ ├── ToggleWeightWatcher.java │ └── WeightWatcher.java │ ├── util │ ├── ActivityResultInfo.java │ ├── CachedPackageTracker.java │ ├── CellAndSpan.java │ ├── CircleRevealOutlineProvider.java │ ├── ComponentKey.java │ ├── ConfigMonitor.java │ ├── CursorIconInfo.java │ ├── FlagOp.java │ ├── FlingAnimation.java │ ├── FocusLogic.java │ ├── GridOccupancy.java │ ├── IconNormalizer.java │ ├── ItemInfoMatcher.java │ ├── LauncherEdgeEffect.java │ ├── LongArrayMap.java │ ├── ManagedProfileHeuristic.java │ ├── MultiHashMap.java │ ├── MultiStateAlphaController.java │ ├── NoLocaleSqliteContext.java │ ├── PackageManagerHelper.java │ ├── ParcelableSparseArray.java │ ├── PendingRequestArgs.java │ ├── PillRevealOutlineProvider.java │ ├── PillWidthRevealOutlineProvider.java │ ├── Preconditions.java │ ├── RevealOutlineAnimation.java │ ├── SQLiteCacheHelper.java │ ├── StringFilter.java │ ├── TestingUtils.java │ ├── Thunk.java │ ├── TouchController.java │ ├── TransformingTouchDelegate.java │ ├── VerticalFlingDetector.java │ ├── ViewOnDrawExecutor.java │ └── WallpaperOffsetInterpolator.java │ └── widget │ ├── PendingAddShortcutInfo.java │ ├── PendingAddWidgetInfo.java │ ├── PendingItemPreviewProvider.java │ ├── WidgetCell.java │ ├── WidgetHostViewLoader.java │ ├── WidgetImageView.java │ ├── WidgetsContainerView.java │ ├── WidgetsListAdapter.java │ ├── WidgetsRecyclerView.java │ └── WidgetsRowViewHolder.java ├── src_config └── com │ └── android │ └── launcher3 │ └── config │ ├── FeatureFlags.java │ └── ProviderConfig.java └── tests ├── Android.mk ├── AndroidManifest.xml └── src └── com └── android └── launcher3 ├── BindWidgetTest.java ├── InvariantDeviceProfileTest.java ├── allapps └── DefaultAppSearchAlgorithmTest.java ├── logging └── FileLogTest.java ├── model └── GridSizeMigrationTaskTest.java ├── provider └── RestoreDbTaskTest.java ├── shortcuts └── ShortcutFilterTest.java ├── ui ├── AddWidgetTest.java ├── AllAppsAppLaunchTest.java ├── AllAppsIconToHomeTest.java ├── LauncherInstrumentationTestCase.java └── RotationPreferenceTest.java └── util ├── Condition.java ├── FocusLogicTest.java ├── GridOccupancyTest.java ├── TestLauncherProvider.java └── Wait.java /.gitignore: -------------------------------------------------------------------------------- 1 | db_files 2 | *.iml 3 | .project 4 | .classpath 5 | .project.properties 6 | gen/ 7 | tests/stress/gen/ 8 | WallpaperPicker/gen/ 9 | WallpaperPicker/.project.properties 10 | bin/ 11 | .idea/ 12 | .gradle/ 13 | local.properties 14 | gradle/ 15 | build/ 16 | gradlew* -------------------------------------------------------------------------------- /MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/MODULE_LICENSE_APACHE2 -------------------------------------------------------------------------------- /res/anim/discovery_bounce.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 23 | 24 | 31 | 38 | 45 | 46 | -------------------------------------------------------------------------------- /res/anim/no_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | -------------------------------------------------------------------------------- /res/anim/task_open_enter.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 28 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /res/animator-v21/overview_button_anim.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_all_apps_bg_hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_all_apps_bg_hand.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_allapps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_allapps.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_allapps_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_allapps_pressed.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_info_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_info_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_remove_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_remove_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_uninstall_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_uninstall_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_widget_resize_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/ic_widget_resize_handle.png -------------------------------------------------------------------------------- /res/drawable-hdpi/page_hover_left.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/page_hover_left.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/page_hover_left_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/page_hover_left_active.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/page_hover_right.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/page_hover_right.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/page_hover_right_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/page_hover_right_active.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/quantum_panel_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/quantum_panel_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/quantum_panel_dark_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/quantum_panel_dark_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/screenpanel.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/screenpanel.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/screenpanel_hover.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/screenpanel_hover.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/virtual_preload.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/virtual_preload.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/virtual_preload_folder.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/virtual_preload_folder.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/widget_resize_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/widget_resize_frame.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/widget_resize_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/widget_resize_shadow.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/widget_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/widget_tile.png -------------------------------------------------------------------------------- /res/drawable-hdpi/workspace_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-hdpi/workspace_bg.9.png -------------------------------------------------------------------------------- /res/drawable-ldrtl/container_fastscroll_popup_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 23 | 27 | -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_all_apps_bg_hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_all_apps_bg_hand.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_allapps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_allapps.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_allapps_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_allapps_pressed.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_info_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_info_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_remove_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_remove_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_uninstall_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_uninstall_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_widget_resize_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/ic_widget_resize_handle.png -------------------------------------------------------------------------------- /res/drawable-mdpi/page_hover_left.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/page_hover_left.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/page_hover_left_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/page_hover_left_active.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/page_hover_right.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/page_hover_right.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/page_hover_right_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/page_hover_right_active.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/quantum_panel_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/quantum_panel_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/quantum_panel_dark_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/quantum_panel_dark_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/screenpanel.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/screenpanel.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/screenpanel_hover.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/screenpanel_hover.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/virtual_preload.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/virtual_preload.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/virtual_preload_folder.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/virtual_preload_folder.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/widget_resize_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/widget_resize_frame.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/widget_resize_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/widget_resize_shadow.9.png -------------------------------------------------------------------------------- /res/drawable-mdpi/widget_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/widget_tile.png -------------------------------------------------------------------------------- /res/drawable-mdpi/workspace_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-mdpi/workspace_bg.9.png -------------------------------------------------------------------------------- /res/drawable-v21/quantum_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | -------------------------------------------------------------------------------- /res/drawable-v21/quantum_panel_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_all_apps_bg_hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_all_apps_bg_hand.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_allapps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_allapps.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_allapps_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_allapps_pressed.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_info_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_info_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_remove_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_remove_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_uninstall_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_uninstall_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_widget_resize_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/ic_widget_resize_handle.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/page_hover_left.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/page_hover_left.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/page_hover_left_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/page_hover_left_active.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/page_hover_right.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/page_hover_right.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/page_hover_right_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/page_hover_right_active.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/quantum_panel_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/quantum_panel_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/quantum_panel_dark_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/quantum_panel_dark_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/screenpanel.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/screenpanel.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/screenpanel_hover.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/screenpanel_hover.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/virtual_preload.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/virtual_preload.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/virtual_preload_folder.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/virtual_preload_folder.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/widget_resize_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/widget_resize_frame.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/widget_resize_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/widget_resize_shadow.9.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/widget_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/widget_tile.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/workspace_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xhdpi/workspace_bg.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_all_apps_bg_hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_all_apps_bg_hand.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_allapps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_allapps.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_allapps_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_allapps_pressed.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_info_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_info_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_remove_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_remove_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_uninstall_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_uninstall_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_widget_resize_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/ic_widget_resize_handle.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/page_hover_left.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/page_hover_left.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/page_hover_left_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/page_hover_left_active.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/page_hover_right.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/page_hover_right.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/page_hover_right_active.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/page_hover_right_active.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/quantum_panel_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/quantum_panel_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/quantum_panel_dark_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/quantum_panel_dark_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/screenpanel.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/screenpanel.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/screenpanel_hover.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/screenpanel_hover.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/virtual_preload.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/virtual_preload.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/virtual_preload_folder.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/virtual_preload_folder.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/widget_resize_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/widget_resize_frame.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/widget_resize_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/widget_resize_shadow.9.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/widget_tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/widget_tile.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/workspace_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxhdpi/workspace_bg.9.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_all_apps_bg_hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/ic_all_apps_bg_hand.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_info_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/ic_info_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_remove_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/ic_remove_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_uninstall_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/ic_uninstall_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/ic_widget_resize_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/ic_widget_resize_handle.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/quantum_panel_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/quantum_panel_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/quantum_panel_dark_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/quantum_panel_dark_bitmap.9.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/widget_resize_frame.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/widget_resize_frame.9.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/widget_resize_shadow.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/widget_resize_shadow.9.png -------------------------------------------------------------------------------- /res/drawable-xxxhdpi/workspace_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/drawable-xxxhdpi/workspace_bg.9.png -------------------------------------------------------------------------------- /res/drawable/all_apps_button_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /res/drawable/all_apps_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /res/drawable/all_apps_search_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /res/drawable/all_apps_search_hint.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /res/drawable/bg_celllayout.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /res/drawable/bg_pill_focused.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /res/drawable/bg_screenpanel.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /res/drawable/bg_white_pill.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /res/drawable/container_fastscroll_popup_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 23 | 27 | -------------------------------------------------------------------------------- /res/drawable/deep_shortcuts_drag_handle.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /res/drawable/ic_all_apps_bg_icon_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 27 | 31 | -------------------------------------------------------------------------------- /res/drawable/ic_all_apps_bg_icon_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 28 | 33 | -------------------------------------------------------------------------------- /res/drawable/ic_all_apps_bg_icon_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 28 | 33 | 36 | 37 | -------------------------------------------------------------------------------- /res/drawable/ic_all_apps_bg_icon_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 27 | 31 | 34 | -------------------------------------------------------------------------------- /res/drawable/ic_allapps_search.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /res/drawable/ic_setting.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /res/drawable/ic_wallpaper.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /res/drawable/ic_widget.xml: -------------------------------------------------------------------------------- 1 | 16 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /res/drawable/quantum_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | -------------------------------------------------------------------------------- /res/drawable/quantum_panel_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | -------------------------------------------------------------------------------- /res/drawable/quantum_panel_shape.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | -------------------------------------------------------------------------------- /res/drawable/quantum_panel_shape_dark.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /res/drawable/widget_internal_focus_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /res/drawable/widgets_row_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /res/interpolator/decelerate_quart.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | -------------------------------------------------------------------------------- /res/interpolator/decelerate_quint.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | -------------------------------------------------------------------------------- /res/interpolator/disco_bounce_section1.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /res/interpolator/disco_bounce_section2.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /res/interpolator/disco_bounce_section3.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /res/layout/all_apps_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /res/layout/all_apps_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /res/layout/all_apps_empty_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 31 | 32 | -------------------------------------------------------------------------------- /res/layout/all_apps_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 27 | 28 | -------------------------------------------------------------------------------- /res/layout/all_apps_search_divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /res/layout/all_apps_search_market.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 31 | -------------------------------------------------------------------------------- /res/layout/app_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /res/layout/appwidget_error.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 27 | -------------------------------------------------------------------------------- /res/layout/appwidget_not_ready.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 21 | -------------------------------------------------------------------------------- /res/layout/deep_shortcut.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 23 | 24 | 31 | 32 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /res/layout/deep_shortcuts_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 28 | 29 | -------------------------------------------------------------------------------- /res/layout/folder_application.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /res/layout/folder_icon.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 23 | 29 | 30 | -------------------------------------------------------------------------------- /res/layout/hotseat.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 19 | 24 | 25 | -------------------------------------------------------------------------------- /res/layout/page_indicator.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 27 | 28 | -------------------------------------------------------------------------------- /res/layout/qsb_blocker_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | -------------------------------------------------------------------------------- /res/layout/qsb_container.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 24 | 25 | 30 | -------------------------------------------------------------------------------- /res/layout/workspace_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 23 | -------------------------------------------------------------------------------- /res/layout/zzz_dummy_widget.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 28 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /res/layout/zzz_weight_watcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /res/mipmap-hdpi/ic_launcher_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/mipmap-hdpi/ic_launcher_home.png -------------------------------------------------------------------------------- /res/mipmap-mdpi/ic_launcher_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/mipmap-mdpi/ic_launcher_home.png -------------------------------------------------------------------------------- /res/mipmap-xhdpi/ic_launcher_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/mipmap-xhdpi/ic_launcher_home.png -------------------------------------------------------------------------------- /res/mipmap-xxhdpi/ic_launcher_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_packages_apps_Launcher3/74d3aa723c702c2e8e969f1f6071ca9e14e15d77/res/mipmap-xxhdpi/ic_launcher_home.png -------------------------------------------------------------------------------- /res/values-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 12% 20 | 21 | -------------------------------------------------------------------------------- /res/values-sw340dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 20dp 22 | 16sp 23 | 24 | -------------------------------------------------------------------------------- /res/values-sw600dp/config.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | true 4 | 5 | -------------------------------------------------------------------------------- /res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 0dp 20 | 26sp 21 | 850dp 22 | 525dp 23 | 24 | 25 | 56dp 26 | 27 | 28 | -1000dp 29 | 30 | -------------------------------------------------------------------------------- /res/values-sw720dp-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 20 | 100dip 21 | 22 | -------------------------------------------------------------------------------- /res/values-sw720dp-port/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 40dp 22 | 23 | -------------------------------------------------------------------------------- /res/values-sw720dp/config.xml: -------------------------------------------------------------------------------- 1 | 2 | true 3 | true 4 | 5 | 6 | 7 | 90 8 | 9 | 10 | false 11 | 12 | -------------------------------------------------------------------------------- /res/values-sw720dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 8dp 20 | 54dp 21 | 64dp 22 | 180dp 23 | 24 | 25 | -------------------------------------------------------------------------------- /res/values-sw720dp/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 29 | 30 | 31 | 39 | 40 | -------------------------------------------------------------------------------- /res/values-v19/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 25 | 26 | -------------------------------------------------------------------------------- /res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 28 | 29 | -------------------------------------------------------------------------------- /res/values-v25/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 24 | 25 | -------------------------------------------------------------------------------- /res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | #FFC1C1C1 24 | #FFF0592B 25 | 26 | #80c6c5c5 27 | 28 | #FFF 29 | 30 | #FFFFFFFF 31 | #FF757575 32 | #FFDDDDDD 33 | 34 | #FF666666 35 | #FFF5F5F5 36 | 37 | #FFFFFFFF 38 | #1E000000 39 | #FFFFFFFF 40 | #22000000 41 | #FFF2F2F2 42 | #28000000 43 | 44 | #40FFFFFF 45 | #FFF 46 | 47 | 48 | #FFFFFF 49 | #C4C4C4 50 | 51 | 52 | #FF37474F 53 | 54 | -------------------------------------------------------------------------------- /res/xml/app_target_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/xml/app_target_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/xml/app_target_email.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/xml/app_target_gallery.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /res/xml/app_target_messenger.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /res/xml/app_target_phone.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /res/xml/backupscheme.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /res/xml/default_workspace_4x4.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 35 | 36 | 37 | 38 | 39 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /res/xml/default_workspace_5x5.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /res/xml/default_workspace_5x6.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /res/xml/launcher_preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/com/android/launcher3/AnotherWindowDropTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | import android.content.Context; 20 | import android.graphics.PointF; 21 | import android.graphics.Rect; 22 | 23 | /** 24 | * Drop target used when another window (i.e. another process) has accepted a global system drag. 25 | * If the accepted item was a shortcut, we delete it from Launcher. 26 | */ 27 | public class AnotherWindowDropTarget implements DropTarget { 28 | final Launcher mLauncher; 29 | 30 | public AnotherWindowDropTarget (Context context) { mLauncher = (Launcher) context; } 31 | 32 | @Override 33 | public boolean isDropEnabled() { return true; } 34 | 35 | @Override 36 | public void onDrop(DragObject dragObject) { 37 | dragObject.deferDragViewCleanupPostAnimation = false; 38 | LauncherModel.deleteItemFromDatabase(mLauncher, (ShortcutInfo) dragObject.dragInfo); 39 | } 40 | 41 | @Override 42 | public void onDragEnter(DragObject dragObject) {} 43 | 44 | @Override 45 | public void onDragOver(DragObject dragObject) {} 46 | 47 | @Override 48 | public void onDragExit(DragObject dragObject) {} 49 | 50 | @Override 51 | public void onFlingToDelete(DragObject dragObject, PointF vec) {} 52 | 53 | @Override 54 | public boolean acceptDrop(DragObject dragObject) { 55 | return dragObject.dragInfo instanceof ShortcutInfo; 56 | } 57 | 58 | @Override 59 | public void prepareAccessibilityDrop() {} 60 | 61 | // These methods are implemented in Views 62 | @Override 63 | public void getHitRectRelativeToDragLayer(Rect outRect) {} 64 | } 65 | -------------------------------------------------------------------------------- /src/com/android/launcher3/AppFilter.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import android.content.ComponentName; 4 | import android.text.TextUtils; 5 | import android.util.Log; 6 | 7 | public abstract class AppFilter { 8 | 9 | private static final boolean DBG = false; 10 | private static final String TAG = "AppFilter"; 11 | 12 | public abstract boolean shouldShowApp(ComponentName app); 13 | 14 | public static AppFilter loadByName(String className) { 15 | if (TextUtils.isEmpty(className)) return null; 16 | if (DBG) Log.d(TAG, "Loading AppFilter: " + className); 17 | try { 18 | Class cls = Class.forName(className); 19 | return (AppFilter) cls.newInstance(); 20 | } catch (ClassNotFoundException e) { 21 | Log.e(TAG, "Bad AppFilter class", e); 22 | return null; 23 | } catch (InstantiationException e) { 24 | Log.e(TAG, "Bad AppFilter class", e); 25 | return null; 26 | } catch (IllegalAccessException e) { 27 | Log.e(TAG, "Bad AppFilter class", e); 28 | return null; 29 | } catch (ClassCastException e) { 30 | Log.e(TAG, "Bad AppFilter class", e); 31 | return null; 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/com/android/launcher3/CustomAppWidget.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | public interface CustomAppWidget { 4 | public String getLabel(); 5 | public int getPreviewImage(); 6 | public int getIcon(); 7 | public int getWidgetLayout(); 8 | 9 | public int getSpanX(); 10 | public int getSpanY(); 11 | public int getMinSpanX(); 12 | public int getMinSpanY(); 13 | public int getResizeMode(); 14 | } 15 | -------------------------------------------------------------------------------- /src/com/android/launcher3/DragSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | import android.view.View; 20 | 21 | import com.android.launcher3.DropTarget.DragObject; 22 | import com.android.launcher3.logging.UserEventDispatcher.LaunchSourceProvider; 23 | 24 | /** 25 | * Interface defining an object that can originate a drag. 26 | */ 27 | public interface DragSource extends LaunchSourceProvider { 28 | 29 | /** 30 | * @return whether items dragged from this source supports 31 | */ 32 | boolean supportsFlingToDelete(); 33 | 34 | /** 35 | * @return whether items dragged from this source supports 'App Info' 36 | */ 37 | boolean supportsAppInfoDropTarget(); 38 | 39 | /** 40 | * @return whether items dragged from this source supports 'Delete' drop target (e.g. to remove 41 | * a shortcut.) If this returns false, the drop target will say "Cancel" instead of "Remove." 42 | */ 43 | boolean supportsDeleteDropTarget(); 44 | 45 | /* 46 | * @return the scale of the icons over the workspace icon size 47 | */ 48 | float getIntrinsicIconScaleFactor(); 49 | 50 | /** 51 | * A callback specifically made back to the source after an item from this source has been flung 52 | * to be deleted on a DropTarget. In such a situation, this method will be called after 53 | * onDropCompleted, and more importantly, after the fling animation has completed. 54 | */ 55 | void onFlingToDeleteCompleted(); 56 | 57 | /** 58 | * A callback made back to the source after an item from this source has been dropped on a 59 | * DropTarget. 60 | */ 61 | void onDropCompleted(View target, DragObject d, boolean isFlingToDelete, boolean success); 62 | } 63 | -------------------------------------------------------------------------------- /src/com/android/launcher3/IconProvider.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import android.content.Context; 4 | import android.graphics.drawable.Drawable; 5 | import android.text.TextUtils; 6 | import android.util.Log; 7 | 8 | import com.android.launcher3.compat.LauncherActivityInfoCompat; 9 | 10 | import java.lang.reflect.InvocationTargetException; 11 | import java.util.Locale; 12 | 13 | public class IconProvider { 14 | 15 | private static final boolean DBG = false; 16 | private static final String TAG = "IconProvider"; 17 | 18 | protected String mSystemState; 19 | 20 | public IconProvider() { 21 | updateSystemStateString(); 22 | } 23 | 24 | public static IconProvider loadByName(String className, Context context) { 25 | if (TextUtils.isEmpty(className)) return new IconProvider(); 26 | if (DBG) Log.d(TAG, "Loading IconProvider: " + className); 27 | try { 28 | Class cls = Class.forName(className); 29 | return (IconProvider) cls.getDeclaredConstructor(Context.class).newInstance(context); 30 | } catch (ClassNotFoundException | InstantiationException | IllegalAccessException 31 | | ClassCastException | NoSuchMethodException | InvocationTargetException e) { 32 | Log.e(TAG, "Bad IconProvider class", e); 33 | return new IconProvider(); 34 | } 35 | } 36 | 37 | public void updateSystemStateString() { 38 | mSystemState = Locale.getDefault().toString(); 39 | } 40 | 41 | public String getIconSystemState(String packageName) { 42 | return mSystemState; 43 | } 44 | 45 | 46 | public Drawable getIcon(LauncherActivityInfoCompat info, int iconDpi) { 47 | return info.getIcon(iconDpi); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/com/android/launcher3/Insettable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | import android.graphics.Rect; 20 | 21 | /** 22 | * Allows the implementing {@link View} to not draw underneath system bars. 23 | * e.g., notification bar on top and home key area on the bottom. 24 | */ 25 | public interface Insettable { 26 | 27 | void setInsets(Rect insets); 28 | } -------------------------------------------------------------------------------- /src/com/android/launcher3/LauncherBackupAgent.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import android.app.backup.BackupAgent; 4 | import android.app.backup.BackupDataInput; 5 | import android.app.backup.BackupDataOutput; 6 | import android.os.ParcelFileDescriptor; 7 | 8 | import com.android.launcher3.provider.RestoreDbTask; 9 | 10 | public class LauncherBackupAgent extends BackupAgent { 11 | 12 | @Override 13 | public void onRestore( 14 | BackupDataInput data, int appVersionCode, ParcelFileDescriptor newState) { 15 | // Doesn't do incremental backup/restore 16 | } 17 | 18 | @Override 19 | public void onBackup( 20 | ParcelFileDescriptor oldState, BackupDataOutput data, ParcelFileDescriptor newState) { 21 | // Doesn't do incremental backup/restore 22 | } 23 | 24 | @Override 25 | public void onRestoreFinished() { 26 | RestoreDbTask.setPending(this, true); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LauncherClings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | import android.content.Context; 20 | 21 | @Deprecated 22 | public class LauncherClings { 23 | private static final String WORKSPACE_CLING_DISMISSED_KEY = "cling_gel.workspace.dismissed"; 24 | 25 | public static void markFirstRunClingDismissed(Context ctx) { 26 | Utilities.getPrefs(ctx).edit() 27 | .putBoolean(WORKSPACE_CLING_DISMISSED_KEY, true) 28 | .apply(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LauncherExterns.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | import android.content.SharedPreferences; 20 | 21 | /** 22 | * This interface defines the set of methods that the Launcher activity exposes. Methods 23 | * here should be safe to call from classes outside of com.android.launcher3.* 24 | */ 25 | public interface LauncherExterns { 26 | 27 | public boolean setLauncherCallbacks(LauncherCallbacks callbacks); 28 | 29 | public SharedPreferences getSharedPrefs(); 30 | 31 | public void setLauncherOverlay(Launcher.LauncherOverlay overlay); 32 | 33 | void clearTypedText(); 34 | } 35 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LauncherFiles.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import java.util.Arrays; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | /** 8 | * Central list of files the Launcher writes to the application data directory. 9 | * 10 | * To add a new Launcher file, create a String constant referring to the filename, and add it to 11 | * ALL_FILES, as shown below. 12 | */ 13 | public class LauncherFiles { 14 | 15 | private static final String XML = ".xml"; 16 | 17 | public static final String LAUNCHER_DB = "launcher.db"; 18 | public static final String SHARED_PREFERENCES_KEY = "com.android.launcher3.prefs"; 19 | public static final String MANAGED_USER_PREFERENCES_KEY = "com.android.launcher3.managedusers.prefs"; 20 | // This preference file is not backed up to cloud. 21 | public static final String DEVICE_PREFERENCES_KEY = "com.android.launcher3.device.prefs"; 22 | 23 | public static final String WIDGET_PREVIEWS_DB = "widgetpreviews.db"; 24 | public static final String APP_ICONS_DB = "app_icons.db"; 25 | 26 | public static final List ALL_FILES = Collections.unmodifiableList(Arrays.asList( 27 | LAUNCHER_DB, 28 | SHARED_PREFERENCES_KEY + XML, 29 | WIDGET_PREVIEWS_DB, 30 | MANAGED_USER_PREFERENCES_KEY + XML, 31 | DEVICE_PREFERENCES_KEY + XML, 32 | APP_ICONS_DB)); 33 | } 34 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LauncherProviderChangeListener.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | /** 4 | * This class is a listener for {@link LauncherProvider} changes. It gets notified in the 5 | * sendNotify method. This listener is needed because by default the Launcher suppresses 6 | * standard data change callbacks. 7 | */ 8 | public interface LauncherProviderChangeListener { 9 | 10 | public void onLauncherProviderChange(); 11 | 12 | public void onExtractedColorsChanged(); 13 | } 14 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LauncherTransitionable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | /** 20 | * An interface to get callbacks during a launcher transition. 21 | */ 22 | public interface LauncherTransitionable { 23 | void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean multiplePagesVisible); 24 | void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace); 25 | void onLauncherTransitionStep(Launcher l, float t); 26 | void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace); 27 | } 28 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LogAccelerateInterpolator.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import android.animation.TimeInterpolator; 4 | 5 | public class LogAccelerateInterpolator implements TimeInterpolator { 6 | 7 | int mBase; 8 | int mDrift; 9 | final float mLogScale; 10 | 11 | public LogAccelerateInterpolator(int base, int drift) { 12 | mBase = base; 13 | mDrift = drift; 14 | mLogScale = 1f / computeLog(1, mBase, mDrift); 15 | } 16 | 17 | static float computeLog(float t, int base, int drift) { 18 | return (float) -Math.pow(base, -t) + 1 + (drift * t); 19 | } 20 | 21 | @Override 22 | public float getInterpolation(float t) { 23 | // Due to rounding issues, the interpolation doesn't quite reach 1 even though it should. 24 | // To account for this, we short-circuit to return 1 if the input is 1. 25 | return Float.compare(t, 1f) == 0 ? 1f : 1 - computeLog(1 - t, mBase, mDrift) * mLogScale; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/android/launcher3/LogDecelerateInterpolator.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import android.animation.TimeInterpolator; 4 | 5 | public class LogDecelerateInterpolator implements TimeInterpolator { 6 | 7 | int mBase; 8 | int mDrift; 9 | final float mLogScale; 10 | 11 | public LogDecelerateInterpolator(int base, int drift) { 12 | mBase = base; 13 | mDrift = drift; 14 | 15 | mLogScale = 1f / computeLog(1, mBase, mDrift); 16 | } 17 | 18 | static float computeLog(float t, int base, int drift) { 19 | return (float) -Math.pow(base, -t) + 1 + (drift * t); 20 | } 21 | 22 | @Override 23 | public float getInterpolation(float t) { 24 | // Due to rounding issues, the interpolation doesn't quite reach 1 even though it should. 25 | // To account for this, we short-circuit to return 1 if the input is 1. 26 | return Float.compare(t, 1f) == 0 ? 1f : computeLog(t, mBase, mDrift) * mLogScale; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/com/android/launcher3/OnAlarmListener.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | public interface OnAlarmListener { 4 | public void onAlarm(Alarm alarm); 5 | } 6 | -------------------------------------------------------------------------------- /src/com/android/launcher3/PendingAddItemInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3; 18 | 19 | import android.content.ComponentName; 20 | 21 | /** 22 | * Meta data that is used for deferred binding. 23 | * e.g., this object is used to pass information on dragable targets when they are dropped onto 24 | * the workspace from another container. 25 | */ 26 | public class PendingAddItemInfo extends ItemInfo { 27 | 28 | /** 29 | * The component that will be created. 30 | */ 31 | public ComponentName componentName; 32 | 33 | @Override 34 | protected String dumpProperties() { 35 | return super.dumpProperties() + " componentName=" + componentName; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/android/launcher3/SimpleOnStylusPressListener.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3; 2 | 3 | import android.view.MotionEvent; 4 | import android.view.View; 5 | 6 | import com.android.launcher3.StylusEventHelper.StylusButtonListener; 7 | 8 | /** 9 | * Simple listener that performs a long click on the view after a stylus button press. 10 | */ 11 | public class SimpleOnStylusPressListener implements StylusButtonListener { 12 | private View mView; 13 | 14 | public SimpleOnStylusPressListener(View view) { 15 | mView = view; 16 | } 17 | 18 | public boolean onPressed(MotionEvent event) { 19 | return mView.isLongClickable() && mView.performLongClick(); 20 | } 21 | 22 | public boolean onReleased(MotionEvent event) { 23 | return false; 24 | } 25 | } -------------------------------------------------------------------------------- /src/com/android/launcher3/accessibility/FolderAccessibilityHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.accessibility; 18 | 19 | import com.android.launcher3.CellLayout; 20 | import com.android.launcher3.folder.FolderPagedView; 21 | import com.android.launcher3.R; 22 | 23 | /** 24 | * Implementation of {@link DragAndDropAccessibilityDelegate} to support DnD in a folder. 25 | */ 26 | public class FolderAccessibilityHelper extends DragAndDropAccessibilityDelegate { 27 | 28 | /** 29 | * 0-index position for the first cell in {@link #mView} in {@link #mParent}. 30 | */ 31 | private final int mStartPosition; 32 | 33 | private final FolderPagedView mParent; 34 | 35 | public FolderAccessibilityHelper(CellLayout layout) { 36 | super(layout); 37 | mParent = (FolderPagedView) layout.getParent(); 38 | 39 | int index = mParent.indexOfChild(layout); 40 | mStartPosition = index * layout.getCountX() * layout.getCountY(); 41 | } 42 | @Override 43 | protected int intersectsValidDropTarget(int id) { 44 | return Math.min(id, mParent.getAllocatedContentSize() - mStartPosition - 1); 45 | } 46 | 47 | @Override 48 | protected String getLocationDescriptionForIconDrop(int id) { 49 | return mContext.getString(R.string.move_to_position, id + mStartPosition + 1); 50 | } 51 | 52 | @Override 53 | protected String getConfirmationForIconDrop(int id) { 54 | return mContext.getString(R.string.item_moved); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/android/launcher3/allapps/DefaultAppSearchController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.android.launcher3.allapps; 17 | 18 | /** 19 | * The default search controller. 20 | */ 21 | public class DefaultAppSearchController extends AllAppsSearchBarController { 22 | 23 | public DefaultAppSearchAlgorithm onInitializeSearch() { 24 | return new DefaultAppSearchAlgorithm(mApps.getApps()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/LauncherActivityInfoCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import android.content.ComponentName; 20 | import android.content.Context; 21 | import android.content.pm.ApplicationInfo; 22 | import android.content.pm.ResolveInfo; 23 | import android.graphics.drawable.Drawable; 24 | 25 | public abstract class LauncherActivityInfoCompat { 26 | 27 | LauncherActivityInfoCompat() { 28 | } 29 | 30 | public abstract ComponentName getComponentName(); 31 | public abstract UserHandleCompat getUser(); 32 | public abstract CharSequence getLabel(); 33 | public abstract Drawable getIcon(int density); 34 | public abstract ApplicationInfo getApplicationInfo(); 35 | public abstract long getFirstInstallTime(); 36 | 37 | /** 38 | * Creates a LauncherActivityInfoCompat for the primary user. 39 | */ 40 | public static LauncherActivityInfoCompat fromResolveInfo(ResolveInfo info, Context context) { 41 | return new LauncherActivityInfoCompatV16(context, info); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/LauncherActivityInfoCompatVL.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import android.annotation.TargetApi; 20 | import android.content.ComponentName; 21 | import android.content.pm.ApplicationInfo; 22 | import android.content.pm.LauncherActivityInfo; 23 | import android.graphics.drawable.Drawable; 24 | import android.os.Build; 25 | 26 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 27 | public class LauncherActivityInfoCompatVL extends LauncherActivityInfoCompat { 28 | private LauncherActivityInfo mLauncherActivityInfo; 29 | 30 | LauncherActivityInfoCompatVL(LauncherActivityInfo launcherActivityInfo) { 31 | super(); 32 | mLauncherActivityInfo = launcherActivityInfo; 33 | } 34 | 35 | public ComponentName getComponentName() { 36 | return mLauncherActivityInfo.getComponentName(); 37 | } 38 | 39 | public UserHandleCompat getUser() { 40 | return UserHandleCompat.fromUser(mLauncherActivityInfo.getUser()); 41 | } 42 | 43 | public CharSequence getLabel() { 44 | return mLauncherActivityInfo.getLabel(); 45 | } 46 | 47 | public Drawable getIcon(int density) { 48 | return mLauncherActivityInfo.getIcon(density); 49 | } 50 | 51 | public ApplicationInfo getApplicationInfo() { 52 | return mLauncherActivityInfo.getApplicationInfo(); 53 | } 54 | 55 | public long getFirstInstallTime() { 56 | return mLauncherActivityInfo.getFirstInstallTime(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/PackageInstallerCompatV16.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import java.util.HashMap; 20 | 21 | public class PackageInstallerCompatV16 extends PackageInstallerCompat { 22 | 23 | PackageInstallerCompatV16() { } 24 | 25 | @Override 26 | public void onStop() { } 27 | 28 | @Override 29 | public HashMap updateAndGetActiveSessionCache() { 30 | return new HashMap<>(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/UserManagerCompatV16.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import java.util.ArrayList; 20 | import java.util.List; 21 | 22 | public class UserManagerCompatV16 extends UserManagerCompat { 23 | 24 | UserManagerCompatV16() { 25 | } 26 | 27 | public List getUserProfiles() { 28 | List profiles = new ArrayList(1); 29 | profiles.add(UserHandleCompat.myUserHandle()); 30 | return profiles; 31 | } 32 | 33 | public UserHandleCompat getUserForSerialNumber(long serialNumber) { 34 | return UserHandleCompat.myUserHandle(); 35 | } 36 | 37 | public long getSerialNumberForUser(UserHandleCompat user) { 38 | return 0; 39 | } 40 | 41 | public CharSequence getBadgedLabelForUser(CharSequence label, UserHandleCompat user) { 42 | return label; 43 | } 44 | 45 | @Override 46 | public long getUserCreationTime(UserHandleCompat user) { 47 | return 0; 48 | } 49 | 50 | @Override 51 | public void enableAndResetCache() { 52 | } 53 | 54 | @Override 55 | public boolean isQuietModeEnabled(UserHandleCompat user) { 56 | return false; 57 | } 58 | 59 | @Override 60 | public boolean isUserUnlocked(UserHandleCompat user) { 61 | return true; 62 | } 63 | 64 | @Override 65 | public boolean isDemoUser() { 66 | return false; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/UserManagerCompatVM.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import android.annotation.TargetApi; 20 | import android.content.Context; 21 | import android.os.Build; 22 | 23 | @TargetApi(Build.VERSION_CODES.M) 24 | public class UserManagerCompatVM extends UserManagerCompatVL { 25 | 26 | UserManagerCompatVM(Context context) { 27 | super(context); 28 | } 29 | 30 | @Override 31 | public long getUserCreationTime(UserHandleCompat user) { 32 | return mUserManager.getUserCreationTime(user.getUser()); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/UserManagerCompatVN.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import android.annotation.TargetApi; 20 | import android.content.Context; 21 | import android.os.Build; 22 | 23 | import com.android.launcher3.Utilities; 24 | 25 | @TargetApi(Build.VERSION_CODES.N) 26 | public class UserManagerCompatVN extends UserManagerCompatVM { 27 | 28 | UserManagerCompatVN(Context context) { 29 | super(context); 30 | } 31 | 32 | @Override 33 | public boolean isQuietModeEnabled(UserHandleCompat user) { 34 | return mUserManager.isQuietModeEnabled(user.getUser()); 35 | } 36 | 37 | @Override 38 | public boolean isUserUnlocked(UserHandleCompat user) { 39 | return mUserManager.isUserUnlocked(user.getUser()); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/com/android/launcher3/compat/UserManagerCompatVNMr1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.compat; 18 | 19 | import android.annotation.TargetApi; 20 | import android.content.Context; 21 | import android.os.Build; 22 | 23 | @TargetApi(Build.VERSION_CODES.N_MR1) 24 | public class UserManagerCompatVNMr1 extends UserManagerCompatVN { 25 | 26 | UserManagerCompatVNMr1(Context context) { 27 | super(context); 28 | } 29 | 30 | @Override 31 | public boolean isDemoUser() { 32 | return mUserManager.isDemoUser(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/com/android/launcher3/dragndrop/DragScroller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.dragndrop; 18 | 19 | /** 20 | * Handles scrolling while dragging 21 | * 22 | */ 23 | public interface DragScroller { 24 | void scrollLeft(); 25 | void scrollRight(); 26 | 27 | /** 28 | * The touch point has entered the scroll area; a scroll is imminent. 29 | * This event will only occur while a drag is active. 30 | * 31 | * @param direction The scroll direction 32 | */ 33 | boolean onEnterScrollArea(int x, int y, int direction); 34 | 35 | /** 36 | * The touch point has left the scroll area. 37 | * NOTE: This may not be called, if a drop occurs inside the scroll area. 38 | */ 39 | boolean onExitScrollArea(); 40 | } 41 | -------------------------------------------------------------------------------- /src/com/android/launcher3/graphics/TintedDrawableSpan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.android.launcher3.graphics; 17 | 18 | import android.content.Context; 19 | import android.graphics.Canvas; 20 | import android.graphics.Paint; 21 | import android.graphics.Paint.FontMetricsInt; 22 | import android.graphics.drawable.Drawable; 23 | import android.text.style.DynamicDrawableSpan; 24 | 25 | /** 26 | * {@link DynamicDrawableSpan} which draws a drawable tinted with the current paint color. 27 | */ 28 | public class TintedDrawableSpan extends DynamicDrawableSpan { 29 | 30 | private final Drawable mDrawable; 31 | private int mOldTint; 32 | 33 | public TintedDrawableSpan(Context context, int resourceId) { 34 | super(ALIGN_BOTTOM); 35 | mDrawable = context.getDrawable(resourceId); 36 | mOldTint = 0; 37 | } 38 | 39 | @Override 40 | public int getSize(Paint paint, CharSequence text, int start, int end, FontMetricsInt fm) { 41 | fm = fm == null ? paint.getFontMetricsInt() : fm; 42 | int iconSize = fm.bottom - fm.top; 43 | mDrawable.setBounds(0, 0, iconSize, iconSize); 44 | return super.getSize(paint, text, start, end, fm); 45 | } 46 | 47 | @Override 48 | public void draw(Canvas canvas, CharSequence text, 49 | int start, int end, float x, int top, int y, int bottom, Paint paint) { 50 | int color = paint.getColor(); 51 | if (mOldTint != color) { 52 | mOldTint = color; 53 | mDrawable.setTint(mOldTint); 54 | } 55 | super.draw(canvas, text, start, end, x, top, y, bottom, paint); 56 | } 57 | 58 | @Override 59 | public Drawable getDrawable() { 60 | return mDrawable; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/com/android/launcher3/graphics/TriangleShape.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.graphics; 18 | 19 | import android.graphics.Outline; 20 | import android.graphics.Path; 21 | import android.graphics.drawable.shapes.PathShape; 22 | import android.support.annotation.NonNull; 23 | 24 | /** 25 | * Wrapper around {@link android.graphics.drawable.shapes.PathShape} 26 | * that creates a shape with a triangular path (pointing up or down). 27 | */ 28 | public class TriangleShape extends PathShape { 29 | private Path mTriangularPath; 30 | 31 | public TriangleShape(Path path, float stdWidth, float stdHeight) { 32 | super(path, stdWidth, stdHeight); 33 | mTriangularPath = path; 34 | } 35 | 36 | public static TriangleShape create(float width, float height, boolean isPointingUp) { 37 | Path triangularPath = new Path(); 38 | if (isPointingUp) { 39 | triangularPath.moveTo(0, height); 40 | triangularPath.lineTo(width, height); 41 | triangularPath.lineTo(width / 2, 0); 42 | triangularPath.close(); 43 | } else { 44 | triangularPath.moveTo(0, 0); 45 | triangularPath.lineTo(width / 2, height); 46 | triangularPath.lineTo(width, 0); 47 | triangularPath.close(); 48 | } 49 | return new TriangleShape(triangularPath, width, height); 50 | } 51 | 52 | @Override 53 | public void getOutline(@NonNull Outline outline) { 54 | outline.setConvexPath(mTriangularPath); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/android/launcher3/keyboard/FocusedItemDecorator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.keyboard; 18 | 19 | import android.graphics.Canvas; 20 | import android.graphics.Rect; 21 | import android.support.v7.widget.RecyclerView; 22 | import android.support.v7.widget.RecyclerView.ItemDecoration; 23 | import android.support.v7.widget.RecyclerView.State; 24 | import android.view.View; 25 | import android.view.View.OnFocusChangeListener; 26 | 27 | /** 28 | * {@link ItemDecoration} for drawing and animating focused view background. 29 | */ 30 | public class FocusedItemDecorator extends ItemDecoration { 31 | 32 | private FocusIndicatorHelper mHelper; 33 | 34 | public FocusedItemDecorator(View container) { 35 | mHelper = new FocusIndicatorHelper(container) { 36 | 37 | @Override 38 | public void viewToRect(View v, Rect outRect) { 39 | outRect.set(v.getLeft(), v.getTop(), v.getRight(), v.getBottom()); 40 | } 41 | }; 42 | } 43 | 44 | public OnFocusChangeListener getFocusListener() { 45 | return mHelper; 46 | } 47 | 48 | @Override 49 | public void onDraw(Canvas c, RecyclerView parent, State state) { 50 | mHelper.draw(c); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/android/launcher3/model/AbstractUserComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.android.launcher3.model; 17 | 18 | import android.content.Context; 19 | 20 | import com.android.launcher3.ItemInfo; 21 | import com.android.launcher3.compat.UserHandleCompat; 22 | import com.android.launcher3.compat.UserManagerCompat; 23 | 24 | import java.util.Comparator; 25 | 26 | /** 27 | * A comparator to arrange items based on user profiles. 28 | */ 29 | public abstract class AbstractUserComparator implements Comparator { 30 | 31 | private final UserManagerCompat mUserManager; 32 | private final UserHandleCompat mMyUser; 33 | 34 | public AbstractUserComparator(Context context) { 35 | mUserManager = UserManagerCompat.getInstance(context); 36 | mMyUser = UserHandleCompat.myUserHandle(); 37 | } 38 | 39 | @Override 40 | public int compare(T lhs, T rhs) { 41 | if (mMyUser.equals(lhs.user)) { 42 | return -1; 43 | } else { 44 | Long aUserSerial = mUserManager.getSerialNumberForUser(lhs.user); 45 | Long bUserSerial = mUserManager.getSerialNumberForUser(rhs.user); 46 | return aUserSerial.compareTo(bUserSerial); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/com/android/launcher3/model/PackageItemInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.model; 18 | 19 | import android.graphics.Bitmap; 20 | 21 | import com.android.launcher3.ItemInfo; 22 | 23 | /** 24 | * Represents a {@link Package} in the widget tray section. 25 | */ 26 | public class PackageItemInfo extends ItemInfo { 27 | 28 | /** 29 | * A bitmap version of the application icon. 30 | */ 31 | public Bitmap iconBitmap; 32 | 33 | /** 34 | * Indicates whether we're using a low res icon. 35 | */ 36 | public boolean usingLowResIcon; 37 | 38 | /** 39 | * Package name of the {@link ItemInfo}. 40 | */ 41 | public String packageName; 42 | 43 | /** 44 | * Character that is used as a section name for the {@link ItemInfo#title}. 45 | * (e.g., "G" will be stored if title is "Google") 46 | */ 47 | public String titleSectionName; 48 | 49 | PackageItemInfo(String packageName) { 50 | this.packageName = packageName; 51 | } 52 | 53 | @Override 54 | protected String dumpProperties() { 55 | return super.dumpProperties() + " packageName=" + packageName; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/com/android/launcher3/shortcuts/ShortcutKey.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.shortcuts; 2 | 3 | import android.content.ComponentName; 4 | import android.content.Intent; 5 | 6 | import com.android.launcher3.ShortcutInfo; 7 | import com.android.launcher3.compat.UserHandleCompat; 8 | import com.android.launcher3.util.ComponentKey; 9 | 10 | /** 11 | * A key that uniquely identifies a shortcut using its package, id, and user handle. 12 | */ 13 | public class ShortcutKey extends ComponentKey { 14 | 15 | public ShortcutKey(String packageName, UserHandleCompat user, String id) { 16 | // Use the id as the class name. 17 | super(new ComponentName(packageName, id), user); 18 | } 19 | 20 | public String getId() { 21 | return componentName.getClassName(); 22 | } 23 | 24 | public static ShortcutKey fromInfo(ShortcutInfoCompat shortcutInfo) { 25 | return new ShortcutKey(shortcutInfo.getPackage(), shortcutInfo.getUserHandle(), 26 | shortcutInfo.getId()); 27 | } 28 | 29 | public static ShortcutKey fromIntent(Intent intent, UserHandleCompat user) { 30 | String shortcutId = intent.getStringExtra( 31 | ShortcutInfoCompat.EXTRA_SHORTCUT_ID); 32 | return new ShortcutKey(intent.getPackage(), user, shortcutId); 33 | } 34 | 35 | public static ShortcutKey fromShortcutInfo(ShortcutInfo info) { 36 | return fromIntent(info.getPromisedIntent(), info.user); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/android/launcher3/testing/DummyWidget.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.testing; 2 | 3 | import android.appwidget.AppWidgetProviderInfo; 4 | 5 | import com.android.launcher3.CustomAppWidget; 6 | import com.android.launcher3.R; 7 | 8 | public class DummyWidget implements CustomAppWidget { 9 | @Override 10 | public String getLabel() { 11 | return "Dumb Launcher Widget"; 12 | } 13 | 14 | @Override 15 | public int getPreviewImage() { 16 | return 0; 17 | } 18 | 19 | @Override 20 | public int getIcon() { 21 | return 0; 22 | } 23 | 24 | @Override 25 | public int getWidgetLayout() { 26 | return R.layout.zzz_dummy_widget; 27 | } 28 | 29 | @Override 30 | public int getSpanX() { 31 | return 2; 32 | } 33 | 34 | @Override 35 | public int getSpanY() { 36 | return 2; 37 | } 38 | 39 | @Override 40 | public int getMinSpanX() { 41 | return 1; 42 | } 43 | 44 | @Override 45 | public int getMinSpanY() { 46 | return 1; 47 | } 48 | 49 | @Override 50 | public int getResizeMode() { 51 | return AppWidgetProviderInfo.RESIZE_BOTH; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/com/android/launcher3/testing/ToggleWeightWatcher.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.testing; 2 | 3 | import android.app.Activity; 4 | import android.content.SharedPreferences; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | 8 | import com.android.launcher3.Launcher; 9 | import com.android.launcher3.LauncherAppState; 10 | import com.android.launcher3.Utilities; 11 | import com.android.launcher3.util.TestingUtils; 12 | 13 | public class ToggleWeightWatcher extends Activity { 14 | 15 | @Override 16 | protected void onCreate(Bundle savedInstanceState) { 17 | super.onCreate(savedInstanceState); 18 | 19 | SharedPreferences sp = Utilities.getPrefs(this); 20 | boolean show = sp.getBoolean(TestingUtils.SHOW_WEIGHT_WATCHER, true); 21 | 22 | show = !show; 23 | sp.edit().putBoolean(TestingUtils.SHOW_WEIGHT_WATCHER, show).apply(); 24 | 25 | Launcher launcher = (Launcher) LauncherAppState.getInstance().getModel().getCallback(); 26 | if (launcher != null && launcher.mWeightWatcher != null) { 27 | launcher.mWeightWatcher.setVisibility(show ? View.VISIBLE : View.GONE); 28 | } 29 | finish(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/CellAndSpan.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | /** 4 | * Base class which represents an area on the grid. 5 | */ 6 | public class CellAndSpan { 7 | 8 | /** 9 | * Indicates the X position of the associated cell. 10 | */ 11 | public int cellX = -1; 12 | 13 | /** 14 | * Indicates the Y position of the associated cell. 15 | */ 16 | public int cellY = -1; 17 | 18 | /** 19 | * Indicates the X cell span. 20 | */ 21 | public int spanX = 1; 22 | 23 | /** 24 | * Indicates the Y cell span. 25 | */ 26 | public int spanY = 1; 27 | 28 | public CellAndSpan() { 29 | } 30 | 31 | public void copyFrom(CellAndSpan copy) { 32 | cellX = copy.cellX; 33 | cellY = copy.cellY; 34 | spanX = copy.spanX; 35 | spanY = copy.spanY; 36 | } 37 | 38 | public CellAndSpan(int cellX, int cellY, int spanX, int spanY) { 39 | this.cellX = cellX; 40 | this.cellY = cellY; 41 | this.spanX = spanX; 42 | this.spanY = spanY; 43 | } 44 | 45 | public String toString() { 46 | return "(" + cellX + ", " + cellY + ": " + spanX + ", " + spanY + ")"; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/CircleRevealOutlineProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.util; 18 | 19 | import android.annotation.TargetApi; 20 | import android.os.Build; 21 | 22 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 23 | public class CircleRevealOutlineProvider extends RevealOutlineAnimation { 24 | 25 | private int mCenterX; 26 | private int mCenterY; 27 | private float mRadius0; 28 | private float mRadius1; 29 | 30 | /** 31 | * @param x reveal center x 32 | * @param y reveal center y 33 | * @param r0 initial radius 34 | * @param r1 final radius 35 | */ 36 | public CircleRevealOutlineProvider(int x, int y, float r0, float r1) { 37 | mCenterX = x; 38 | mCenterY = y; 39 | mRadius0 = r0; 40 | mRadius1 = r1; 41 | } 42 | 43 | @Override 44 | public boolean shouldRemoveElevationDuringAnimation() { 45 | return true; 46 | } 47 | 48 | @Override 49 | public void setProgress(float progress) { 50 | mOutlineRadius = (1 - progress) * mRadius0 + progress * mRadius1; 51 | 52 | mOutline.left = (int) (mCenterX - mOutlineRadius); 53 | mOutline.top = (int) (mCenterY - mOutlineRadius); 54 | mOutline.right = (int) (mCenterX + mOutlineRadius); 55 | mOutline.bottom = (int) (mCenterY + mOutlineRadius); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/FlagOp.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | public abstract class FlagOp { 4 | 5 | public static FlagOp NO_OP = new FlagOp() {}; 6 | 7 | private FlagOp() {} 8 | 9 | public int apply(int flags) { 10 | return flags; 11 | } 12 | 13 | public static FlagOp addFlag(final int flag) { 14 | return new FlagOp() { 15 | @Override 16 | public int apply(int flags) { 17 | return flags | flag; 18 | } 19 | }; 20 | } 21 | 22 | public static FlagOp removeFlag(final int flag) { 23 | return new FlagOp() { 24 | @Override 25 | public int apply(int flags) { 26 | return flags & ~flag; 27 | } 28 | }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/LongArrayMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.util; 18 | 19 | import android.util.LongSparseArray; 20 | 21 | import java.util.Iterator; 22 | 23 | /** 24 | * Extension of {@link LongSparseArray} with some utility methods. 25 | */ 26 | public class LongArrayMap extends LongSparseArray implements Iterable { 27 | 28 | public boolean containsKey(long key) { 29 | return indexOfKey(key) >= 0; 30 | } 31 | 32 | public boolean isEmpty() { 33 | return size() <= 0; 34 | } 35 | 36 | @Override 37 | public LongArrayMap clone() { 38 | return (LongArrayMap) super.clone(); 39 | } 40 | 41 | @Override 42 | public Iterator iterator() { 43 | return new ValueIterator(); 44 | } 45 | 46 | @Thunk class ValueIterator implements Iterator { 47 | 48 | private int mNextIndex = 0; 49 | 50 | @Override 51 | public boolean hasNext() { 52 | return mNextIndex < size(); 53 | } 54 | 55 | @Override 56 | public E next() { 57 | return valueAt(mNextIndex ++); 58 | } 59 | 60 | @Override 61 | public void remove() { 62 | throw new UnsupportedOperationException(); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/MultiHashMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.util; 18 | 19 | import java.util.ArrayList; 20 | import java.util.HashMap; 21 | 22 | /** 23 | * A utility map from keys to an ArrayList of values. 24 | */ 25 | public class MultiHashMap extends HashMap> { 26 | 27 | public MultiHashMap() { } 28 | 29 | public MultiHashMap(int size) { 30 | super(size); 31 | } 32 | 33 | public void addToList(K key, V value) { 34 | ArrayList list = get(key); 35 | if (list == null) { 36 | list = new ArrayList<>(); 37 | list.add(value); 38 | put(key, list); 39 | } else { 40 | list.add(value); 41 | } 42 | } 43 | 44 | @Override 45 | public MultiHashMap clone() { 46 | MultiHashMap map = new MultiHashMap<>(size()); 47 | for (Entry> entry : entrySet()) { 48 | map.put(entry.getKey(), new ArrayList(entry.getValue())); 49 | } 50 | return map; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/NoLocaleSqliteContext.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import android.content.Context; 4 | import android.content.ContextWrapper; 5 | import android.database.DatabaseErrorHandler; 6 | import android.database.sqlite.SQLiteDatabase; 7 | import android.database.sqlite.SQLiteDatabase.CursorFactory; 8 | 9 | /** 10 | * A context wrapper which creates databases without support for localized collators. 11 | */ 12 | public class NoLocaleSqliteContext extends ContextWrapper { 13 | 14 | // TODO: Use the flag defined in Context when the new SDK is available 15 | private static final int MODE_NO_LOCALIZED_COLLATORS = 0x0010; 16 | 17 | public NoLocaleSqliteContext(Context context) { 18 | super(context); 19 | } 20 | 21 | @Override 22 | public SQLiteDatabase openOrCreateDatabase( 23 | String name, int mode, CursorFactory factory, DatabaseErrorHandler errorHandler) { 24 | return super.openOrCreateDatabase( 25 | name, mode | MODE_NO_LOCALIZED_COLLATORS, factory, errorHandler); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/ParcelableSparseArray.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.android.launcher3.util; 17 | 18 | import android.os.Parcel; 19 | import android.os.Parcelable; 20 | import android.util.SparseArray; 21 | 22 | public class ParcelableSparseArray extends SparseArray implements Parcelable { 23 | public int describeContents() { 24 | return 0; 25 | } 26 | 27 | public void writeToParcel(Parcel dest, int flags) { 28 | final int count = size(); 29 | dest.writeInt(count); 30 | for (int i = 0; i < count; i++) { 31 | dest.writeInt(keyAt(i)); 32 | dest.writeParcelable(valueAt(i), 0); 33 | } 34 | } 35 | 36 | public static final Parcelable.Creator CREATOR = 37 | new Parcelable.Creator() { 38 | public ParcelableSparseArray createFromParcel(Parcel source) { 39 | final ParcelableSparseArray array = new ParcelableSparseArray(); 40 | final ClassLoader loader = array.getClass().getClassLoader(); 41 | final int count = source.readInt(); 42 | for (int i = 0; i < count; i++) { 43 | array.put(source.readInt(), source.readParcelable(loader)); 44 | } 45 | return array; 46 | } 47 | 48 | public ParcelableSparseArray[] newArray(int size) { 49 | return new ParcelableSparseArray[size]; 50 | } 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/PillWidthRevealOutlineProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.util; 18 | 19 | import android.graphics.Rect; 20 | 21 | /** 22 | * Extension of {@link PillRevealOutlineProvider} which only changes the width of the pill. 23 | */ 24 | public class PillWidthRevealOutlineProvider extends PillRevealOutlineProvider { 25 | 26 | private final int mStartLeft; 27 | private final int mStartRight; 28 | 29 | public PillWidthRevealOutlineProvider(Rect pillRect, int left, int right) { 30 | super(0, 0, pillRect); 31 | mOutline.set(pillRect); 32 | mStartLeft = left; 33 | mStartRight = right; 34 | } 35 | 36 | @Override 37 | public void setProgress(float progress) { 38 | mOutline.left = (int) (progress * mPillRect.left + (1 - progress) * mStartLeft); 39 | mOutline.right = (int) (progress * mPillRect.right + (1 - progress) * mStartRight); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/Preconditions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.util; 18 | 19 | import android.os.Looper; 20 | 21 | import com.android.launcher3.LauncherModel; 22 | import com.android.launcher3.config.ProviderConfig; 23 | 24 | /** 25 | * A set of utility methods for thread verification. 26 | */ 27 | public class Preconditions { 28 | 29 | public static void assertNotNull(Object o) { 30 | if (ProviderConfig.IS_DOGFOOD_BUILD && o == null) { 31 | throw new IllegalStateException(); 32 | } 33 | } 34 | 35 | public static void assertWorkerThread() { 36 | if (ProviderConfig.IS_DOGFOOD_BUILD && !isSameLooper(LauncherModel.getWorkerLooper())) { 37 | throw new IllegalStateException(); 38 | } 39 | } 40 | 41 | public static void assertUIThread() { 42 | if (ProviderConfig.IS_DOGFOOD_BUILD && !isSameLooper(Looper.getMainLooper())) { 43 | throw new IllegalStateException(); 44 | } 45 | } 46 | 47 | public static void assertNonUiThread() { 48 | if (ProviderConfig.IS_DOGFOOD_BUILD && isSameLooper(Looper.getMainLooper())) { 49 | throw new IllegalStateException(); 50 | } 51 | } 52 | 53 | private static boolean isSameLooper(Looper looper) { 54 | return Looper.myLooper() == looper; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/StringFilter.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Abstract class to filter a set of strings. 7 | */ 8 | public abstract class StringFilter { 9 | 10 | private StringFilter() { } 11 | 12 | public abstract boolean matches(String str); 13 | 14 | public static StringFilter matchesAll() { 15 | return new StringFilter() { 16 | @Override 17 | public boolean matches(String str) { 18 | return true; 19 | } 20 | }; 21 | } 22 | 23 | public static StringFilter of(final Set validEntries) { 24 | return new StringFilter() { 25 | @Override 26 | public boolean matches(String str) { 27 | return validEntries.contains(str); 28 | } 29 | }; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/com/android/launcher3/util/Thunk.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.util; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Indicates that the given field or method has package visibility solely to prevent the creation 26 | * of a synthetic method. In practice, you should treat this field/method as if it were private. 27 | *

28 | * 29 | * When a private method is called from an inner class, the Java compiler generates a simple 30 | * package private shim method that the class generated from the inner class can call. This results 31 | * in unnecessary bloat and runtime method call overhead. It also gets us closer to the dex method 32 | * count limit. 33 | *

34 | * 35 | * If you'd like to see warnings for these synthetic methods in eclipse, turn on: 36 | * Window > Preferences > Java > Compiler > Errors/Warnings > "Access to a non-accessible member 37 | * of an enclosing type". 38 | *

39 | * 40 | */ 41 | @Retention(RetentionPolicy.SOURCE) 42 | @Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.TYPE}) 43 | public @interface Thunk { } -------------------------------------------------------------------------------- /src/com/android/launcher3/util/TouchController.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import android.view.MotionEvent; 4 | 5 | public interface TouchController { 6 | boolean onTouchEvent(MotionEvent ev); 7 | boolean onInterceptTouchEvent(MotionEvent ev); 8 | } 9 | -------------------------------------------------------------------------------- /src/com/android/launcher3/widget/PendingAddShortcutInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.android.launcher3.widget; 17 | 18 | import android.content.ComponentName; 19 | import android.content.pm.ActivityInfo; 20 | 21 | import com.android.launcher3.LauncherSettings; 22 | import com.android.launcher3.PendingAddItemInfo; 23 | 24 | /** 25 | * Meta data used for late binding of the short cuts. 26 | * 27 | * @see {@link PendingAddItemInfo} 28 | */ 29 | public class PendingAddShortcutInfo extends PendingAddItemInfo { 30 | 31 | ActivityInfo activityInfo; 32 | 33 | public PendingAddShortcutInfo(ActivityInfo activityInfo) { 34 | this.activityInfo = activityInfo; 35 | componentName = new ComponentName(activityInfo.packageName, activityInfo.name); 36 | itemType = LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/com/android/launcher3/widget/WidgetsRowViewHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package com.android.launcher3.widget; 17 | 18 | import android.support.v7.widget.RecyclerView.ViewHolder; 19 | import android.view.ViewGroup; 20 | 21 | import com.android.launcher3.BubbleTextView; 22 | import com.android.launcher3.R; 23 | 24 | public class WidgetsRowViewHolder extends ViewHolder { 25 | 26 | public final ViewGroup cellContainer; 27 | public final BubbleTextView title; 28 | 29 | public WidgetsRowViewHolder(ViewGroup v) { 30 | super(v); 31 | 32 | cellContainer = (ViewGroup) v.findViewById(R.id.widgets_cell_list); 33 | title = (BubbleTextView) v.findViewById(R.id.section); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src_config/com/android/launcher3/config/FeatureFlags.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.config; 18 | 19 | /** 20 | * Defines a set of flags used to control various launcher behaviors 21 | */ 22 | public final class FeatureFlags { 23 | private FeatureFlags() {} 24 | 25 | // Custom flags go below this 26 | public static boolean LAUNCHER3_DISABLE_ICON_NORMALIZATION = false; 27 | // As opposed to the new spring-loaded workspace. 28 | public static boolean LAUNCHER3_LEGACY_WORKSPACE_DND = false; 29 | public static boolean LAUNCHER3_LEGACY_FOLDER_ICON = false; 30 | public static boolean LAUNCHER3_USE_SYSTEM_DRAG_DRIVER = true; 31 | public static boolean LAUNCHER3_DISABLE_PINCH_TO_OVERVIEW = false; 32 | public static boolean LAUNCHER3_ALL_APPS_PULL_UP = true; 33 | 34 | // Feature flag to enable moving the QSB on the 0th screen of the workspace. 35 | public static final boolean QSB_ON_FIRST_SCREEN = true; 36 | // When enabled the all-apps icon is not added to the hotseat. 37 | public static final boolean NO_ALL_APPS_ICON = true; 38 | // When enabled fling down gesture on the first workspace triggers search. 39 | public static final boolean PULLDOWN_SEARCH = false; 40 | // When enabled the status bar may show dark icons based on the top of the wallpaper. 41 | public static final boolean LIGHT_STATUS_BAR = false; 42 | } 43 | -------------------------------------------------------------------------------- /src_config/com/android/launcher3/config/ProviderConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.android.launcher3.config; 18 | 19 | public class ProviderConfig { 20 | 21 | public static final String AUTHORITY = "com.android.launcher3.settings".intern(); 22 | 23 | public static boolean IS_DOGFOOD_BUILD = true; 24 | } 25 | -------------------------------------------------------------------------------- /tests/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | LOCAL_PATH := $(call my-dir) 17 | include $(CLEAR_VARS) 18 | 19 | LOCAL_MODULE_TAGS := tests 20 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ub-uiautomator 21 | 22 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 23 | 24 | LOCAL_SDK_VERSION := current 25 | 26 | LOCAL_PACKAGE_NAME := Launcher3Tests 27 | 28 | LOCAL_INSTRUMENTATION_FOR := Launcher3 29 | 30 | include $(BUILD_PACKAGE) 31 | -------------------------------------------------------------------------------- /tests/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/src/com/android/launcher3/ui/AllAppsAppLaunchTest.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.ui; 2 | 3 | import android.support.test.uiautomator.By; 4 | import android.support.test.uiautomator.UiObject2; 5 | import android.support.test.uiautomator.Until; 6 | import android.test.suitebuilder.annotation.LargeTest; 7 | 8 | import com.android.launcher3.compat.LauncherActivityInfoCompat; 9 | import com.android.launcher3.compat.LauncherAppsCompat; 10 | import com.android.launcher3.compat.UserHandleCompat; 11 | import com.android.launcher3.util.Condition; 12 | import com.android.launcher3.util.Wait; 13 | 14 | /** 15 | * Test for verifying apps is launched from all-apps 16 | */ 17 | @LargeTest 18 | public class AllAppsAppLaunchTest extends LauncherInstrumentationTestCase { 19 | 20 | private LauncherActivityInfoCompat mSettingsApp; 21 | 22 | @Override 23 | protected void setUp() throws Exception { 24 | super.setUp(); 25 | 26 | mSettingsApp = LauncherAppsCompat.getInstance(mTargetContext) 27 | .getActivityList("com.android.settings", UserHandleCompat.myUserHandle()).get(0); 28 | } 29 | 30 | public void testAppLauncher_portrait() throws Exception { 31 | lockRotation(true); 32 | performTest(); 33 | } 34 | 35 | public void testAppLauncher_landscape() throws Exception { 36 | lockRotation(false); 37 | performTest(); 38 | } 39 | 40 | private void performTest() throws Exception { 41 | startLauncher(); 42 | 43 | // Open all apps and wait for load complete 44 | final UiObject2 appsContainer = openAllApps(); 45 | assertTrue(Wait.atMost(Condition.minChildCount(appsContainer, 2), DEFAULT_UI_TIMEOUT)); 46 | 47 | // Open settings app and verify app launched 48 | scrollAndFind(appsContainer, By.text(mSettingsApp.getLabel().toString())).click(); 49 | assertTrue(mDevice.wait(Until.hasObject(By.pkg( 50 | mSettingsApp.getComponentName().getPackageName()).depth(0)), DEFAULT_UI_TIMEOUT)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/src/com/android/launcher3/ui/AllAppsIconToHomeTest.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.ui; 2 | 3 | import android.support.test.uiautomator.By; 4 | import android.support.test.uiautomator.UiObject2; 5 | import android.support.test.uiautomator.Until; 6 | import android.test.suitebuilder.annotation.LargeTest; 7 | 8 | import com.android.launcher3.compat.LauncherActivityInfoCompat; 9 | import com.android.launcher3.compat.LauncherAppsCompat; 10 | import com.android.launcher3.compat.UserHandleCompat; 11 | import com.android.launcher3.util.Condition; 12 | import com.android.launcher3.util.Wait; 13 | 14 | /** 15 | * Test for dragging an icon from all-apps to homescreen. 16 | */ 17 | @LargeTest 18 | public class AllAppsIconToHomeTest extends LauncherInstrumentationTestCase { 19 | 20 | private LauncherActivityInfoCompat mSettingsApp; 21 | 22 | @Override 23 | protected void setUp() throws Exception { 24 | super.setUp(); 25 | 26 | mSettingsApp = LauncherAppsCompat.getInstance(mTargetContext) 27 | .getActivityList("com.android.settings", UserHandleCompat.myUserHandle()).get(0); 28 | } 29 | 30 | public void testDragIcon_portrait() throws Throwable { 31 | lockRotation(true); 32 | performTest(); 33 | } 34 | 35 | public void testDragIcon_landscape() throws Throwable { 36 | lockRotation(false); 37 | performTest(); 38 | } 39 | 40 | private void performTest() throws Throwable { 41 | clearHomescreen(); 42 | startLauncher(); 43 | 44 | // Open all apps and wait for load complete. 45 | final UiObject2 appsContainer = openAllApps(); 46 | assertTrue(Wait.atMost(Condition.minChildCount(appsContainer, 2), DEFAULT_UI_TIMEOUT)); 47 | 48 | // Drag icon to homescreen. 49 | UiObject2 icon = scrollAndFind(appsContainer, By.text(mSettingsApp.getLabel().toString())); 50 | dragToWorkspace(icon); 51 | 52 | // Verify that the icon works on homescreen. 53 | mDevice.findObject(By.text(mSettingsApp.getLabel().toString())).click(); 54 | assertTrue(mDevice.wait(Until.hasObject(By.pkg( 55 | mSettingsApp.getComponentName().getPackageName()).depth(0)), DEFAULT_UI_TIMEOUT)); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/src/com/android/launcher3/util/Condition.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import android.support.test.uiautomator.UiObject2; 4 | 5 | import com.android.launcher3.MainThreadExecutor; 6 | 7 | import java.util.concurrent.CountDownLatch; 8 | import java.util.concurrent.TimeUnit; 9 | import java.util.concurrent.atomic.AtomicBoolean; 10 | 11 | public abstract class Condition { 12 | 13 | public abstract boolean isTrue() throws Throwable; 14 | 15 | /** 16 | * Converts the condition to be run on UI thread. 17 | */ 18 | public static Condition runOnUiThread(final Condition condition) { 19 | final MainThreadExecutor executor = new MainThreadExecutor(); 20 | return new Condition() { 21 | @Override 22 | public boolean isTrue() throws Throwable { 23 | final AtomicBoolean value = new AtomicBoolean(false); 24 | final Throwable[] exceptions = new Throwable[1]; 25 | final CountDownLatch latch = new CountDownLatch(1); 26 | executor.execute(new Runnable() { 27 | @Override 28 | public void run() { 29 | try { 30 | value.set(condition.isTrue()); 31 | } catch (Throwable e) { 32 | exceptions[0] = e; 33 | } 34 | 35 | } 36 | }); 37 | latch.await(1, TimeUnit.SECONDS); 38 | if (exceptions[0] != null) { 39 | throw exceptions[0]; 40 | } 41 | return value.get(); 42 | } 43 | }; 44 | } 45 | 46 | public static Condition minChildCount(final UiObject2 obj, final int childCount) { 47 | return new Condition() { 48 | @Override 49 | public boolean isTrue() { 50 | return obj.getChildCount() >= childCount; 51 | } 52 | }; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/src/com/android/launcher3/util/GridOccupancyTest.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import android.test.suitebuilder.annotation.SmallTest; 4 | 5 | import junit.framework.TestCase; 6 | 7 | /** 8 | * Unit tests for {@link GridOccupancy} 9 | */ 10 | @SmallTest 11 | public class GridOccupancyTest extends TestCase { 12 | 13 | public void testFindVacantCell() { 14 | GridOccupancy grid = initGrid(4, 15 | 1, 1, 1, 0, 0, 16 | 0, 0, 1, 1, 0, 17 | 0, 0, 0, 0, 0, 18 | 1, 1, 0, 0, 0 19 | ); 20 | 21 | int[] vacant = new int[2]; 22 | assertTrue(grid.findVacantCell(vacant, 2, 2)); 23 | assertEquals(vacant[0], 0); 24 | assertEquals(vacant[1], 1); 25 | 26 | assertTrue(grid.findVacantCell(vacant, 3, 2)); 27 | assertEquals(vacant[0], 2); 28 | assertEquals(vacant[1], 2); 29 | 30 | assertFalse(grid.findVacantCell(vacant, 3, 3)); 31 | } 32 | 33 | public void testIsRegionVacant() { 34 | GridOccupancy grid = initGrid(4, 35 | 1, 1, 1, 0, 0, 36 | 0, 0, 1, 1, 0, 37 | 0, 0, 0, 0, 0, 38 | 1, 1, 0, 0, 0 39 | ); 40 | 41 | assertTrue(grid.isRegionVacant(4, 0, 1, 4)); 42 | assertTrue(grid.isRegionVacant(0, 1, 2, 2)); 43 | assertTrue(grid.isRegionVacant(2, 2, 3, 2)); 44 | 45 | assertFalse(grid.isRegionVacant(3, 0, 2, 4)); 46 | assertFalse(grid.isRegionVacant(0, 0, 2, 1)); 47 | } 48 | 49 | private GridOccupancy initGrid(int rows, int... cells) { 50 | int cols = cells.length / rows; 51 | int i = 0; 52 | GridOccupancy grid = new GridOccupancy(cols, rows); 53 | for (int y = 0; y < rows; y++) { 54 | for (int x = 0; x < cols; x++) { 55 | grid.cells[x][y] = cells[i] != 0; 56 | i++; 57 | } 58 | } 59 | return grid; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /tests/src/com/android/launcher3/util/TestLauncherProvider.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import android.content.Context; 4 | import android.database.sqlite.SQLiteOpenHelper; 5 | 6 | import com.android.launcher3.LauncherProvider; 7 | 8 | /** 9 | * An extension of LauncherProvider backed up by in-memory database. 10 | */ 11 | public class TestLauncherProvider extends LauncherProvider { 12 | 13 | @Override 14 | public boolean onCreate() { 15 | return true; 16 | } 17 | 18 | @Override 19 | protected synchronized void createDbIfNotExists() { 20 | if (mOpenHelper == null) { 21 | mOpenHelper = new MyDatabaseHelper(getContext()); 22 | } 23 | } 24 | 25 | public SQLiteOpenHelper getHelper() { 26 | createDbIfNotExists(); 27 | return mOpenHelper; 28 | } 29 | 30 | @Override 31 | protected void notifyListeners() { } 32 | 33 | private static class MyDatabaseHelper extends DatabaseHelper { 34 | public MyDatabaseHelper(Context context) { 35 | super(context, null, null); 36 | initIds(); 37 | } 38 | 39 | @Override 40 | public long getDefaultUserSerial() { 41 | return 0; 42 | } 43 | 44 | @Override 45 | protected void onEmptyDbCreated() { } 46 | } 47 | } -------------------------------------------------------------------------------- /tests/src/com/android/launcher3/util/Wait.java: -------------------------------------------------------------------------------- 1 | package com.android.launcher3.util; 2 | 3 | import android.os.SystemClock; 4 | 5 | /** 6 | * A utility class for waiting for a condition to be true. 7 | */ 8 | public class Wait { 9 | 10 | private static final long DEFAULT_SLEEP_MS = 200; 11 | 12 | public static boolean atMost(Condition condition, long timeout) { 13 | return atMost(condition, timeout, DEFAULT_SLEEP_MS); 14 | } 15 | 16 | public static boolean atMost(Condition condition, long timeout, long sleepMillis) { 17 | long endTime = SystemClock.uptimeMillis() + timeout; 18 | while (SystemClock.uptimeMillis() < endTime) { 19 | try { 20 | if (condition.isTrue()) { 21 | return true; 22 | } 23 | } catch (Throwable t) { 24 | // Ignore 25 | } 26 | SystemClock.sleep(sleepMillis); 27 | } 28 | 29 | // Check once more before returning false. 30 | try { 31 | if (condition.isTrue()) { 32 | return true; 33 | } 34 | } catch (Throwable t) { 35 | // Ignore 36 | } 37 | return false; 38 | } 39 | } 40 | --------------------------------------------------------------------------------