diff options
author | Winson Chung <winsonc@google.com> | 2013-10-10 20:45:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-10 20:45:27 +0000 |
commit | d1e474a92e47171a985738144887e1f2e46c7768 (patch) | |
tree | e1eb20610a117d62cc740605d2c21c5d40fe640d /src/com/android/launcher3/Launcher.java | |
parent | bb6fda6ac3c4246b91cf66b28cdbc89c3d8a3e52 (diff) | |
parent | 3a6e7f330e680ef718ca7c0921d842efb4d8bbae (diff) | |
download | android_packages_apps_Trebuchet-d1e474a92e47171a985738144887e1f2e46c7768.tar.gz android_packages_apps_Trebuchet-d1e474a92e47171a985738144887e1f2e46c7768.tar.bz2 android_packages_apps_Trebuchet-d1e474a92e47171a985738144887e1f2e46c7768.zip |
Merge "Initial changes for new clings. (Bug 11142616)" into jb-ub-now-indigo-rose
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 afaf2234a..278b13c18 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -4080,6 +4080,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; @@ -4279,12 +4286,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); } @@ -4321,6 +4350,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); @@ -4334,6 +4366,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); |