diff options
author | Winson Chung <winsonc@google.com> | 2013-10-09 15:50:52 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-10-09 17:53:32 -0700 |
commit | 3a6e7f330e680ef718ca7c0921d842efb4d8bbae (patch) | |
tree | 260e400c897a77d6727e5ea5f933864fa2ac1ace /src/com/android/launcher3/Launcher.java | |
parent | 558f1c2ac73c3a0c3c0c316222b6b7f9c76e2501 (diff) | |
download | android_packages_apps_Trebuchet-3a6e7f330e680ef718ca7c0921d842efb4d8bbae.tar.gz android_packages_apps_Trebuchet-3a6e7f330e680ef718ca7c0921d842efb4d8bbae.tar.bz2 android_packages_apps_Trebuchet-3a6e7f330e680ef718ca7c0921d842efb4d8bbae.zip |
Initial changes for new clings. (Bug 11142616)
Change-Id: Id66ebceb99449941921d9e617dfe0cc05a2e3b65
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 5aec399b5..61b46a7be 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -4082,6 +4082,13 @@ public class Launcher extends Activity return false; } + // For now, limit only to phones + LauncherAppState app = LauncherAppState.getInstance(); + DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); + if (grid.isTablet()) { + return false; + } + // disable clings when running in a test harness if(ActivityManager.isRunningInTestHarness()) return false; @@ -4234,12 +4241,34 @@ public class Launcher extends Activity protected String getFirstRunCustomContentHint() { return ""; } + protected int getFirstRunFocusedHotseatAppDrawableId() { + return -1; + } + protected ComponentName getFirstRunFocusedHotseatAppComponentName() { + return null; + } + protected int getFirstRunFocusedHotseatAppRank() { + return -1; + } + protected String getFirstRunFocusedHotseatAppBubbleTitle() { + return ""; + } + protected String getFirstRunFocusedHotseatAppBubbleDescription() { + return ""; + } public void showFirstRunWorkspaceCling() { // Enable the clings only if they have not been dismissed before if (isClingsEnabled() && !mSharedPrefs.getBoolean(Cling.WORKSPACE_CLING_DISMISSED_KEY, false)) { - initCling(R.id.workspace_cling, 0, false, true); + Cling c = initCling(R.id.workspace_cling, 0, false, true); + + // Set the focused hotseat app if there is one + c.setFocusedHotseatApp(getFirstRunFocusedHotseatAppDrawableId(), + getFirstRunFocusedHotseatAppRank(), + getFirstRunFocusedHotseatAppComponentName(), + getFirstRunFocusedHotseatAppBubbleTitle(), + getFirstRunFocusedHotseatAppBubbleDescription()); } else { removeCling(R.id.workspace_cling); } @@ -4276,6 +4305,9 @@ public class Launcher extends Activity }; dismissCling(cling, cb, Cling.FIRST_RUN_CLING_DISMISSED_KEY, DISMISS_CLING_DURATION, false); + + // Fade out the search bar for the workspace cling coming up + mSearchDropTargetBar.hideSearchBar(true); } public void dismissWorkspaceCling(View v) { Cling cling = (Cling) findViewById(R.id.workspace_cling); @@ -4289,6 +4321,9 @@ public class Launcher extends Activity } dismissCling(cling, cb, Cling.WORKSPACE_CLING_DISMISSED_KEY, DISMISS_CLING_DURATION, true); + + // Fade in the search bar + mSearchDropTargetBar.showSearchBar(true); } public void dismissFolderCling(View v) { Cling cling = (Cling) findViewById(R.id.folder_cling); |