summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-08-18 11:39:08 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-08-18 11:39:08 -0700
commitf07e7a441c5de51d095f54d2735b7c028f217e8e (patch)
treee20fc780d5747b3d258398665c5167b7ff4296de
parent6935ffd45069d1f514509e7bc403514686762148 (diff)
parent5bbc91bbbcba6cbcfff66b8d8dd510abb06bc076 (diff)
downloadandroid_packages_apps_Trebuchet-f07e7a441c5de51d095f54d2735b7c028f217e8e.tar.gz
android_packages_apps_Trebuchet-f07e7a441c5de51d095f54d2735b7c028f217e8e.tar.bz2
android_packages_apps_Trebuchet-f07e7a441c5de51d095f54d2735b7c028f217e8e.zip
Merge "Add a default wallpaper for xlarge devices."
-rw-r--r--res/drawable-xlarge/wallpaper_leaf.jpgbin0 -> 938236 bytes
-rw-r--r--res/drawable-xlarge/wallpaper_leaf_small.jpgbin0 -> 21537 bytes
-rw-r--r--res/values-xlarge/wallpapers.xml22
-rw-r--r--src/com/android/launcher2/Launcher.java42
4 files changed, 42 insertions, 22 deletions
diff --git a/res/drawable-xlarge/wallpaper_leaf.jpg b/res/drawable-xlarge/wallpaper_leaf.jpg
new file mode 100644
index 000000000..afb0acc1c
--- /dev/null
+++ b/res/drawable-xlarge/wallpaper_leaf.jpg
Binary files differ
diff --git a/res/drawable-xlarge/wallpaper_leaf_small.jpg b/res/drawable-xlarge/wallpaper_leaf_small.jpg
new file mode 100644
index 000000000..48e9f3e64
--- /dev/null
+++ b/res/drawable-xlarge/wallpaper_leaf_small.jpg
Binary files differ
diff --git a/res/values-xlarge/wallpapers.xml b/res/values-xlarge/wallpapers.xml
new file mode 100644
index 000000000..90a6af7a7
--- /dev/null
+++ b/res/values-xlarge/wallpapers.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2009 Google Inc.
+ *
+ * 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.
+ -->
+
+<resources>
+ <string-array name="wallpapers" translatable="false">
+ <item>wallpaper_leaf</item>
+ </string-array>
+</resources>
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 4378af19c..b5d0dbb5d 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -16,14 +16,6 @@
package com.android.launcher2;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
import android.animation.Animatable;
import android.animation.AnimatableListenerAdapter;
import android.animation.Animator;
@@ -44,8 +36,8 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.IntentFilter;
import android.content.Intent.ShortcutIconResource;
+import android.content.IntentFilter;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
@@ -79,12 +71,10 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
+import android.view.View.OnLongClickListener;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.animation.AccelerateInterpolator;
-import android.view.View.OnLongClickListener;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.Interpolator;
import android.view.inputmethod.InputMethodManager;
@@ -94,15 +84,22 @@ import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TabHost;
+import android.widget.TabHost.OnTabChangeListener;
+import android.widget.TabHost.TabContentFactory;
import android.widget.TabWidget;
import android.widget.TextView;
import android.widget.Toast;
-import android.widget.TabHost.OnTabChangeListener;
-import android.widget.TabHost.TabContentFactory;
-
import com.android.common.Search;
import com.android.launcher.R;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
/**
* Default launcher application.
*/
@@ -463,11 +460,12 @@ public final class Launcher extends Activity
WallpaperManager wpm = (WallpaperManager)getSystemService(WALLPAPER_SERVICE);
Display display = getWindowManager().getDefaultDisplay();
- boolean isPortrait = display.getWidth() < display.getHeight();
-
- final int width = isPortrait ? display.getWidth() : display.getHeight();
- final int height = isPortrait ? display.getHeight() : display.getWidth();
- wpm.suggestDesiredDimensions(width * WALLPAPER_SCREENS_SPAN, height);
+ // TODO: Put back when we decide about scrolling the wallpaper
+ // boolean isPortrait = display.getWidth() < display.getHeight();
+ // final int width = isPortrait ? display.getWidth() : display.getHeight();
+ // final int height = isPortrait ? display.getHeight() : display.getWidth();
+ wpm.suggestDesiredDimensions(Math.max(display.getWidth(), display.getHeight()),
+ Math.max(display.getWidth(), display.getHeight()));
}
// Note: This doesn't do all the client-id magic that BrowserProvider does
@@ -1009,7 +1007,7 @@ public final class Launcher extends Activity
/**
* Add a widget to the workspace.
*
- * @param data The intent describing the appWidgetId.
+ * @param appWidgetId The app widget id
* @param cellInfo The position on screen where to create the widget.
*/
private void completeAddAppWidget(int appWidgetId, CellLayout.CellInfo cellInfo) {
@@ -2111,7 +2109,7 @@ public final class Launcher extends Activity
// Now a part of LauncherModel.Callbacks. Used to reorder loading steps.
public boolean isAllAppsVisible() {
- return (mAllAppsGrid != null) ? mAllAppsGrid.isVisible() : false;
+ return mAllAppsGrid != null && mAllAppsGrid.isVisible();
}
// AllAppsView.Watcher