Skip to content

Commit

Permalink
Merge remote branch 'cm/cm-10.1' into cm-10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
androidarmv6-gerrit committed Dec 29, 2012
2 parents 289c4ab + 3786ed8 commit 3f8e3d3
Show file tree
Hide file tree
Showing 36 changed files with 232 additions and 1,049 deletions.
1 change: 0 additions & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="com.cyanogenmod.trebuchet.LAUNCHER_ACTION" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY"/>
Expand Down
Binary file removed res/drawable-hdpi/ic_launcher_application.png
Binary file not shown.
Binary file removed res/drawable-hdpi/ic_launcher_appwidget.png
Binary file not shown.
Binary file removed res/drawable-hdpi/ic_launcher_shortcut.png
Binary file not shown.
Binary file removed res/drawable-mdpi/ic_launcher_application.png
Binary file not shown.
Binary file removed res/drawable-mdpi/ic_launcher_appwidget.png
Binary file not shown.
Binary file removed res/drawable-mdpi/ic_launcher_shortcut.png
Binary file not shown.
1 change: 0 additions & 1 deletion res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<string name="group_shortcuts" msgid="9133529424900391877">"Verknüpfungen"</string>
<string name="group_widgets" msgid="6704978494073105844">"Widgets"</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all launcher actions -->
<string name="group_actions">Aktionen</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Hintergründe"</string>
<string name="completely_out_of_space" msgid="1759078539443491182">"Auf Ihrem Startbildschirm ist kein Platz mehr vorhanden."</string>
<string name="out_of_space" msgid="8365249326091984698">"Auf dem Startbildschirm ist kein Platz mehr vorhanden."</string>
Expand Down
1 change: 0 additions & 1 deletion res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
<string name="all_apps_sort_cling_add_item">Mantener pulsación sobre la pestaña Aplicaciones para elegir el método de ordenación</string>
<string name="hidden_apps_title">Aplicaciones ocultas</string>
<string name="edit_target_label">Editar</string>
<string name="group_actions">Acciones</string>
<string name="preferences_title">Preferencias</string>
<string name="preferences_interface_title">Interfaz</string>
<string name="preferences_application_title">Aplicación</string>
Expand Down
2 changes: 0 additions & 2 deletions res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@
<string name="preferences_interface_homescreen_indicator_enable_summary">Afficher l\'indicateur de page en bas de l\'écran</string>
<string name="preferences_interface_homescreen_indicator_fade_title">Fondu</string>
<string name="preferences_interface_homescreen_indicator_fade_summary">Faire disparaître l\'indicateur après le changement d\'écran</string>
<string name="preferences_interface_homescreen_indicator_background_title">Séparateur horizontal</string>
<string name="preferences_interface_homescreen_indicator_background_summary">Afficher la ligne entre la barre de dock et l\'écran d\'accueil</string>

<!-- Drawer -->
<string name="preferences_interface_drawer_title">Applications</string>
Expand Down
1 change: 0 additions & 1 deletion res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<string name="group_applications" msgid="2103752818818161976">"Alkalmazások"</string>
<string name="group_shortcuts" msgid="9133529424900391877">"Parancsikonok"</string>
<string name="group_widgets" msgid="6704978494073105844">"Modulok"</string>
<string name="group_actions">Műveletek</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Háttérképek"</string>
<string name="completely_out_of_space" msgid="1759078539443491182">"Nincs több hely a Kezdőképernyőkön."</string>
<string name="out_of_space" msgid="8365249326091984698">"Nincs több hely ezen a főoldalon."</string>
Expand Down
1 change: 0 additions & 1 deletion res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
<string name="custom_workspace_cling_description_2" msgid="2758258454975288377"></string>

