OSDN Git Service

Refactoring DeviceProfile
authorAdam Cohen <adamcohen@google.com>
Wed, 6 May 2015 18:42:25 +0000 (11:42 -0700)
committerAdam Cohen <adamcohen@google.com>
Thu, 21 May 2015 23:16:40 +0000 (16:16 -0700)
commit2e6da1539bc7286336b3c24d96ab76434939ce4d
tree38c7387dc9a5f6f084c4998aac88495189423d3b
parenta9d012c6e67b644498e07c63f36617c1b8915e02
Refactoring DeviceProfile

-> Pulling out the parts of device profile which can (and need to be)
   initialized and accessed without access to an Activity context,
   ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
   initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
   and we will create one of these for each Activity instance, and
   this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
   all appropriate dimensions can be computed without an Activity
   context (by only specifying orientation). This would be an
   extension of this CL and allow us to know exactly how launcher
   will look in both orientations from any context.

Sets the stage for some improvements around b/19514688

Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
39 files changed:
src/com/android/launcher3/AlphabeticalAppsList.java
src/com/android/launcher3/AppWidgetResizeFrame.java
src/com/android/launcher3/AppsContainerRecyclerView.java
src/com/android/launcher3/AppsContainerView.java
src/com/android/launcher3/AppsGridAdapter.java
src/com/android/launcher3/AppsRecyclerViewContainer.java
src/com/android/launcher3/AutoInstallsLayout.java
src/com/android/launcher3/BubbleTextView.java
src/com/android/launcher3/CellLayout.java
src/com/android/launcher3/DeviceProfile.java
src/com/android/launcher3/DynamicGrid.java [deleted file]
src/com/android/launcher3/FocusHelper.java
src/com/android/launcher3/Folder.java
src/com/android/launcher3/FolderIcon.java
src/com/android/launcher3/FolderPagedView.java
src/com/android/launcher3/Hotseat.java
src/com/android/launcher3/IconCache.java
src/com/android/launcher3/InvariantDeviceProfile.java [new file with mode: 0644]
src/com/android/launcher3/Launcher.java
src/com/android/launcher3/LauncherAppState.java
src/com/android/launcher3/LauncherAppWidgetHostView.java
src/com/android/launcher3/LauncherAppWidgetProviderInfo.java
src/com/android/launcher3/LauncherBackupHelper.java
src/com/android/launcher3/LauncherModel.java
src/com/android/launcher3/LauncherProvider.java
src/com/android/launcher3/LauncherStateTransitionAnimation.java
src/com/android/launcher3/Partner.java
src/com/android/launcher3/PendingAppWidgetHostView.java
src/com/android/launcher3/ShortcutAndWidgetContainer.java
src/com/android/launcher3/Utilities.java
src/com/android/launcher3/WidgetPreviewLoader.java
src/com/android/launcher3/Workspace.java
src/com/android/launcher3/WorkspaceStateTransitionAnimation.java
src/com/android/launcher3/util/FocusLogic.java
src/com/android/launcher3/widget/PendingAddWidgetInfo.java
src/com/android/launcher3/widget/WidgetCell.java
src/com/android/launcher3/widget/WidgetsContainerView.java
src/com/android/launcher3/widget/WidgetsListAdapter.java
util/com/android/launcher3/DecoderRing.java