From 1c48b700d36c13be2ad79152f2ef2c7da39bb4ba Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Queru Date: Thu, 12 Nov 2009 18:46:25 -0800 Subject: eclair snapshot --- apps/upgrade/Android.mk | 31 ++ apps/upgrade/AndroidManifest.xml | 32 ++ .../example/android/platform/upgrade/Upgrade.java | 48 +++ products/sample_addon.mk | 5 +- sdk_addon/hardware.ini | 4 +- sdk_addon/manifest.ini | 2 + skins/WVGAMedDpi/arrow_down.png | Bin 0 -> 449 bytes skins/WVGAMedDpi/arrow_left.png | Bin 0 -> 825 bytes skins/WVGAMedDpi/arrow_right.png | Bin 0 -> 795 bytes skins/WVGAMedDpi/arrow_up.png | Bin 0 -> 453 bytes skins/WVGAMedDpi/background_land.png | Bin 0 -> 4033 bytes skins/WVGAMedDpi/background_port.png | Bin 0 -> 4619 bytes skins/WVGAMedDpi/button.png | Bin 0 -> 592 bytes skins/WVGAMedDpi/controls.png | Bin 0 -> 19390 bytes skins/WVGAMedDpi/hardware.ini | 2 + skins/WVGAMedDpi/key.png | Bin 0 -> 154 bytes skins/WVGAMedDpi/keyboard.png | Bin 0 -> 20001 bytes skins/WVGAMedDpi/layout | 437 +++++++++++++++++++++ skins/WVGAMedDpi/select.png | Bin 0 -> 384 bytes skins/WVGAMedDpi/spacebar.png | Bin 0 -> 192 bytes 20 files changed, 558 insertions(+), 3 deletions(-) create mode 100644 apps/upgrade/Android.mk create mode 100644 apps/upgrade/AndroidManifest.xml create mode 100644 apps/upgrade/src/com/example/android/platform/upgrade/Upgrade.java create mode 100644 skins/WVGAMedDpi/arrow_down.png create mode 100644 skins/WVGAMedDpi/arrow_left.png create mode 100644 skins/WVGAMedDpi/arrow_right.png create mode 100644 skins/WVGAMedDpi/arrow_up.png create mode 100644 skins/WVGAMedDpi/background_land.png create mode 100644 skins/WVGAMedDpi/background_port.png create mode 100644 skins/WVGAMedDpi/button.png create mode 100644 skins/WVGAMedDpi/controls.png create mode 100644 skins/WVGAMedDpi/hardware.ini create mode 100644 skins/WVGAMedDpi/key.png create mode 100644 skins/WVGAMedDpi/keyboard.png create mode 100644 skins/WVGAMedDpi/layout create mode 100644 skins/WVGAMedDpi/select.png create mode 100644 skins/WVGAMedDpi/spacebar.png diff --git a/apps/upgrade/Android.mk b/apps/upgrade/Android.mk new file mode 100644 index 0000000..8217ca3 --- /dev/null +++ b/apps/upgrade/Android.mk @@ -0,0 +1,31 @@ +# +# Copyright (C) 2008 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. +# + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE_TAGS := user + +# This is the target being built. +LOCAL_PACKAGE_NAME := UpgradeExample + +# Only compile source java files in this apk. +LOCAL_SRC_FILES := $(call all-java-files-under, src) + +# Link against the current Android SDK. +LOCAL_SDK_VERSION := current + +include $(BUILD_PACKAGE) diff --git a/apps/upgrade/AndroidManifest.xml b/apps/upgrade/AndroidManifest.xml new file mode 100644 index 0000000..a3054e0 --- /dev/null +++ b/apps/upgrade/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + diff --git a/apps/upgrade/src/com/example/android/platform/upgrade/Upgrade.java b/apps/upgrade/src/com/example/android/platform/upgrade/Upgrade.java new file mode 100644 index 0000000..a9e04ca --- /dev/null +++ b/apps/upgrade/src/com/example/android/platform/upgrade/Upgrade.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2007 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. + */ + +package com.example.android.platform.upgrade; + +import android.content.BroadcastReceiver; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.util.Log; + +/** + * This will be launched during system boot, after the core system has + * been brought up but before any non-persistent processes have been + * started. It is launched in a special state, with no content provider + * or custom application class associated with the process running. + */ +public class Upgrade extends BroadcastReceiver { + @Override + public void onReceive(Context context, Intent intent) { + // We are now running with the system up, but no apps started, + // so can do whatever cleanup after an upgrade that we want. + Log.i("Example", "******************* UPGRADE HERE *******************"); + + // And now disable this component so it won't get launched during + // the following system boots. + + context.getPackageManager().setComponentEnabledSetting( + new ComponentName(context, getClass()), + PackageManager.COMPONENT_ENABLED_STATE_DISABLED, + PackageManager.DONT_KILL_APP); + } +} + diff --git a/products/sample_addon.mk b/products/sample_addon.mk index ebf6cc7..4c5b2b4 100644 --- a/products/sample_addon.mk +++ b/products/sample_addon.mk @@ -14,13 +14,14 @@ PRODUCT_SDK_ADDON_NAME := platform_library # Copy the manifest and hardware files for the SDK add-on. # The content of those files is manually created for now. PRODUCT_SDK_ADDON_COPY_FILES := \ + vendor/sample/sdk_addon/manifest.ini:manifest.ini \ vendor/sample/sdk_addon/hardware.ini:hardware.ini \ - vendor/sample/sdk_addon/manifest.ini:manifest.ini + $(call find-copy-subdir-files,*,vendor/sample/skins/WVGAMedDpi,skins/WVGAMedDpi) # Add this to PRODUCT_SDK_ADDON_COPY_FILES to copy the files for an # emulator skin (or for samples) -# $(call find-copy-subdir-files,*,development/emulator/skins/HVGA,skins/HVGA) +#$(call find-copy-subdir-files,*,vendor/sample/skins/WVGAMedDpi,skins/WVGAMedDpi) # Copy the jar files for the optional libraries that are exposed as APIs. PRODUCT_SDK_ADDON_COPY_MODULES := \ diff --git a/sdk_addon/hardware.ini b/sdk_addon/hardware.ini index c026136..e7bc18d 100644 --- a/sdk_addon/hardware.ini +++ b/sdk_addon/hardware.ini @@ -1 +1,3 @@ -#no custom hardware setup for the sample SDK add-on. +# Custom hardware options for the add-on. +# Properties defined here impact all AVD targetting this add-on. +# Each skin can also override those values with its own hardware.ini file. \ No newline at end of file diff --git a/sdk_addon/manifest.ini b/sdk_addon/manifest.ini index 4184a4a..d1b29e9 100644 --- a/sdk_addon/manifest.ini +++ b/sdk_addon/manifest.ini @@ -17,6 +17,8 @@ libraries=com.example.android.platform_library # details for each library com.example.android.platform_library=platform_library.jar;Sample optional plaform library +# default skin name +skin=WVGAMedDpi # USB Vendor ID # This 16-bit integer allows adb to detect new devices, by extending the list diff --git a/skins/WVGAMedDpi/arrow_down.png b/skins/WVGAMedDpi/arrow_down.png new file mode 100644 index 0000000..b9fde22 Binary files /dev/null and b/skins/WVGAMedDpi/arrow_down.png differ diff --git a/skins/WVGAMedDpi/arrow_left.png b/skins/WVGAMedDpi/arrow_left.png new file mode 100644 index 0000000..281b192 Binary files /dev/null and b/skins/WVGAMedDpi/arrow_left.png differ diff --git a/skins/WVGAMedDpi/arrow_right.png b/skins/WVGAMedDpi/arrow_right.png new file mode 100644 index 0000000..4cbc65d Binary files /dev/null and b/skins/WVGAMedDpi/arrow_right.png differ diff --git a/skins/WVGAMedDpi/arrow_up.png b/skins/WVGAMedDpi/arrow_up.png new file mode 100644 index 0000000..29c7121 Binary files /dev/null and b/skins/WVGAMedDpi/arrow_up.png differ diff --git a/skins/WVGAMedDpi/background_land.png b/skins/WVGAMedDpi/background_land.png new file mode 100644 index 0000000..4967717 Binary files /dev/null and b/skins/WVGAMedDpi/background_land.png differ diff --git a/skins/WVGAMedDpi/background_port.png b/skins/WVGAMedDpi/background_port.png new file mode 100644 index 0000000..13ef2ea Binary files /dev/null and b/skins/WVGAMedDpi/background_port.png differ diff --git a/skins/WVGAMedDpi/button.png b/skins/WVGAMedDpi/button.png new file mode 100644 index 0000000..8281d20 Binary files /dev/null and b/skins/WVGAMedDpi/button.png differ diff --git a/skins/WVGAMedDpi/controls.png b/skins/WVGAMedDpi/controls.png new file mode 100644 index 0000000..04b85e2 Binary files /dev/null and b/skins/WVGAMedDpi/controls.png differ diff --git a/skins/WVGAMedDpi/hardware.ini b/skins/WVGAMedDpi/hardware.ini new file mode 100644 index 0000000..f6a30b0 --- /dev/null +++ b/skins/WVGAMedDpi/hardware.ini @@ -0,0 +1,2 @@ +# skin-specific hardware values +hw.lcd.density=160 \ No newline at end of file diff --git a/skins/WVGAMedDpi/key.png b/skins/WVGAMedDpi/key.png new file mode 100644 index 0000000..40b03bf Binary files /dev/null and b/skins/WVGAMedDpi/key.png differ diff --git a/skins/WVGAMedDpi/keyboard.png b/skins/WVGAMedDpi/keyboard.png new file mode 100644 index 0000000..ca49dcf Binary files /dev/null and b/skins/WVGAMedDpi/keyboard.png differ diff --git a/skins/WVGAMedDpi/layout b/skins/WVGAMedDpi/layout new file mode 100644 index 0000000..6037ab8 --- /dev/null +++ b/skins/WVGAMedDpi/layout @@ -0,0 +1,437 @@ +parts { + portrait { + background { + image background_port.png + } + } + landscape { + background { + image background_land.png + } + } + + device { + display { + width 480 + height 800 + x 0 + y 0 + } + } + + controls { + background { + image controls.png + } + buttons { + soft-left { + image button.png + x 56 + y 142 + } + home { + image button.png + x 0 + y 142 + } + back { + image button.png + x 112 + y 142 + } + dpad-up { + image arrow_up.png + x 77 + y 53 + } + dpad-down { + image arrow_down.png + x 77 + y 106 + } + dpad-left { + image arrow_left.png + x 53 + y 53 + } + dpad-right { + image arrow_right.png + x 123 + y 53 + } + dpad-center { + image select.png + x 77 + y 81 + } + phone-dial { + image button.png + x 0 + y 71 + } + phone-hangup { + image button.png + x 168 + y 71 + } + + power { + image button.png + x 168 + y 0 + } + + volume-up { + image button.png + x 112 + y 0 + } + + volume-down { + image button.png + x 56 + y 0 + } + + search { + image button.png + x 168 + y 142 + } + + } + } + + keyboard { + background { + image keyboard.png + } + buttons { + 1 { + image key.png + x 5 + y 5 + } + 2 { + image key.png + x 42 + y 5 + } + 3 { + image key.png + x 79 + y 5 + } + 4 { + image key.png + x 116 + y 5 + } + 5 { + image key.png + x 153 + y 5 + } + 6 { + image key.png + x 190 + y 5 + } + 7 { + image key.png + x 227 + y 5 + } + 8 { + image key.png + x 264 + y 5 + } + 9 { + image key.png + x 301 + y 5 + } + 0 { + image key.png + x 338 + y 5 + } + + q { + image key.png + x 5 + y 41 + } + w { + image key.png + x 42 + y 41 + } + e { + image key.png + x 79 + y 41 + } + r { + image key.png + x 116 + y 41 + } + t { + image key.png + x 153 + y 41 + } + y { + image key.png + x 190 + y 41 + } + u { + image key.png + x 227 + y 41 + } + i { + image key.png + x 264 + y 41 + } + o { + image key.png + x 301 + y 41 + } + p { + image key.png + x 338 + y 41 + } + + a { + image key.png + x 5 + y 77 + } + s { + image key.png + x 42 + y 77 + } + d { + image key.png + x 79 + y 77 + } + f { + image key.png + x 116 + y 77 + } + g { + image key.png + x 153 + y 77 + } + h { + image key.png + x 190 + y 77 + } + j { + image key.png + x 227 + y 77 + } + k { + image key.png + x 264 + y 77 + } + l { + image key.png + x 301 + y 77 + } + DEL { + image key.png + x 338 + y 77 + } + + CAP { + image key.png + x 5 + y 113 + } + z { + image key.png + x 42 + y 113 + } + x { + image key.png + x 79 + y 113 + } + c { + image key.png + x 116 + y 113 + } + v { + image key.png + x 153 + y 113 + } + b { + image key.png + x 190 + y 113 + } + n { + image key.png + x 227 + y 113 + } + m { + image key.png + x 264 + y 113 + } + PERIOD { + image key.png + x 301 + y 113 + } + ENTER { + image key.png + x 338 + y 113 + } + + ALT { + image key.png + x 5 + y 149 + } + SYM { + image key.png + x 42 + y 149 + } + AT { + image key.png + x 79 + y 149 + } + SPACE { + image spacebar.png + x 116 + y 149 + } + SLASH { + image key.png + x 264 + y 149 + } + COMMA { + image key.png + x 301 + y 149 + } + ALT2 { + image key.png + x 338 + y 149 + } + + } + } +} + +layouts { + portrait { + width 950 + height 854 + color 0xe0e0e0 + event EV_SW:0:1 + + part1 { + name portrait + x 0 + y 0 + } + + part2 { + name landscape + x 1000 + y 0 + } + + part3 { + name device + x 27 + y 27 + } + part4 { + name controls + x 635 + y 207 + } + part5 { + name keyboard + x 554 + y 459 + } + + } + + landscape { + width 853 + height 761 + color 0xe0e0e0 + event EV_SW:0:0 + + part1 { + name portrait + x 900 + y 0 + } + + part2 { + name landscape + x 0 + y 0 + } + + part3 { + name device + x 26 + y 509 + rotation 3 + } + + part4 { + name controls + x 539 + y 556 + } + + part5 { + name keyboard + x 98 + y 556 + } + } +} + +keyboard { + charmap qwerty2 +} + +network { + speed full + delay none +} diff --git a/skins/WVGAMedDpi/select.png b/skins/WVGAMedDpi/select.png new file mode 100644 index 0000000..f4a65d3 Binary files /dev/null and b/skins/WVGAMedDpi/select.png differ diff --git a/skins/WVGAMedDpi/spacebar.png b/skins/WVGAMedDpi/spacebar.png new file mode 100644 index 0000000..aa459bd Binary files /dev/null and b/skins/WVGAMedDpi/spacebar.png differ -- cgit v1.2.3