<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all launcher actions -->
<string name="group_actions">アクション</string>
<!-- Label for the info icon. [CHAR_LIMIT=30] -->
<string name="edit_target_label">編集</string>
<!-- Noun, menu item used to show system apps -->
Expand Down
1 change: 0 additions & 1 deletion res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,5 +195,4 @@
<string name="menu_apps_filter_downloaded">Baixado</string>
<string name="menu_hidden_apps_delete">Restaurar</string>
<string name="hidden_apps_title">Aplicativos ocultos</string>
<string name="group_actions">Ações</string>
</resources>
1 change: 0 additions & 1 deletion res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<string name="group_applications" msgid="2103752818818161976">"Aplicaţii"</string>
<string name="group_shortcuts" msgid="9133529424900391877">"Comenzi rapide"</string>
<string name="group_widgets" msgid="6704978494073105844">"Obiecte widget"</string>
<string name="group_actions">"Acțiuni"</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Imagini de fundal"</string>
<string name="completely_out_of_space" msgid="1759078539443491182">"Nu mai este loc pe ecranele de pornire."</string>
<string name="out_of_space" msgid="8365249326091984698">"Niciun spaţiu rămas pe acest Ecran de pornire."</string>
Expand Down
1 change: 0 additions & 1 deletion res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<string name="group_applications" msgid="2103752818818161976">"Приложения"</string>
<string name="group_shortcuts" msgid="9133529424900391877">"Ярлыки"</string>
<string name="group_widgets" msgid="6704978494073105844">"Виджеты"</string>
<string name="group_actions">Действия</string>
<string name="group_wallpapers" msgid="1568191644272224858">"Обои"</string>
<string name="completely_out_of_space" msgid="1759078539443491182">"На главных экранах всё занято."</string>
<string name="out_of_space" msgid="8365249326091984698">"На этом экране всё занято."</string>
Expand Down
1 change: 0 additions & 1 deletion res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<string name="group_shortcuts" msgid="9133529424900391877">"快捷方式"</string>
<string name="group_widgets" msgid="6704978494073105844">"小部件"</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all launcher actions -->
<string name="group_actions">操作</string>
<string name="group_wallpapers" msgid="1568191644272224858">"壁纸"</string>
<string name="completely_out_of_space" msgid="1759078539443491182">"您的主屏幕上没有空间了。"</string>
<string name="out_of_space" msgid="8365249326091984698">"此主屏幕上已没有空间。"</string>
Expand Down
1 change: 0 additions & 1 deletion res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
<attr name="icon" format="reference" />
<attr name="title" format="reference" />
<attr name="uri" format="string" />
<attr name="action" format="string" />
</declare-styleable>
<declare-styleable name="Extra">
<attr name="key" format="string" />
Expand Down
20 changes: 18 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ s -->
<string name="group_shortcuts">Shortcuts</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all widgets/gadgets -->
<string name="group_widgets">Widgets</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of all launcher actions -->
<string name="group_actions">Actions</string>
<!-- Options in "Add to Home" dialog box; Title of the group containing the list of apps that can set the wallpaper-->
<string name="group_wallpapers">Wallpapers</string>
<!-- Error message when user has filled all their home screens -->
Expand Down Expand Up @@ -403,4 +401,22 @@ s -->
<string name="preferences_interface_general_orientation_title">Auto-rotate screen</string>
<string name="preferences_interface_general_fullscreen_title">Fullscreen mode</string>
<string name="preferences_interface_general_fullscreen_summary">Hide the status bar to extend the homescreen</string>

