merge in ics-release history after reset to master
diff --git a/fill_screens.py b/fill_screens.py
index 9607c80..5841b8e 100755
--- a/fill_screens.py
+++ b/fill_screens.py
@@ -15,13 +15,12 @@
AUTO_FILE = "launcher.db"
APPLICATION_COMPONENTS = [
- "com.google.android.apps.books/com.google.android.apps.books.app.BooksActivity",
"com.android.calculator2/com.android.calculator2.Calculator",
- "com.google.android.camera/com.android.camera.Camera",
- "com.google.android.carhome/com.google.android.carhome.CarHome",
"com.android.providers.downloads.ui/com.android.providers.downloads.ui.DownloadList",
- "com.google.android.gallery3d/com.android.gallery3d.app.Gallery",
- "com.google.android.apps.maps/com.google.android.maps.MapsActivity"
+ "com.android.settings/com.android.settings.Settings",
+ "com.android.mms/com.android.mms.ui.ConversationList",
+ "com.android.contacts/com.android.contacts.activities.PeopleActivity",
+ "com.android.contacts/com.android.contacts.activities.DialtactsActivity"
]
def usage():
diff --git a/res/drawable-hdpi/ic_allapps_pressed.png b/res/drawable-hdpi/ic_allapps_pressed.png
new file mode 100644
index 0000000..6d87bbb
--- /dev/null
+++ b/res/drawable-hdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_appwidget.png b/res/drawable-hdpi/ic_launcher_appwidget.png
deleted file mode 100644
index 13513e0..0000000
--- a/res/drawable-hdpi/ic_launcher_appwidget.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/pressed_application_background.9.png b/res/drawable-hdpi/pressed_application_background.9.png
deleted file mode 100644
index 3a59f25..0000000
--- a/res/drawable-hdpi/pressed_application_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/preview_bg.9.png b/res/drawable-hdpi/preview_bg.9.png
deleted file mode 100644
index 5fa2ed8..0000000
--- a/res/drawable-hdpi/preview_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/preview_bg_focus.9.png b/res/drawable-hdpi/preview_bg_focus.9.png
deleted file mode 100644
index bbf67f7..0000000
--- a/res/drawable-hdpi/preview_bg_focus.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/preview_bg_press.9.png b/res/drawable-hdpi/preview_bg_press.9.png
deleted file mode 100644
index 6d0b022..0000000
--- a/res/drawable-hdpi/preview_bg_press.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/apps_hotseat_button.png b/res/drawable-mdpi/apps_hotseat_button.png
deleted file mode 100644
index 62f119d..0000000
--- a/res/drawable-mdpi/apps_hotseat_button.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_allapps_pressed.png b/res/drawable-mdpi/ic_allapps_pressed.png
new file mode 100644
index 0000000..5c2076f
--- /dev/null
+++ b/res/drawable-mdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_appwidget.png b/res/drawable-mdpi/ic_launcher_appwidget.png
deleted file mode 100644
index 72dbfdf..0000000
--- a/res/drawable-mdpi/ic_launcher_appwidget.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/pressed_application_background.9.png b/res/drawable-mdpi/pressed_application_background.9.png
deleted file mode 100644
index 7d5da3d..0000000
--- a/res/drawable-mdpi/pressed_application_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/preview_bg.9.png b/res/drawable-mdpi/preview_bg.9.png
deleted file mode 100644
index d96e885..0000000
--- a/res/drawable-mdpi/preview_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/preview_bg_focus.9.png b/res/drawable-mdpi/preview_bg_focus.9.png
deleted file mode 100644
index 19e82a7..0000000
--- a/res/drawable-mdpi/preview_bg_focus.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/preview_bg_press.9.png b/res/drawable-mdpi/preview_bg_press.9.png
deleted file mode 100644
index f938090..0000000
--- a/res/drawable-mdpi/preview_bg_press.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/apps_hotseat_button.png b/res/drawable-xhdpi/apps_hotseat_button.png
deleted file mode 100644
index 932dac7..0000000
--- a/res/drawable-xhdpi/apps_hotseat_button.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_allapps_pressed.png b/res/drawable-xhdpi/ic_allapps_pressed.png
new file mode 100644
index 0000000..72ff3b9
--- /dev/null
+++ b/res/drawable-xhdpi/ic_allapps_pressed.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_launcher_appwidget.png b/res/drawable-xhdpi/ic_launcher_appwidget.png
deleted file mode 100644
index 997504a..0000000
--- a/res/drawable-xhdpi/ic_launcher_appwidget.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/pressed_application_background.9.png b/res/drawable-xhdpi/pressed_application_background.9.png
deleted file mode 100644
index 05e240a..0000000
--- a/res/drawable-xhdpi/pressed_application_background.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/preview_bg.9.png b/res/drawable-xhdpi/preview_bg.9.png
deleted file mode 100644
index 11cbcb5..0000000
--- a/res/drawable-xhdpi/preview_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/preview_bg_focus.9.png b/res/drawable-xhdpi/preview_bg_focus.9.png
deleted file mode 100644
index 698c465..0000000
--- a/res/drawable-xhdpi/preview_bg_focus.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/preview_bg_press.9.png b/res/drawable-xhdpi/preview_bg_press.9.png
deleted file mode 100644
index 78e7510..0000000
--- a/res/drawable-xhdpi/preview_bg_press.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/preview_background.xml b/res/drawable/all_apps_button_icon.xml
similarity index 66%
rename from res/drawable/preview_background.xml
rename to res/drawable/all_apps_button_icon.xml
index 0054aa0..7c69cad 100644
--- a/res/drawable/preview_background.xml
+++ b/res/drawable/all_apps_button_icon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
+<!-- Copyright (C) 2011 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.
@@ -15,8 +15,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true" android:drawable="@drawable/preview_bg_press" />
- <item android:state_focused="true" android:state_window_focused="true" android:drawable="@drawable/preview_bg_focus" />
- <item android:state_focused="true" android:state_window_focused="false" android:drawable="@drawable/preview_bg" />
- <item android:drawable="@drawable/preview_bg" />
+ <item android:state_focused="true" android:drawable="@drawable/ic_allapps_pressed" />
+ <item android:state_pressed="true" android:drawable="@drawable/ic_allapps_pressed" />
+ <item android:drawable="@drawable/ic_allapps" />
</selector>
diff --git a/res/layout/apps_customize_progressbar.xml b/res/layout/apps_customize_progressbar.xml
index d790f21..6a8010f 100644
--- a/res/layout/apps_customize_progressbar.xml
+++ b/res/layout/apps_customize_progressbar.xml
@@ -20,5 +20,4 @@
android:id="@+id/apps_customize_progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center"
- android:layout_marginRight="5dp" />
+ android:layout_gravity="center" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5c806e2..63d7b3b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -153,8 +153,8 @@
<!-- Noun, menu item used to show help. [CHAR_LIMIT=none] -->
<string name="menu_help">Help</string>
- <!-- URL pointing to help text. [DO NOT TRANSLATE] -->
- <string name="help_url" translatable="false">http://www.google.com/support/mobile/?p=help_home</string>
+ <!-- URL pointing to help text. If empty, no link to help will be created [DO NOT TRANSLATE] -->
+ <string name="help_url" translatable="false"></string>
<!-- Strings for the contextual action bar (CAB) in All Apps -->
<skip />
@@ -199,18 +199,9 @@
<!-- Widgets: -->
<skip />
- <!-- The Google Apps folder name -->
- <string name="google_apps_folder_name">Google</string>
-
<!-- Text to show user in place of a gadget when we can't display it properly -->
<string name="gadget_error_text">Problem loading widget</string>
- <!-- URL to use when detecting the current default browser.
- Attempts to mimic homepage_base in Browser; {CID} should be replaced
- by the client-id, e.g. "android-google". -->
- <string name="default_browser_url" translatable="false">
- http://www.google.com/m?client=ms-{CID}&source=android-home-hotseat</string>
-
<!-- Text to inform the user that they can't uninstall a system application -->
<string name="uninstall_system_app_text">This is a system application and cannot be uninstalled.</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 19a05a0..de438be 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -146,6 +146,8 @@
<item name="android:paddingRight">25dp</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:textSize">16sp</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:ellipsize">end</item>
<item name="android:shadowColor">#FF000000</item>
<item name="android:shadowDx">0.0</item>
<item name="android:shadowDy">1.0</item>
diff --git a/res/xml/default_workspace.xml b/res/xml/default_workspace.xml
index 48e8eb7..f2f4240 100644
--- a/res/xml/default_workspace.xml
+++ b/res/xml/default_workspace.xml
@@ -23,13 +23,13 @@
launcher:className="com.android.settings.widget.SettingsAppWidgetProvider"
launcher:screen="1"
launcher:x="0"
- launcher:y="2"
+ launcher:y="3"
launcher:spanX="4"
launcher:spanY="1" />
<!-- Middle screen [2] -->
<appwidget
- launcher:packageName="com.google.android.deskclock"
+ launcher:packageName="com.android.deskclock"
launcher:className="com.android.alarmclock.AnalogAppWidgetProvider"
launcher:screen="2"
launcher:x="1"
@@ -37,59 +37,15 @@
launcher:spanX="2"
launcher:spanY="2" />
<favorite
- launcher:packageName="com.google.android.camera"
+ launcher:packageName="com.android.camera"
launcher:className="com.android.camera.Camera"
launcher:screen="2"
launcher:x="0"
launcher:y="3" />
- <folder
- launcher:screen="2"
- launcher:x="3"
- launcher:y="3"
- launcher:title="@string/google_apps_folder_name">
- <favorite
- launcher:packageName="com.google.android.apps.maps"
- launcher:className="com.google.android.maps.MapsActivity" />
- <favorite
- launcher:packageName="com.google.android.gm"
- launcher:className="com.google.android.gm.ConversationListActivityGmail" />
- <favorite
- launcher:packageName="com.google.android.calendar"
- launcher:className="com.android.calendar.AllInOneActivity" />
- <favorite
- launcher:packageName="com.google.android.apps.plus"
- launcher:className="com.google.android.apps.plus.phone.HomeActivity" />
- <favorite
- launcher:packageName="com.google.android.music"
- launcher:className="com.android.music.activitymanagement.TopLevelActivity" />
- <favorite
- launcher:packageName="com.google.android.apps.books"
- launcher:className="com.google.android.apps.books.app.BooksActivity" />
- <favorite
- launcher:packageName="com.google.android.videos"
- launcher:className="com.google.android.youtube.videos.honeycomb.VideosActivity" />
- <favorite
- launcher:packageName="com.android.vending"
- launcher:className="com.android.vending.AssetBrowserActivity" />
- <favorite
- launcher:packageName="com.google.android.talk"
- launcher:className="com.google.android.talk.SigningInActivity" />
- <favorite
- launcher:packageName="com.google.android.youtube"
- launcher:className="com.google.android.youtube.app.honeycomb.Shell$HomeActivity" />
- </folder>
<!-- Right screen [3] -->
- <appwidget
- launcher:packageName="com.android.vending"
- launcher:className="com.android.vending.MarketWidgetProvider"
- launcher:screen="3"
- launcher:x="1"
- launcher:y="1"
- launcher:spanX="2"
- launcher:spanY="2" />
<favorite
- launcher:packageName="com.google.android.gallery3d"
+ launcher:packageName="com.android.gallery3d"
launcher:className="com.android.gallery3d.app.Gallery"
launcher:screen="3"
launcher:x="1"
@@ -126,7 +82,7 @@
launcher:x="3"
launcher:y="0" />
<favorite
- launcher:packageName="com.google.android.browser"
+ launcher:packageName="com.android.browser"
launcher:className="com.android.browser.BrowserActivity"
launcher:container="-101"
launcher:screen="4"
diff --git a/src/com/android/launcher2/FocusHelper.java b/src/com/android/launcher2/FocusHelper.java
index f97492b..f030739 100644
--- a/src/com/android/launcher2/FocusHelper.java
+++ b/src/com/android/launcher2/FocusHelper.java
@@ -278,30 +278,36 @@
final ViewGroup container = (ViewGroup) parentLayout.getParent();
final TabHost tabHost = findTabHostParent(container);
final TabWidget tabs = (TabWidget) tabHost.findViewById(com.android.internal.R.id.tabs);
- final int widgetIndex = parent.indexOfChild(v);
+ final int iconIndex = parent.indexOfChild(v);
final int widgetCount = parent.getChildCount();
final int pageIndex = container.indexOfChild(parentLayout);
final int pageCount = container.getChildCount();
final int cellCountX = parentLayout.getCellCountX();
final int cellCountY = parentLayout.getCellCountY();
- final int x = widgetIndex % cellCountX;
- final int y = widgetIndex / cellCountX;
+ final int x = iconIndex % cellCountX;
+ final int y = iconIndex / cellCountX;
final int action = e.getAction();
final boolean handleKeyEvent = (action != KeyEvent.ACTION_UP);
PagedViewCellLayoutChildren newParent = null;
+ // Side pages do not always load synchronously, so check before focusing child siblings
+ // willy-nilly
+ View child = null;
boolean wasHandled = false;
switch (keyCode) {
case KeyEvent.KEYCODE_DPAD_LEFT:
if (handleKeyEvent) {
// Select the previous icon or the last icon on the previous page
- if (widgetIndex > 0) {
- parent.getChildAt(widgetIndex - 1).requestFocus();
+ if (iconIndex > 0) {
+ parent.getChildAt(iconIndex - 1).requestFocus();
} else {
if (pageIndex > 0) {
newParent = getPagedViewCellLayoutChildrenForIndex(container,
pageIndex - 1);
- newParent.getChildAt(newParent.getChildCount() - 1).requestFocus();
+ if (newParent != null) {
+ child = newParent.getChildAt(newParent.getChildCount() - 1);
+ if (child != null) child.requestFocus();
+ }
}
}
}
@@ -310,13 +316,16 @@
case KeyEvent.KEYCODE_DPAD_RIGHT:
if (handleKeyEvent) {
// Select the next icon or the first icon on the next page
- if (widgetIndex < (widgetCount - 1)) {
- parent.getChildAt(widgetIndex + 1).requestFocus();
+ if (iconIndex < (widgetCount - 1)) {
+ parent.getChildAt(iconIndex + 1).requestFocus();
} else {
if (pageIndex < (pageCount - 1)) {
newParent = getPagedViewCellLayoutChildrenForIndex(container,
pageIndex + 1);
- newParent.getChildAt(0).requestFocus();
+ if (newParent != null) {
+ child = newParent.getChildAt(0);
+ if (child != null) child.requestFocus();
+ }
}
}
}
@@ -326,8 +335,8 @@
if (handleKeyEvent) {
// Select the closest icon in the previous row, otherwise select the tab bar
if (y > 0) {
- int newWidgetIndex = ((y - 1) * cellCountX) + x;
- parent.getChildAt(newWidgetIndex).requestFocus();
+ int newiconIndex = ((y - 1) * cellCountX) + x;
+ parent.getChildAt(newiconIndex).requestFocus();
} else {
tabs.requestFocus();
}
@@ -338,8 +347,8 @@
if (handleKeyEvent) {
// Select the closest icon in the previous row, otherwise do nothing
if (y < (cellCountY - 1)) {
- int newWidgetIndex = Math.min(widgetCount - 1, ((y + 1) * cellCountX) + x);
- parent.getChildAt(newWidgetIndex).requestFocus();
+ int newiconIndex = Math.min(widgetCount - 1, ((y + 1) * cellCountX) + x);
+ parent.getChildAt(newiconIndex).requestFocus();
}
}
wasHandled = true;
@@ -360,7 +369,10 @@
if (pageIndex > 0) {
newParent = getPagedViewCellLayoutChildrenForIndex(container,
pageIndex - 1);
- newParent.getChildAt(0).requestFocus();
+ if (newParent != null) {
+ child = newParent.getChildAt(0);
+ if (child != null) child.requestFocus();
+ }
} else {
parent.getChildAt(0).requestFocus();
}
@@ -374,7 +386,10 @@
if (pageIndex < (pageCount - 1)) {
newParent = getPagedViewCellLayoutChildrenForIndex(container,
pageIndex + 1);
- newParent.getChildAt(0).requestFocus();
+ if (newParent != null) {
+ child = newParent.getChildAt(0);
+ if (child != null) child.requestFocus();
+ }
} else {
parent.getChildAt(widgetCount - 1).requestFocus();
}
diff --git a/src/com/android/launcher2/Hotseat.java b/src/com/android/launcher2/Hotseat.java
index f6ce059..b9be6dc 100644
--- a/src/com/android/launcher2/Hotseat.java
+++ b/src/com/android/launcher2/Hotseat.java
@@ -100,7 +100,7 @@
BubbleTextView allAppsButton = (BubbleTextView)
inflater.inflate(R.layout.application, mContent, false);
allAppsButton.setCompoundDrawablesWithIntrinsicBounds(null,
- context.getResources().getDrawable(R.drawable.ic_allapps), null, null);
+ context.getResources().getDrawable(R.drawable.all_apps_button_icon), null, null);
// allAppsButton.setText(context.getString(R.string.all_apps_button_label));
allAppsButton.setContentDescription(context.getString(R.string.all_apps_button_label));
allAppsButton.setOnClickListener(new View.OnClickListener() {
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 59386ad..2997d68 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -1302,7 +1302,8 @@
Intent settings = new Intent(android.provider.Settings.ACTION_SETTINGS);
settings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
- Intent help = new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.help_url)));
+ String helpUrl = getString(R.string.help_url);
+ Intent help = new Intent(Intent.ACTION_VIEW, Uri.parse(helpUrl));
help.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
@@ -1317,10 +1318,12 @@
.setIcon(android.R.drawable.ic_menu_preferences)
.setIntent(settings)
.setAlphabeticShortcut('P');
- menu.add(0, MENU_HELP, 0, R.string.menu_help)
- .setIcon(android.R.drawable.ic_menu_help)
- .setIntent(help)
- .setAlphabeticShortcut('H');
+ if (!helpUrl.isEmpty()) {
+ menu.add(0, MENU_HELP, 0, R.string.menu_help)
+ .setIcon(android.R.drawable.ic_menu_help)
+ .setIntent(help)
+ .setAlphabeticShortcut('H');
+ }
return true;
}
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index d7e9e06..8bc38c2 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -1664,18 +1664,6 @@
*/
public abstract void syncPageItems(int page, boolean immediate);
- protected void postInvalidatePageData(final boolean clearViews) {
- post(new Runnable() {
- // post the call to avoid a call to requestLayout from a layout pass
- public void run() {
- if (clearViews) {
- removeAllViews();
- }
- invalidatePageData();
- }
- });
- }
-
protected void invalidatePageData() {
invalidatePageData(-1, false);
}