summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-12-26 23:22:05 +0000
committernebkat <nebkat@teamhacksung.org>2012-12-26 23:22:05 +0000
commit8901992c72caa891a396f557ee76f42f1d7fbe15 (patch)
treecf835060f0d3c1a6721a13076c55f46814bda348
parentfc8ea2ddf7badf18f1415865927c62a8e5be37e5 (diff)
downloadandroid_packages_apps_Trebuchet-8901992c72caa891a396f557ee76f42f1d7fbe15.tar.gz
android_packages_apps_Trebuchet-8901992c72caa891a396f557ee76f42f1d7fbe15.tar.bz2
android_packages_apps_Trebuchet-8901992c72caa891a396f557ee76f42f1d7fbe15.zip
Fixes
Change-Id: I0778017cc8a7afc169fa72ebbee25ba2bdeefc60
-rw-r--r--res/layout-sw720dp/hotseat.xml18
-rw-r--r--res/layout-sw720dp/launcher.xml9
-rw-r--r--res/xml-sw720dp/default_workspace.xml61
-rw-r--r--src/com/cyanogenmod/trebuchet/Hotseat.java2
-rw-r--r--src/com/cyanogenmod/trebuchet/Launcher.java8
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java9
6 files changed, 13 insertions, 94 deletions
diff --git a/res/layout-sw720dp/hotseat.xml b/res/layout-sw720dp/hotseat.xml
index a6f636a6e..3abd13316 100644
--- a/res/layout-sw720dp/hotseat.xml
+++ b/res/layout-sw720dp/hotseat.xml
@@ -17,20 +17,4 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.cyanogenmod.trebuchet"
launcher:cellCountX="@integer/hotseat_cell_count"
- launcher:cellCountY="1">
- <com.cyanogenmod.trebuchet.CellLayout
- android:id="@+id/layout"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_gravity="center"
- android:paddingTop="@dimen/button_bar_height_top_padding"
- android:paddingBottom="@dimen/button_bar_height_bottom_padding"
- android:paddingLeft="@dimen/button_bar_width_left_padding"
- android:paddingRight="@dimen/button_bar_width_right_padding"
-
- launcher:cellWidth="@dimen/hotseat_cell_width"
- launcher:cellHeight="@dimen/hotseat_cell_height"
- launcher:widthGap="@dimen/hotseat_width_gap"
- launcher:heightGap="@dimen/hotseat_height_gap"
- launcher:maxGap="@dimen/hotseat_width_gap" />
-</com.cyanogenmod.trebuchet.Hotseat>
+ launcher:cellCountY="1" />
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 963116231..71ee777d2 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -36,14 +36,7 @@
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
launcher:scrollIndicatorPaddingLeft="@dimen/workspace_divider_padding_left"
- launcher:scrollIndicatorPaddingRight="@dimen/workspace_divider_padding_right">
-
- <include android:id="@+id/cell1" layout="@layout/workspace_screen" />
- <include android:id="@+id/cell2" layout="@layout/workspace_screen" />
- <include android:id="@+id/cell3" layout="@layout/workspace_screen" />
- <include android:id="@+id/cell4" layout="@layout/workspace_screen" />
- <include android:id="@+id/cell5" layout="@layout/workspace_screen" />
- </com.cyanogenmod.trebuchet.Workspace>
+ launcher:scrollIndicatorPaddingRight="@dimen/workspace_divider_padding_right" />
<include
android:id="@+id/dock_divider"
diff --git a/res/xml-sw720dp/default_workspace.xml b/res/xml-sw720dp/default_workspace.xml
deleted file mode 100644
index e6651aae2..000000000
--- a/res/xml-sw720dp/default_workspace.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<favorites xmlns:launcher="http://schemas.android.com/apk/res/com.cyanogenmod.trebuchet">
- <!-- Far-left screen [0] -->
-
- <!-- Left screen [1] -->
- <appwidget
- launcher:packageName="com.android.settings"
- launcher:className="com.android.settings.widget.SettingsAppWidgetProvider"
- launcher:screen="1"
- launcher:x="0"
- launcher:y="3"
- launcher:spanX="4"
- launcher:spanY="1" />
-
- <!-- Middle screen [2] -->
- <appwidget
- launcher:packageName="com.android.deskclock"
- launcher:className="com.android.alarmclock.AnalogAppWidgetProvider"
- launcher:screen="2"
- launcher:x="1"
- launcher:y="0"
- launcher:spanX="2"
- launcher:spanY="2" />
- <favorite
- launcher:packageName="com.android.camera"
- launcher:className="com.android.camera.Camera"
- launcher:screen="2"
- launcher:x="0"
- launcher:y="3" />
-
- <!-- Right screen [3] -->
- <favorite
- launcher:packageName="com.android.gallery3d"
- launcher:className="com.android.gallery3d.app.Gallery"
- launcher:screen="3"
- launcher:x="1"
- launcher:y="3" />
- <favorite
- launcher:packageName="com.android.settings"
- launcher:className="com.android.settings.Settings"
- launcher:screen="3"
- launcher:x="2"
- launcher:y="3" />
-
- <!-- Far-right screen [4] -->
-</favorites>
diff --git a/src/com/cyanogenmod/trebuchet/Hotseat.java b/src/com/cyanogenmod/trebuchet/Hotseat.java
index 80656b60b..38a826eed 100644
--- a/src/com/cyanogenmod/trebuchet/Hotseat.java
+++ b/src/com/cyanogenmod/trebuchet/Hotseat.java
@@ -79,7 +79,7 @@ public class Hotseat extends PagedView {
for (int i = 0; i < hotseatPages; i++) {
CellLayout cl = (CellLayout) inflater.inflate(R.layout.hotseat_page, null);
cl.setIsHotseat(true);
- cl.setGridSize((!mIsLandscape ? mCellCount : 1), (mIsLandscape ? mCellCount : 1));
+ cl.setGridSize((!hasVerticalHotseat() ? mCellCount : 1), (hasVerticalHotseat() ? mCellCount : 1));
addView(cl);
}
diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java
index fd634f3f0..f5951ea9a 100644
--- a/src/com/cyanogenmod/trebuchet/Launcher.java
+++ b/src/com/cyanogenmod/trebuchet/Launcher.java
@@ -931,12 +931,12 @@ public final class Launcher extends Activity
mSearchDropTargetBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.qsb_bar);
// Hide the search divider if we are hiding search bar
- if (!mShowSearchBar && getCurrentOrientation() == Configuration.ORIENTATION_LANDSCAPE) {
- findViewById(R.id.qsb_divider).setVisibility(View.GONE);
+ if (!mShowSearchBar && mQsbDivider != null && getCurrentOrientation() == Configuration.ORIENTATION_LANDSCAPE) {
+ mQsbDivider.setVisibility(View.GONE);
}
- if (!mShowDockDivider) {
- findViewById(R.id.dock_divider).setVisibility(View.GONE);
+ if (!mShowDockDivider && mDockDivider != null) {
+ mDockDivider.setVisibility(View.GONE);
}
// Setup AppsCustomize
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index 32062e61b..c7d6e7587 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -4349,9 +4349,12 @@ public class Workspace extends PagedView
// return null for some shortcuts (for instance, for shortcuts to
// web pages.)
final Intent intent = info.intent;
- final ComponentName name = intent.getComponent();
- if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION &&
- Intent.ACTION_MAIN.equals(intent.getAction()) && name != null) {
+ if (intent != null && info.itemType == LauncherSettings.Favorites.ITEM_TYPE_APPLICATION &&
+ Intent.ACTION_MAIN.equals(intent.getAction())) {
+ final ComponentName name = intent.getComponent();
+ if (name == null) {
+ continue;
+ }
for (ApplicationInfo app : apps) {
if (app.componentName.equals(name)) {
BubbleTextView shortcut = (BubbleTextView) view;