diff --git a/build/tools/patch_windows_sdk.sh b/build/tools/patch_windows_sdk.sh
index 842fb47a1..b849c8992 100755
--- a/build/tools/patch_windows_sdk.sh
+++ b/build/tools/patch_windows_sdk.sh
@@ -30,7 +30,7 @@ WIN_OUT_DIR=$2
TOPDIR=${TOPDIR:-$3}
# The unix2dos is provided by the APT package "tofrodos". However
-# as for ubuntu lucid, the package renamed the command to "todos".
+# as of ubuntu lucid, the package renamed the command to "todos".
UNIX2DOS=`which unix2dos`
if [[ ! -x $UNIX2DOS ]]; then
UNIX2DOS=`which todos`
@@ -115,3 +115,4 @@ ${TOPDIR}sdk/build/patch_windows_sdk.sh $Q ${TEMP_SDK_DIR} ${WIN_OUT_DIR} ${TOPD
for i in fastboot.exe adb.exe AdbWinApi.dll AdbWinUsbApi.dll; do
cp -f $V $WIN_OUT_DIR/host/windows-x86/bin/$i $TEMP_SDK_DIR/../$i
done
+
diff --git a/ide/eclipse/.classpath b/ide/eclipse/.classpath
index 750e6a84d..dd495af89 100644
--- a/ide/eclipse/.classpath
+++ b/ide/eclipse/.classpath
@@ -20,6 +20,7 @@
-Ignore SIGUSR1 if you're using JamVM. Shouldn't hurt if you're not. -
--(gdb) handle SIGUSR1 noprint - (gdb) where #0 __futex_wait () at system/klibc/android/atomics_arm.S:88 #1 0x53010eb8 in pthread_cond_timedwait (cond=0x12081c, mutex=0x120818, abstime=0xffffffff) @@ -239,7 +233,7 @@ Previous frame identical to this frame (corrupt stack?)
If it crashes, connect with aproto and run logcat on the device. You should see output like this:
If it crashes, connect with adb and run logcat on the device. You should see output like this:
I/ActivityManager( 188): Starting activity: Intent { component=com.android.calendar.MonthScreen }
diff --git a/pdk/docs/source/git-repo.jd b/pdk/docs/source/git-repo.jd
index 3abb0e3bd..f777e58ef 100644
--- a/pdk/docs/source/git-repo.jd
+++ b/pdk/docs/source/git-repo.jd
@@ -35,7 +35,7 @@ Installing Repo
$ curl http://android.git.kernel.org/repo > ~/bin/repo $ chmod a+x ~/bin/repo
$ mkdir working-directory-name
$ cd working-directory-name
-$ repo init-u git://android.git.kernel.org/platform/manifest.git
+$ repo init -u git://android.git.kernel.org/platform/manifest.git
Synchronizing your client
To synchronize the files for all available projects:
$ repo sync
To
@@ -116,7 +116,7 @@ init
repo init -u url
[options
-]
Installs Repo in the current directory. This creates a .repo/ directory that contains Git repositories for the Repo source code and the standard Android manifest files. The .repo/ directory also containsmanifest.xml, which is a symlink to the selected manifest in the .repo/manifests/ directory.
The -u argument specifies a URL from which to retrieve a manifest repository. For example:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
To select a manifest file within the repository, use the -m option. (If no manifest name is selected, the default is default.xml.)For example:
$ repo init -ugit://android.git.kernel.org/platform/manifest.git-m dalkvik-plus.xml
To specify a revision, that is, a particular manifest-branch, use the -b option. For example:
$ repo init -ugit://android.git.kernel.org/platform/manifest.git-b release-1.0
To see other repo init options, run
$ repo help init
Note:
+]
Installs Repo in the current directory. This creates a .repo/ directory that contains Git repositories for the Repo source code and the standard Android manifest files. The .repo/ directory also containsmanifest.xml, which is a symlink to the selected manifest in the .repo/manifests/ directory.
The -u argument specifies a URL from which to retrieve a manifest repository. For example:
$ repo init -u git://android.git.kernel.org/platform/manifest.git
To select a manifest file within the repository, use the -m option. (If no manifest name is selected, the default is default.xml.)For example:
$ repo init -u git://android.git.kernel.org/platform/manifest.git-m dalkvik-plus.xml
To specify a revision, that is, a particular manifest-branch, use the -b option. For example:
$ repo init -u git://android.git.kernel.org/platform/manifest.git-b release-1.0
To see other repo init options, run
$ repo help init
Note:
For all remaining Repo commands, the current working directory must either be the parent directory of .repo/ or a subdirectory of the parent directory.
sync
diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml
index 35dc7184d..657d0dcf8 100644
--- a/samples/ApiDemos/AndroidManifest.xml
+++ b/samples/ApiDemos/AndroidManifest.xml
@@ -31,6 +31,7 @@
+
@@ -2446,6 +2447,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/ApiDemos/res/xml/filter_nfc.xml b/samples/ApiDemos/res/xml/filter_nfc.xml
new file mode 100644
index 000000000..6d9f05600
--- /dev/null
+++ b/samples/ApiDemos/res/xml/filter_nfc.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+ android.nfc.tech.NfcF
+
+
+
+
+ android.nfc.tech.NfcA
+ android.nfc.tech.MifareClassic
+ android.nfc.tech.Ndef
+
+
diff --git a/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.java b/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.java
new file mode 100644
index 000000000..f29c2684a
--- /dev/null
+++ b/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundDispatch.java
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ * 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.apis.nfc;
+
+import com.example.android.apis.R;
+
+import android.app.Activity;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.IntentFilter.MalformedMimeTypeException;
+import android.nfc.NfcAdapter;
+import android.nfc.tech.NfcF;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.TextView;
+
+/**
+ * An example of how to use the NFC foreground dispatch APIs. This will intercept any MIME data
+ * based NDEF dispatch as well as all dispatched for NfcF tags.
+ */
+public class ForegroundDispatch extends Activity {
+ private NfcAdapter mAdapter;
+ private PendingIntent mPendingIntent;
+ private IntentFilter[] mFilters;
+ private String[][] mTechLists;
+ private TextView mText;
+ private int mCount = 0;
+
+ @Override
+ public void onCreate(Bundle savedState) {
+ super.onCreate(savedState);
+
+ setContentView(R.layout.foreground_dispatch);
+ mText = (TextView) findViewById(R.id.text);
+ mText.setText("Scan a tag");
+
+ mAdapter = NfcAdapter.getDefaultAdapter(this);
+
+ // Create a generic PendingIntent that will be deliver to this activity. The NFC stack
+ // will fill in the intent with the details of the discovered tag before delivering to
+ // this activity.
+ mPendingIntent = PendingIntent.getActivity(this, 0,
+ new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
+
+ // Setup an intent filter for all MIME based dispatches
+ IntentFilter ndef = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);
+ try {
+ ndef.addDataType("*/*");
+ } catch (MalformedMimeTypeException e) {
+ throw new RuntimeException("fail", e);
+ }
+ mFilters = new IntentFilter[] {
+ ndef,
+ };
+
+ // Setup a tech list for all NfcF tags
+ mTechLists = new String[][] { new String[] { NfcF.class.getName() } };
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ mAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters, mTechLists);
+ }
+
+ @Override
+ public void onNewIntent(Intent intent) {
+ Log.i("Foreground dispatch", "Discovered tag with intent: " + intent);
+ mText.setText("Discovered tag " + ++mCount + " with intent: " + intent);
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ mAdapter.disableForegroundDispatch(this);
+ }
+}
diff --git a/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.java b/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.java
new file mode 100644
index 000000000..fe478ed1a
--- /dev/null
+++ b/samples/ApiDemos/src/com/example/android/apis/nfc/ForegroundNdefPush.java
@@ -0,0 +1,86 @@
+/*
+ * 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.
+ * 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.apis.nfc;
+
+import com.example.android.apis.R;
+
+import android.app.Activity;
+import android.nfc.NdefMessage;
+import android.nfc.NdefRecord;
+import android.nfc.NfcAdapter;
+import android.os.Bundle;
+import android.widget.TextView;
+
+import java.nio.charset.Charset;
+import java.util.Locale;
+
+/**
+ * An example of how to use the NFC foreground NDEF push APIs.
+ */
+public class ForegroundNdefPush extends Activity {
+ private NfcAdapter mAdapter;
+ private TextView mText;
+ private NdefMessage mMessage;
+
+ public static NdefRecord newTextRecord(String text, Locale locale, boolean encodeInUtf8) {
+ byte[] langBytes = locale.getLanguage().getBytes(Charset.forName("US-ASCII"));
+
+ Charset utfEncoding = encodeInUtf8 ? Charset.forName("UTF-8") : Charset.forName("UTF-16");
+ byte[] textBytes = text.getBytes(utfEncoding);
+
+ int utfBit = encodeInUtf8 ? 0 : (1 << 7);
+ char status = (char) (utfBit + langBytes.length);
+
+ byte[] data = new byte[1 + langBytes.length + textBytes.length];
+ data[0] = (byte) status;
+ System.arraycopy(langBytes, 0, data, 1, langBytes.length);
+ System.arraycopy(textBytes, 0, data, 1 + langBytes.length, textBytes.length);
+
+ return new NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], data);
+ }
+
+ @Override
+ public void onCreate(Bundle savedState) {
+ super.onCreate(savedState);
+
+ mAdapter = NfcAdapter.getDefaultAdapter(this);
+
+ setContentView(R.layout.foreground_dispatch);
+ mText = (TextView) findViewById(R.id.text);
+ if (mAdapter != null) {
+ mText.setText("Tap another Android phone with NFC to push 'NDEF Push Sample'");
+ } else {
+ mText.setText("This phone is not NFC enabled.");
+ }
+
+ // Create an NDEF message with some sample text
+ mMessage = new NdefMessage(
+ new NdefRecord[] { newTextRecord("NDEF Push Sample", Locale.ENGLISH, true)});
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ if (mAdapter != null) mAdapter.enableForegroundNdefPush(this, mMessage);
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ if (mAdapter != null) mAdapter.disableForegroundNdefPush(this);
+ }
+}
diff --git a/samples/ApiDemos/src/com/example/android/apis/nfc/TechFilter.java b/samples/ApiDemos/src/com/example/android/apis/nfc/TechFilter.java
new file mode 100644
index 000000000..4042a810f
--- /dev/null
+++ b/samples/ApiDemos/src/com/example/android/apis/nfc/TechFilter.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2011 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
+ */
+
+package com.example.android.apis.nfc;
+
+import com.example.android.apis.R;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.nfc.NfcAdapter;
+import android.os.Bundle;
+import android.widget.TextView;
+
+public class TechFilter extends Activity {
+ private TextView mText;
+ private int mCount = 0;
+
+ @Override
+ public void onCreate(Bundle savedState) {
+ super.onCreate(savedState);
+
+ setContentView(R.layout.foreground_dispatch);
+ mText = (TextView) findViewById(R.id.text);
+
+ Intent intent = getIntent();
+ String action = intent.getAction();
+ if (NfcAdapter.ACTION_TECHNOLOGY_DISCOVERED.equals(action)) {
+ mText.setText("Discovered tag " + ++mCount + " with intent: " + intent);
+ } else {
+ mText.setText("Scan a tag");
+ }
+ }
+
+ @Override
+ public void onNewIntent(Intent intent) {
+ mText.setText("Discovered tag " + ++mCount + " with intent: " + intent);
+ }
+}
diff --git a/samples/NotePad/res/drawable-hdpi/ic_menu_compose.png b/samples/NotePad/res/drawable-hdpi/ic_menu_compose.png
index 6ad379e22..bc153fac0 100644
Binary files a/samples/NotePad/res/drawable-hdpi/ic_menu_compose.png and b/samples/NotePad/res/drawable-hdpi/ic_menu_compose.png differ
diff --git a/samples/NotePad/res/drawable-hdpi/ic_menu_delete.png b/samples/NotePad/res/drawable-hdpi/ic_menu_delete.png
index 2aed26a1b..ce5ecc48a 100644
Binary files a/samples/NotePad/res/drawable-hdpi/ic_menu_delete.png and b/samples/NotePad/res/drawable-hdpi/ic_menu_delete.png differ
diff --git a/samples/NotePad/res/drawable-hdpi/ic_menu_edit.png b/samples/NotePad/res/drawable-hdpi/ic_menu_edit.png
index 602dd1041..4748cdadd 100644
Binary files a/samples/NotePad/res/drawable-hdpi/ic_menu_edit.png and b/samples/NotePad/res/drawable-hdpi/ic_menu_edit.png differ
diff --git a/samples/NotePad/res/drawable-hdpi/ic_menu_revert.png b/samples/NotePad/res/drawable-hdpi/ic_menu_revert.png
index 11860a4e1..ffc67d913 100644
Binary files a/samples/NotePad/res/drawable-hdpi/ic_menu_revert.png and b/samples/NotePad/res/drawable-hdpi/ic_menu_revert.png differ
diff --git a/samples/NotePad/res/drawable-hdpi/ic_menu_save.png b/samples/NotePad/res/drawable-hdpi/ic_menu_save.png
index fc26c5d5f..62d0b9a00 100644
Binary files a/samples/NotePad/res/drawable-hdpi/ic_menu_save.png and b/samples/NotePad/res/drawable-hdpi/ic_menu_save.png differ
diff --git a/samples/NotePad/res/drawable/ic_menu_compose.png b/samples/NotePad/res/drawable/ic_menu_compose.png
index 1b4733e42..121228c8c 100644
Binary files a/samples/NotePad/res/drawable/ic_menu_compose.png and b/samples/NotePad/res/drawable/ic_menu_compose.png differ
diff --git a/samples/NotePad/res/drawable/ic_menu_delete.png b/samples/NotePad/res/drawable/ic_menu_delete.png
old mode 100755
new mode 100644
index 7d954943d..bb533f75e
Binary files a/samples/NotePad/res/drawable/ic_menu_delete.png and b/samples/NotePad/res/drawable/ic_menu_delete.png differ
diff --git a/samples/NotePad/res/drawable/ic_menu_edit.png b/samples/NotePad/res/drawable/ic_menu_edit.png
old mode 100755
new mode 100644
index 41a9c2e20..1de85ca16
Binary files a/samples/NotePad/res/drawable/ic_menu_edit.png and b/samples/NotePad/res/drawable/ic_menu_edit.png differ
diff --git a/samples/NotePad/res/drawable/ic_menu_revert.png b/samples/NotePad/res/drawable/ic_menu_revert.png
index e7e04f531..2afc8e883 100644
Binary files a/samples/NotePad/res/drawable/ic_menu_revert.png and b/samples/NotePad/res/drawable/ic_menu_revert.png differ
diff --git a/samples/NotePad/res/drawable/ic_menu_save.png b/samples/NotePad/res/drawable/ic_menu_save.png
index 36d50b387..ffd7fb721 100644
Binary files a/samples/NotePad/res/drawable/ic_menu_save.png and b/samples/NotePad/res/drawable/ic_menu_save.png differ
diff --git a/samples/SipDemo/res/drawable/btn_record.xml b/samples/SipDemo/res/drawable/btn_record.xml
index a803da11c..e7980e9e7 100644
--- a/samples/SipDemo/res/drawable/btn_record.xml
+++ b/samples/SipDemo/res/drawable/btn_record.xml
@@ -17,7 +17,7 @@
-
+