<!-- Koush steals yachts -->
<string-array name="preferences_koush">
<item>Koush steals yachts!!!!</item>
<item>Koush steals yachts!!!!</item>
<item>Koush steals yachts!!!!</item>
<item>Koush steals yachts!!!!</item>
<item>I hope you step on a LEGO!!!!</item>
<item>This setting is here \"because we can\"</item>
<item>Looks good to me, but someone else must approve</item>
<item>I would prefer that you didn\'t submit this</item>
<item>WHY ARE YOU UP AT 3AM!!!!</item>
<item>Do not submit</item>
<item>&lt;cdesai&gt; settings seem small</item>
<item>&lt;cdesai&gt; the size of preferences</item>
<item>&lt;nebkat&gt; what am I supposed to do?</item>
<item>&lt;nebkat&gt; fill the space with \"koush steals yachts\"?</item>
</string-array>
</resources>
15 changes: 7 additions & 8 deletions res/xml-sw600dp/default_workspace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,32 @@
launcher:className="com.android.contacts.activities.DialtactsActivity"
launcher:container="-101"
launcher:screen="0"
launcher:x="1"
launcher:x="2"
launcher:y="0" />
<favorite
launcher:packageName="com.android.contacts"
launcher:className="com.android.contacts.activities.PeopleActivity"
launcher:container="-101"
launcher:screen="0"
launcher:x="2"
launcher:x="3"
launcher:y="0" />
<action
<allapps
launcher:container="-101"
launcher:screen="0"
launcher:x="3"
launcher:y="0"
launcher:action="AllApps" />
launcher:x="4"
launcher:y="0" />
<favorite
launcher:packageName="com.android.mms"
launcher:className="com.android.mms.ui.ConversationList"
launcher:container="-101"
launcher:screen="0"
launcher:x="4"
launcher:x="5"
launcher:y="0" />
<favorite
launcher:packageName="com.android.browser"
launcher:className="com.android.browser.BrowserActivity"
launcher:container="-101"
launcher:screen="0"
launcher:x="5"
launcher:x="6"
launcher:y="0" />
</favorites>
96 changes: 96 additions & 0 deletions res/xml-sw720dp/default_workspace.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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] -->

<!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
<favorite
launcher:packageName="com.android.contacts"
launcher:className="com.android.contacts.activities.DialtactsActivity"
launcher:container="-101"
launcher:screen="0"
launcher:x="3"
launcher:y="0" />
<favorite
launcher:packageName="com.android.contacts"
launcher:className="com.android.contacts.activities.PeopleActivity"
launcher:container="-101"
launcher:screen="0"
launcher:x="4"
launcher:y="0" />
<allapps
launcher:container="-101"
launcher:screen="0"
launcher:x="5"
launcher:y="0" />
<favorite
launcher:packageName="com.android.mms"
launcher:className="com.android.mms.ui.ConversationList"
launcher:container="-101"
launcher:screen="0"
launcher:x="6"
launcher:y="0" />
<favorite
launcher:packageName="com.android.browser"
launcher:className="com.android.browser.BrowserActivity"
launcher:container="-101"
launcher:screen="0"
launcher:x="7"
launcher:y="0" />
</favorites>
5 changes: 2 additions & 3 deletions res/xml/default_workspace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,11 @@
launcher:screen="0"
launcher:x="1"
launcher:y="0" />
<action
<allapps
launcher:container="-101"
launcher:screen="0"
launcher:x="2"
launcher:y="0"
launcher:action="AllApps" />
launcher:y="0" />
<favorite
launcher:packageName="com.android.mms"
launcher:className="com.android.mms.ui.ConversationList"
Expand Down
5 changes: 2 additions & 3 deletions res/xml/update_workspace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@
launcher:screen="0"
launcher:x="1"
launcher:y="0" />
<action
<allapps
launcher:container="-101"
launcher:screen="0"
launcher:x="2"
launcher:y="0"
launcher:action="AllApps" />
launcher:y="0" />
<favorite
launcher:packageName="com.android.mms"
launcher:className="com.android.mms.ui.ConversationList"
Expand Down
23 changes: 5 additions & 18 deletions src/com/cyanogenmod/trebuchet/AddAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ public class AddAdapter extends BaseAdapter {

private final ArrayList<ListItem> mItems = new ArrayList<ListItem>();

public static final int ITEM_APPLICATION = 0;
public static final int ITEM_SHORTCUT = 1;
public static final int ITEM_APPWIDGET = 2;
public static final int ITEM_ACTION = 3;
public static final int ITEM_WALLPAPER = 4;
public static final int ITEM_SHORTCUT = 0;
public static final int ITEM_APPWIDGET = 1;
public static final int ITEM_APPLICATION = 2;
public static final int ITEM_WALLPAPER = 3;

/**
* Specific item in our list.
Expand All @@ -62,7 +61,7 @@ public ListItem(Resources res, int textResourceId, int imageResourceId, int acti
this.actionTag = actionTag;
}
}

public AddAdapter(Launcher launcher) {
super();

Expand All @@ -71,18 +70,6 @@ public AddAdapter(Launcher launcher) {
// Create default actions
Resources res = launcher.getResources();

mItems.add(new ListItem(res, R.string.group_applications,
R.drawable.ic_launcher_application, ITEM_APPLICATION));

mItems.add(new ListItem(res, R.string.group_shortcuts,
R.drawable.ic_launcher_shortcut, ITEM_SHORTCUT));

mItems.add(new ListItem(res, R.string.group_widgets,
R.drawable.ic_launcher_appwidget, ITEM_APPWIDGET));

mItems.add(new ListItem(res, R.string.group_actions,
R.drawable.ic_launcher_home, ITEM_ACTION));

mItems.add(new ListItem(res, R.string.group_wallpapers,
R.drawable.ic_launcher_wallpaper, ITEM_WALLPAPER));
}
Expand Down
26 changes: 0 additions & 26 deletions src/com/cyanogenmod/trebuchet/AppsCustomizePagedView.java
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,6 @@ public void onPackagesUpdated() {
AppWidgetManager.getInstance(mLauncher).getInstalledProviders();
Intent shortcutsIntent = new Intent(Intent.ACTION_CREATE_SHORTCUT);
List<ResolveInfo> shortcuts = mPackageManager.queryIntentActivities(shortcutsIntent, 0);
List<LauncherAction.Action> launcherActions = LauncherAction.getAllActions();
for (AppWidgetProviderInfo widget : widgets) {
if (widget.minWidth > 0 && widget.minHeight > 0) {
// Ensure that all widgets we show can be added on a workspace of this size
Expand All @@ -667,7 +666,6 @@ public void onPackagesUpdated() {
}
}
mWidgets.addAll(shortcuts);
mWidgets.addAll(launcherActions);
Collections.sort(mWidgets,
new LauncherModel.WidgetAndShortcutNameComparator(mLauncher, mPackageManager));
updatePageCounts();
Expand Down Expand Up @@ -1434,19 +1432,6 @@ private Bitmap getShortcutPreview(ResolveInfo info, int maxWidth, int maxHeight)
return preview;
}

private Bitmap getShortcutPreview(LauncherAction.Action info) {
int offset = 0;
int bitmapSize = mAppIconSize;
Bitmap preview = Bitmap.createBitmap(bitmapSize, bitmapSize, Config.ARGB_8888);

final Resources res = getContext().getResources();

// Render the icon
Drawable icon = res.getDrawable(info.getDrawable());
renderDrawableToBitmap(icon, preview, offset, offset, mAppIconSize, mAppIconSize);
return preview;
}

private Bitmap getWidgetPreview(ComponentName provider, int previewImage, int iconId,
int cellHSpan, int cellVSpan, int maxWidth, int maxHeight) {
// Load the preview image if possible
Expand Down Expand Up @@ -1620,14 +1605,6 @@ public void syncWidgetPageItems(final int page, final boolean immediate) {
info.activityInfo.name);
widget.applyFromResolveInfo(mPackageManager, info);
widget.setTag(createItemInfo);
} else if (rawInfo instanceof LauncherAction.Action) {
// Fill in the actions information
LauncherAction.Action info = (LauncherAction.Action) rawInfo;
createItemInfo = new PendingAddActionInfo();
((PendingAddActionInfo)createItemInfo).action = info;
createItemInfo.itemType = LauncherSettings.Favorites.ITEM_TYPE_LAUNCHER_ACTION;
widget.applyFromLauncherAction(info);
widget.setTag(createItemInfo);
}
widget.setOnClickListener(this);
widget.setOnLongClickListener(this);
Expand Down Expand Up @@ -1714,9 +1691,6 @@ private void loadWidgetPreviewsInBackground(AppsCustomizeAsyncTask task,
// Fill in the shortcuts information
ResolveInfo info = (ResolveInfo) item;
images.add(getShortcutPreview(info, data.maxImageWidth, data.maxImageHeight));
} else if (item instanceof LauncherAction.Action) {
LauncherAction.Action info = (LauncherAction.Action) item;
images.add(getShortcutPreview(info));
}
}
}
Expand Down
Loading

0 comments on commit 3f8e3d3

Please sign in to comment.