Merge branch 'eclair' into eclair-release
This commit is contained in:
@@ -1669,6 +1669,8 @@ public final class Telephony {
|
||||
|
||||
public static final String NUMERIC = "numeric";
|
||||
|
||||
public static final String AUTH_TYPE = "authtype";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String CURRENT = "current";
|
||||
|
||||
@@ -30,6 +30,11 @@ applications on the emulator. </p>
|
||||
<dd>The Hierarchy Viewer tool allows you to debug and optimize your user interface.
|
||||
It provides a visual representation of your layout's hierarchy of Views and a magnified inspector
|
||||
of the current display with a pixel grid, so you can get your layout just right.
|
||||
</dd>
|
||||
|
||||
<dt><a href="layoutopt.html">layoutopt</a></dt>
|
||||
<dd>This tool lets you quickly analyze your application's layouts for
|
||||
efficiency.
|
||||
</dd>
|
||||
|
||||
<dt><a href="draw9patch.html">Draw 9-patch</a></dt>
|
||||
|
||||
62
docs/html/guide/developing/tools/layoutopt.jd
Normal file
62
docs/html/guide/developing/tools/layoutopt.jd
Normal file
@@ -0,0 +1,62 @@
|
||||
page.title=layoutopt
|
||||
@jd:body
|
||||
|
||||
<p><code>layoutopt</code> is a command-line tool that helps you optimize the
|
||||
layouts and layout hierarchies of your applications. You can run it against your
|
||||
layout files or resource directories to quickly check for inefficiencies or
|
||||
other types of problems that could be affecting the performance of your
|
||||
application. </p>
|
||||
|
||||
<p>To run the tool, open a terminal and launch <code>layoutopt
|
||||
<resources></code> from your SDK <code>tools/</code> directory. In the
|
||||
command, supply a list of uncompiled resource xml files or directories that you
|
||||
want to analyze. </p>
|
||||
|
||||
<p>When run, the tool loads the specified XML files and analyzes their layout
|
||||
structures and hierarchies according to a set of predefined rules. If it detects
|
||||
issues, it outputs information about the issues, giving filename, line numbers,
|
||||
description of issue, and for some types of issues a suggested resolution. </p>
|
||||
|
||||
<p>Here's an example of the output:</p>
|
||||
|
||||
<pre>$ layoutopt samples/
|
||||
samples/compound.xml
|
||||
7:23 The root-level <FrameLayout/> can be replaced with <merge/>
|
||||
11:21 This LinearLayout layout or its FrameLayout parent is useless
|
||||
samples/simple.xml
|
||||
7:7 The root-level <FrameLayout/> can be replaced with <merge/>
|
||||
samples/too_deep.xml
|
||||
-1:-1 This layout has too many nested layouts: 13 levels, it should have <= 10!
|
||||
20:81 This LinearLayout layout or its LinearLayout parent is useless
|
||||
24:79 This LinearLayout layout or its LinearLayout parent is useless
|
||||
28:77 This LinearLayout layout or its LinearLayout parent is useless
|
||||
32:75 This LinearLayout layout or its LinearLayout parent is useless
|
||||
36:73 This LinearLayout layout or its LinearLayout parent is useless
|
||||
40:71 This LinearLayout layout or its LinearLayout parent is useless
|
||||
44:69 This LinearLayout layout or its LinearLayout parent is useless
|
||||
48:67 This LinearLayout layout or its LinearLayout parent is useless
|
||||
52:65 This LinearLayout layout or its LinearLayout parent is useless
|
||||
56:63 This LinearLayout layout or its LinearLayout parent is useless
|
||||
samples/too_many.xml
|
||||
7:413 The root-level <FrameLayout/> can be replaced with <merge/>
|
||||
-1:-1 This layout has too many views: 81 views, it should have <= 80!
|
||||
samples/useless.xml
|
||||
7:19 The root-level <FrameLayout/> can be replaced with <merge/>
|
||||
11:17 This LinearLayout layout or its FrameLayout parent is useless</pre>
|
||||
|
||||
<p>The <code>layoutopt</code> tool is available in SDK Tools, Revision 3 or
|
||||
later. If you do not have SDK Tools 3 or later installed in your SDK, you can
|
||||
download it from the Android SDK repository site using the Android SDK and AVD
|
||||
Manager. For information, see <a
|
||||
href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
|
||||
|
||||
<h3>Usage</h3>
|
||||
|
||||
<p>To run <code>layoutopt</code> against a given list of layout resources:</p>
|
||||
|
||||
<pre>layoutopt <list of xml files or directories></pre>
|
||||
|
||||
<p>For example:</p>
|
||||
|
||||
<pre>$ layoutopt res/layout-land</pre>
|
||||
<pre>$ layoutopt res/layout/main.xml res/layout-land/main.xml</pre>
|
||||
@@ -255,6 +255,7 @@
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/draw9patch.html">Draw 9-Patch</a></li>
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/emulator.html">Emulator</a></li>
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a></li>
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/layoutopt.html">layoutopt</a></li>
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/othertools.html#mksdcard">mksdcard</a></li>
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/monkey.html">Monkey</a></li>
|
||||
<li><a href="<?cs var:toroot ?>guide/developing/tools/adb.html#sqlite">sqlite3</a></li>
|
||||
|
||||
@@ -25,6 +25,7 @@ parent.link=index.html
|
||||
<li><a href="#SizePaddingMargin">Size, Padding and Margins</a></li>
|
||||
<li><a href="#example">Example Layout</a></li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -41,14 +42,17 @@ application can create View and ViewGroup objects (and manipulate their properti
|
||||
<p>The Android framework gives you the flexibility to use either or both of these methods for declaring and managing your application's UI. For example, you could declare your application's default layouts in XML, including the screen elements that will appear in them and their properties. You could then add code in your application that would modify the state of the screen objects, including those declared in XML, at run time. </p>
|
||||
|
||||
<div class="sidebox">
|
||||
<p>The <a href="{@docRoot}guide/developing/tools/adt.html">Android Development Tools</a>
|
||||
(ADT) plugin for Eclipse offers a layout preview of your XML —
|
||||
with the XML file opened, select the <strong>Layout</strong> tab.</p>
|
||||
<p>You should also try the
|
||||
<ul>
|
||||
<li>The <a href="{@docRoot}sdk/eclipse-adt.html">ADT
|
||||
Plugin for Eclipse</a> offers a layout preview of your XML —
|
||||
with the XML file opened, select the <strong>Layout</strong> tab.</li>
|
||||
<li>You should also try the
|
||||
<a href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a> tool,
|
||||
for debugging layouts — it reveals layout property values,
|
||||
draws wireframes with padding/margin indicators, and full rendered views while
|
||||
you debug on the emulator or device.</p>
|
||||
you debug on the emulator or device.</li>
|
||||
<li>The <a href="{@docRoot}guide/developing/tools/layoutopt.html">layoutopt</a> tool lets
|
||||
you quickly analyze your layouts and hierarchies for inefficiencies or other problems.</li>
|
||||
</div>
|
||||
|
||||
<p>The advantage to declaring your UI in XML is that it enables you to better separate the presentation of your application from the code that controls its behavior. Your UI descriptions are external to your application code, which means that you can modify or adapt it without having to modify your source code and recompile. For example, you can create XML layouts for different screen orientations, different device screen sizes, and different languages. Additionally, declaring the layout in XML makes it easier to visualize the structure of your UI, so it's easier to debug problems. As such, this document focuses on teaching you how to declare your layout in XML. If you're
|
||||
|
||||
@@ -539,8 +539,10 @@ height="158" style="margin-left:15px"></p>
|
||||
<p><img src="{@docRoot}images/hello_l10n/using_custom_locale.png" alt="using custom locale"
|
||||
width="512" height="299" style="margin-left:15px"></p>
|
||||
|
||||
<p>For a list of supported locales in a specific Android platform, see the
|
||||
associated notes in the "SDK" tab, under "Downloadable SDK Components."</p>
|
||||
<p>For a list of locales available on different versions of the Android platform,
|
||||
refer to the platform notes documents, listed under "Downloadable SDK Components"
|
||||
in the "SDK" tab. For example, <a
|
||||
href="{@docRoot}sdk/android-2.0.html#locs">Android 2.0 locales</a>.</p>
|
||||
|
||||
<p>Run the application for each of the expected locales, plus one unexpected
|
||||
locale. Here are some of the results you should see:</p>
|
||||
|
||||
@@ -20,7 +20,7 @@ home=true
|
||||
</div> <!-- end annoucement -->
|
||||
</div> <!-- end annoucement-block -->
|
||||
</div><!-- end topAnnouncement -->
|
||||
<div id="carouselMain" style="height:190px"> <!-- this height can be adjusted based on the content height -->
|
||||
<div id="carouselMain" style="height:215px"> <!-- this height can be adjusted based on the content height -->
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
<div id="carouselWheel">
|
||||
@@ -46,8 +46,8 @@ home=true
|
||||
<td class="imageCell"><a href="{@docRoot}sdk/index.html"><img src="{@docRoot}assets/images/icon_download.jpg" style="padding:0" /></a></td>
|
||||
<td>
|
||||
<h2 class="green">Download</h2>
|
||||
<p>The Android SDK has the tools, sample code, and docs you need to create great apps. </p>
|
||||
<p><a href="{@docRoot}sdk/{@sdkCurrent}/index.html">Learn more »</a></p>
|
||||
<p>The Android SDK the tools, sample code, and docs you need to create great apps.</p>
|
||||
<p><a href="{@docRoot}sdk/index.html">Learn more »</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -79,7 +79,7 @@ home=true
|
||||
<td class="imageCell"><a href="http://www.youtube.com/user/androiddevelopers"><img src="{@docRoot}assets/images/video-droid.png" style="padding:0" /></a></td>
|
||||
<td>
|
||||
<h2 class="green">Watch</h2>
|
||||
<object width="150" height="140"><param name="movie" value="http://www.youtube.com/v/GARMe7Km_gk&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GARMe7Km_gk&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="150" height="140"></embed></object>
|
||||
<object width="150" height="140"><param name="movie" value="http://www.youtube.com/v/N6YdwzAvwOA&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/N6YdwzAvwOA&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="150" height="140"></embed></object>
|
||||
<p style="margin-top:1em"><a href="{@docRoot}videos/index.html">More Android videos »</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -120,24 +120,25 @@ home=true
|
||||
'sdk': {
|
||||
'layout':"imgLeft",
|
||||
'icon':"sdk-small.png",
|
||||
'name':"Android 1.6 SDK",
|
||||
'img':"donut-android.png",
|
||||
'title':"Android 1.6 SDK",
|
||||
'desc': "<p>The Android 1.6 SDK is now available, with new APIs and updated tools!</p>"
|
||||
+ " <p>For more about the Android 1.6 platform, read the <a href='http://developer.android.com/sdk/android-1.6-highlights.html'>highlights</a>"
|
||||
+ "<!--and watch some <a href='http://developer.android.com/videos/index.html'>videos</a>-->."
|
||||
+ " Also keep an eye on the <a href='http://android-developers.blogspot.com'>Blog</a>"
|
||||
+ " for posts about some of the new developer technologies in Android 1.6.</p>"
|
||||
+ "<p><a href='{@docRoot}sdk/1.6_r1/index.html'>Download the Android 1.6 SDK »</a></p>"
|
||||
'name':"Android 2.0",
|
||||
'img':"eclair-android.png",
|
||||
'title':"Android 2.0 has arrived!",
|
||||
'desc': "<p>Android 2.0 includes exciting new features and APIs. "
|
||||
+ "For information about what's included in the new platform, read "
|
||||
+ "the <a href='{@docRoot}sdk/android-2.0.html'>Android 2.0 version notes</a>.</p>"
|
||||
+ "<p>If you have the Android 1.6 SDK, you can update your environment "
|
||||
+ "by installing the Android 2.0 platform and updated tools as "
|
||||
+ "<a href='{@docRoot}sdk/adding-components.html'>SDK components</a>. Otherwise, "
|
||||
+ "<a href='{@docRoot}sdk/index.html'>download a new Android SDK</a>.</p>"
|
||||
},
|
||||
|
||||
'io': {
|
||||
'devphone': {
|
||||
'layout':"imgLeft",
|
||||
'icon':"io-small.png",
|
||||
'name':"Google I/O",
|
||||
'img':"io-large.png",
|
||||
'title':"Google I/O Developer Conference",
|
||||
'desc': "<p>The Google I/O developer conference took place May 27-28 in San Francisco. If you missed the conference, you can experience the Android sessions by viewing YouTube videos.</p><p><a href='{@docRoot}videos/index.html'>See the sessions from Google I/O »</a></p>"
|
||||
'icon':"devphone-small.png",
|
||||
'name':"Dev Phone 1",
|
||||
'img':"devphone-large.png",
|
||||
'title':"Android Dev Phone 1",
|
||||
'desc': "<p>Run and debug your Android applications directly on this device. Modify and rebuild the Android operating system, and flash it onto the phone. The Android Dev Phone 1 is carrier independent, and available for purchase by any developer registered with <a href='http://market.android.com/publish'>Android Market</a>.</p><p><a href='/guide/developing/device.html#dev-phone-1'>Learn more about the Android Dev Phone 1 »</a></p>"
|
||||
},
|
||||
|
||||
'mapskey': {
|
||||
@@ -149,13 +150,13 @@ home=true
|
||||
'desc':"<p>If you're writing an Android application that uses Google Maps (with MapView), you must register your application to obtain a Maps API Key. Without the key, your maps application will not work on Android devices. Obtaining a key requires just a couple of steps.</p><p><a href='http://code.google.com/android/add-ons/google-apis/maps-overview.html'>Learn more »</a></p>"
|
||||
},
|
||||
|
||||
'devphone': {
|
||||
'io': {
|
||||
'layout':"imgLeft",
|
||||
'icon':"devphone-small.png",
|
||||
'name':"Dev Phone 1",
|
||||
'img':"devphone-large.png",
|
||||
'title':"Android Dev Phone 1",
|
||||
'desc': "<p>Run and debug your Android applications directly on this device. Modify and rebuild the Android operating system, and flash it onto the phone. The Android Dev Phone 1 is carrier independent, and available for purchase by any developer registered with <a href='http://market.android.com/publish'>Android Market</a>.</p><p><a href='/guide/developing/device.html#dev-phone-1'>Learn more about the Android Dev Phone 1 »</a></p>"
|
||||
'icon':"io-small.png",
|
||||
'name':"Google I/O",
|
||||
'img':"io-large.png",
|
||||
'title':"Google I/O Developer Conference",
|
||||
'desc': "<p>The Google I/O developer conference took place May 27-28 in San Francisco. If you missed the conference, you can experience the Android sessions by viewing YouTube videos.</p><p><a href='{@docRoot}videos/index.html'>See the sessions from Google I/O »</a></p>"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ home=true
|
||||
<td>
|
||||
<h2 class="green">ダウンロード</h2>
|
||||
<p>Android SDK には、優れたアプリケーションの作成に必要となるツール、サンプル コード、ドキュメントが含まれています。 </p>
|
||||
<p><a href="{@docRoot}sdk/{@sdkCurrent}/index.html">詳細 »</a></p>
|
||||
<p><a href="{@docRoot}sdk/index.html">詳細 »</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -118,10 +118,10 @@ home=true
|
||||
'sdk': {
|
||||
'layout':"imgLeft",
|
||||
'icon':"sdk-small.png",
|
||||
'name':"SDK 1.6 r1",
|
||||
'img':"donut-android.png",
|
||||
'title':"Android 1.6 SDK",
|
||||
'desc': "<p>Android 1.6 SDK の最新バージョンが公開されました。このリリースには Android 1.6 用の API、最新版デベロッパーツール、複数プラットフォーム(バージョン)サポート、そして Google API のアドオンが含まれています。</p><p><a href='{@docRoot}sdk/1.6_r1/index.html'>Android 1.6 SDK をダウンロード »</a></p>"
|
||||
'name':"Android 2.0",
|
||||
'img':"eclair-android.png",
|
||||
'title':"Android 2.0",
|
||||
'desc': "<p>Android 2.0 の最新バージョンが公開されました。このリリースには Android 2.0 用の API、最新版デベロッパーツール、複数プラットフォーム(バージョン)サポート、そして Google API のアドオンが含まれています。</p><p><a href='{@docRoot}sdk/index.html'>Android SDK をダウンロード »</a></p>"
|
||||
},
|
||||
|
||||
'io': {
|
||||
|
||||
@@ -2,10 +2,10 @@ page.title=SDK Release Notes
|
||||
@jd:body
|
||||
|
||||
<p>This document provides version-specific information about Android SDK
|
||||
releases. For the latest known issues, please ensure that you're viewing this
|
||||
releases. <!--For the latest known issues, please ensure that you're viewing this
|
||||
page at <a
|
||||
href="http://developer.android.com/sdk/RELEASENOTES.html">http://developer.
|
||||
android.com/sdk/RELEASENOTES.html</a>.</p>
|
||||
android.com/sdk/RELEASENOTES.html</a>.--></p>
|
||||
|
||||
<h2 id="multiversion_r1">Android SDK</h2>
|
||||
|
||||
@@ -27,15 +27,16 @@ keep your development environment up-to-date. </li>
|
||||
</ul>
|
||||
|
||||
<p>Note that if you are currently using the Android 1.6 SDK, you do not
|
||||
necessarily need to install the new SDK, since your existing SDK incudes the
|
||||
Android SDK and AVD Manager tool. To develop against Android 2.0, for example,
|
||||
you could just download the Android 2.0 platform into your existing SDK. </p>
|
||||
necessarily need to install the new SDK, since your existing SDK already
|
||||
includes the Android SDK and AVD Manager tool. To develop against Android 2.0,
|
||||
for example, you could just download the Android 2.0 platform into your existing
|
||||
SDK. </p>
|
||||
|
||||
<p>Release notes for Android platforms that are downloadable into the SDK are
|
||||
<p>Release notes for Android platforms and other SDK components are
|
||||
now available from the "SDK" tab, under "Downloadable SDK Components."</p>
|
||||
|
||||
<ul>
|
||||
<li>Release notes for the Android 2.0 platform are in the <a
|
||||
<li>Notes for the Android 2.0 platform are in the <a
|
||||
href="{@docRoot}sdk/android-2.0.html">Android 2.0, Release 1</a> document. </li>
|
||||
<li>You can find information about tools changes in the <a
|
||||
href="{@docRoot}sdk/tools-notes.html">SDK Tools Notes</a> and <a
|
||||
@@ -44,8 +45,8 @@ href="{@docRoot}sdk/adt-notes.html">ADT Plugin Notes</a>.</li>
|
||||
|
||||
<p>To get started with the SDK, review the Quick Start summary on the <a
|
||||
href="{@docRoot}sdk/index.html">Android SDK download page</a> or read <a
|
||||
href="{@docRoot}sdk/installing.html">Installing the SDK</a> for more
|
||||
information. </p>
|
||||
href="{@docRoot}sdk/installing.html">Installing the SDK</a> for detailed
|
||||
installation instructions. </p>
|
||||
|
||||
|
||||
<h2 id="1.6_r1">Android 1.6 SDK, Release 1</h2>
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
page.title=Download the ADT Plugin Zip File
|
||||
page.title=Download the ADT Zip File
|
||||
@jd:body
|
||||
|
||||
<p>
|
||||
If you are unable to download the ADT plugin through <a
|
||||
href="{@docRoot}guide/developing/tools/adt.html#installingplugin">setting up a remote
|
||||
<p>If you are unable to download the ADT plugin through <a
|
||||
href="{@docRoot}sdk/eclipse-adt.html#installing">setting up a remote
|
||||
update site</a> in Eclipse, you can download the ADT zip file and install it
|
||||
from your computer (archived site) instead.
|
||||
</p>
|
||||
<p>
|
||||
If you use this approach, in order to update the plugin, you will need to
|
||||
from your computer (archived site) instead. </p>
|
||||
|
||||
<p>If you use this approach, in order to update the plugin, you will need to
|
||||
download the latest version from this page, uninstall the old version from
|
||||
Eclipse, then install the new version. For more details on the procedure,
|
||||
see Troubleshooting ADT Installation in the
|
||||
<a href="{@docRoot}guide/developing/tools/adt.html#troubleshooting"> installation
|
||||
page</a>.
|
||||
</p>
|
||||
<p>
|
||||
see <a
|
||||
href="{@docRoot}sdk/eclipse-adt.html#troubleshooting">Troubleshooting
|
||||
ADT Installation</a>.</p>
|
||||
|
||||
<table class="download">
|
||||
<tr>
|
||||
<th><nobr>ADT Version</nobr></th>
|
||||
@@ -24,43 +21,50 @@ page</a>.
|
||||
<th>Md5 Checksum</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>0.9.4</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.4.zip">ADT-0.9.4.zip</a></td>
|
||||
<td><nobr>{@adtZipBytes} bytes</nobr></td>
|
||||
<td>{@adtZipChecksum}</td>
|
||||
<td>Requires SDK Tools, Revision 3 <em><nobr>October 2009</nobr></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.9.3</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.3.zip">ADT-0.9.3.zip</a></td>
|
||||
<td><nobr>bytes</nobr></td>
|
||||
<td><nobr></nobr></td>
|
||||
<td><nobr>Required for users of Android 1.6 SDK (and later releases). Updated from 0.9.1. <em><nobr>September 2009</nobr></em></td>
|
||||
</tr>
|
||||
<tr class="alt-color">
|
||||
<td>0.9.1</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.9.1.zip">ADT-0.9.1.zip</a></td>
|
||||
<td><nobr>2916093 bytes</nobr></td>
|
||||
<td><nobr>e7b2ab40414ac98</nobr></td>
|
||||
<td><nobr>Required for users of Android 1.5 SDK. Updated from 0.9.0. <em><nobr>6 May 2009</nobr></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.8.0</td>
|
||||
<td><a href="http://dl-ssl.google.com/android/ADT-0.8.0.zip">ADT-0.8.0.zip</a></td>
|
||||
<td colspan="2"><nobr> </nobr></td>
|
||||
<td><nobr>Required for users of Android 1.0/1.1 SDKs. <em><nobr>23 Sep 2008</nobr></em></td>
|
||||
<td><nobr>3252487 bytes</nobr></td>
|
||||
<td>c296488ac35772667c0f49e822156979</td>
|
||||
<td>Required for users of Android 1.6 SDK only . Updated from 0.9.1. <em><nobr>September 2009</nobr></em></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4>Obsolete Versions of ADT</h4>
|
||||
|
||||
<p>The table below lists older versions of the ADT Plugin that are no longer supported. If you are developing applications that are intended to be deployable to Android-powered devices, make sure that you upgrade to the most current SDK release available and use the most current version of the ADT Plugin, as listed in the section above.</p>
|
||||
<p>The table below lists older versions of the ADT Plugin that are no longer
|
||||
supported. If you are developing applications that are intended to be deployable
|
||||
to Android-powered devices, make sure that you upgrade to the most current SDK
|
||||
release available and use the most current version of the ADT Plugin, as listed
|
||||
in the section above.</p>
|
||||
|
||||
<p>If you are not sure what version of ADT is installed in your Eclipse environment, open Eclipse and from the main menu select <strong>Help</strong> > <strong>About Eclipse</strong> > <strong>Features Details</strong>. Locate "com.android.ide.eclipse.adt" in the
|
||||
Feature ID column and look at its version number.</p>
|
||||
<p>If you are not sure what version of ADT is installed in your Eclipse
|
||||
environment, open Eclipse and from the main menu select <strong>Help</strong>
|
||||
> <strong>About Eclipse</strong> > <strong>Features Details</strong>.
|
||||
Locate "com.android.ide.eclipse.adt" in the Feature ID column and look at its
|
||||
version number.</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th><nobr>ADT Version</nobr></th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>0.9.1</td>
|
||||
<td>Required for users of Android 1.5 SDK. Updated from 0.9.0. <em><nobr>6 May 2009</nobr></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.8.0</td>
|
||||
<td>Required for users of Android 1.0/1.1 SDKs. <em><nobr>23 Sep 2008</nobr></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0.7.1</td>
|
||||
<td>Required for users of the Android 0.9 SDK beta. <em><nobr>18 Aug 2008</nobr></em></td>
|
||||
|
||||
@@ -24,11 +24,11 @@ sdk.date=September 2009
|
||||
</style>
|
||||
|
||||
<div class="video">
|
||||
<object width="293" height="180">
|
||||
<object width="278" height="180">
|
||||
<param name="movie" value="http://www.youtube.com/v/MBRFkLKRwFw&hl=en&fs=1&"></param>
|
||||
<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
|
||||
<embed src="http://www.youtube.com/v/MBRFkLKRwFw&hl=en&fs=1&" type="application/x-shockwave-flash"
|
||||
allowscriptaccess="always" allowfullscreen="true" width="293" height="180"></embed>
|
||||
allowscriptaccess="always" allowfullscreen="true" width="278" height="180"></embed>
|
||||
</object>
|
||||
</div>
|
||||
|
||||
|
||||
201
docs/html/sdk/android-2.0-highlights.jd
Normal file
201
docs/html/sdk/android-2.0-highlights.jd
Normal file
@@ -0,0 +1,201 @@
|
||||
page.title=Android 2.0 Platform Highlights
|
||||
sdk.date=October 2009
|
||||
|
||||
@jd:body
|
||||
|
||||
|
||||
<style type="text/css">
|
||||
#jd-content div.screenshot,
|
||||
#jd-content div.video {
|
||||
float:right;
|
||||
clear:right;
|
||||
padding:15px 60px;
|
||||
font-size:.9em;
|
||||
font-weight:bold;
|
||||
line-height:1.7em;
|
||||
}
|
||||
#jd-content div.video {
|
||||
padding-top:0;
|
||||
margin-top:-15px;
|
||||
}
|
||||
#jd-content div.screenshot.second {
|
||||
clear:none;
|
||||
padding:15px 0 15px 60px;
|
||||
}
|
||||
#jd-content div.screenshot img {
|
||||
margin:0;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="video">
|
||||
<object width="278 height="180">
|
||||
<param name="movie" value="http://www.youtube.com/v/opZ69P-0Jbc&hl=en&fs=1&"></param>
|
||||
<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
|
||||
<embed src="http://www.youtube.com/v/opZ69P-0Jbc&hl=en&fs=1&" type="application/x-shockwave-flash"
|
||||
allowscriptaccess="always" allowfullscreen="true" width="278" height="180"></embed>
|
||||
</object>
|
||||
</div>
|
||||
|
||||
|
||||
<p>The Android 2.0 platform introduces many new and exciting features for
|
||||
users and developers. This document provides a glimpse at some of the new features
|
||||
and technologies in Android 2.0.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#UserFeatures">New User Features</a></li>
|
||||
<li><a href="#PlatformTechnologies">New Platform Technologies</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<h2 id="UserFeatures" style="clear:right">New User Features</h2>
|
||||
|
||||
<!-- screenshots float right -->
|
||||
|
||||
<div class="screenshot">
|
||||
<img src="images/2.0/quick-connect.png" class="screenshot" alt="" /><br/>
|
||||
Quick Contact for Android
|
||||
</div>
|
||||
|
||||
<div class="screenshot second">
|
||||
<img src="images/2.0/multiple-accounts.png" class="screenshot" alt="" /><br/>
|
||||
Multiple Accounts
|
||||
</div>
|
||||
|
||||
<div class="screenshot">
|
||||
<img src="images/2.0/mms-search.png" class="screenshot" alt="" /><br/>
|
||||
Messaging Search
|
||||
</div>
|
||||
|
||||
<div class="screenshot second">
|
||||
<img src="images/2.0/email-inbox.png" class="screenshot" alt="" /><br/>
|
||||
Email Combined Inbox
|
||||
</div>
|
||||
|
||||
<div class="screenshot">
|
||||
<img src="images/2.0/camera-modes.png" class="screenshot" alt="" /><br/>
|
||||
Camera Modes
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h3 id="Contacts">Contacts and accounts</h3>
|
||||
|
||||
<ul>
|
||||
<li>Multiple accounts can be added to a device for email and contact
|
||||
synchronization, including Exchange accounts. (Handset manufacturers can
|
||||
choose whether to include Exchange support in their devices.)</li>
|
||||
<li>Developers can create sync adapters that provide synchronization with
|
||||
additional data sources.</li>
|
||||
<li>Quick Contact for Android provides instant access to
|
||||
a contact's information and communication modes. For example, a user can tap a
|
||||
contact photo and select to call, SMS, or email the person. Other applications
|
||||
such as Email, Messaging, and Calendar can also reveal the Quick Contact widget
|
||||
when you touch a contact photo or status icon.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<!--
|
||||
<ul>
|
||||
<li>Sync support for contacts from multiple data sources including Exchange.
|
||||
Handset manufacturers can choose whether or not to include Exchange support
|
||||
in their devices.</li>
|
||||
<li>New way to hover on a person to see more info and select communication
|
||||
mode (for example, phone, SMS, email).</li>
|
||||
</ul>
|
||||
-->
|
||||
|
||||
<h3 id="Email">Email</h3>
|
||||
|
||||
<ul>
|
||||
<li>Exchange support.</li>
|
||||
<li>Combined inbox to browse email from multiple accounts in one page.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="Messaging">Messaging</h3>
|
||||
|
||||
<ul>
|
||||
<li>Search functionality for all saved SMS and MMS messages.</li>
|
||||
<li>Auto delete the oldest messages
|
||||
in a conversation when a defined limit is reached.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="Camera">Camera</h3>
|
||||
|
||||
<ul>
|
||||
<li>Built-in flash support</li>
|
||||
<li>Digital zoom</li>
|
||||
<li>Scene mode</li>
|
||||
<li>White balance</li>
|
||||
<li>Color effect</li>
|
||||
<li>Macro focus</li>
|
||||
</ul>
|
||||
|
||||
<h3 id="Keyboard">Android virtual keyboard</h3>
|
||||
|
||||
<ul>
|
||||
<li>An improved keyboard layout to makes it easier to hit the correct characters
|
||||
and improve typing speed.</li>
|
||||
<li>The framework's multi-touch support ensures that key presses aren't missed
|
||||
while typing rapidly with two fingers.</li>
|
||||
<li>A smarter dictionary learns from word usage and automatically includes
|
||||
contact names as suggestions.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="Browser">Browser</h3>
|
||||
|
||||
<ul>
|
||||
<li>Refreshed UI with actionable browser URL bar enables users to directly
|
||||
tap the address bar for instant searches and navigation.</li>
|
||||
<li>Bookmarks with web page thumbnails.</li>
|
||||
<li>Support for double-tap zoom.</li>
|
||||
<li>Support for HTML5:</p>
|
||||
<ul>
|
||||
<li>Database API support, for client-side databases using SQL.</li>
|
||||
<li>Application cache support, for offline applications.</li>
|
||||
<li>Geolocation API support, to provide location information about the device.</li>
|
||||
<li>{@code <video>} tag support in fullscreen mode.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="Calendar">Calendar</h3>
|
||||
<ul>
|
||||
<li>Agenda view provides infinite scrolling.</li>
|
||||
<li>Events indicate the attending status for each invitee.</li>
|
||||
<li>Invite new guests to events.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2 id="PlatformTechnologies" style="clear:right">New Platform Technologies</h2>
|
||||
|
||||
<h3 id="MediaFramework">Media Framework</h3>
|
||||
|
||||
<p>Revamped graphics architecture for improved performance that enables better
|
||||
hardware acceleration.</p>
|
||||
|
||||
|
||||
<h3 id="Bluetooth">Bluetooth</h3>
|
||||
|
||||
<ul>
|
||||
<li>Bluetooth 2.1</li>
|
||||
<li>New BT profiles: Object Push Profile (OPP) and Phone Book Access Profile (PBAP)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3 id="DeveloperAPIs">New Framework APIs</h3>
|
||||
|
||||
<p>Android 2.0 includes several new developer APIs.
|
||||
For an overview of new APIs, see the
|
||||
<a href="{@docRoot}sdk/android-2.0.html#api">Android 2.0 version notes</a>.</p>
|
||||
|
||||
<p>For a complete report of all API changes, see the
|
||||
<a href="{@docRoot}sdk/api_diff/5/changes.html">API Differences Report</a>.</p>
|
||||
|
||||
|
||||
|
||||
@@ -205,6 +205,7 @@ element in your application's manifest. </p>
|
||||
<p>For more information about how to use API Level, see the <a
|
||||
href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
|
||||
|
||||
|
||||
<h3 id="api-changes">API changes summary</h3>
|
||||
|
||||
<h4>Bluetooth</h4>
|
||||
@@ -263,6 +264,62 @@ href="{@docRoot}guide/appendix/api-levels.html">API Levels</a> document. </p>
|
||||
<li>New Intent APIs that broadcast the docking state of the device and allow applications to launch special activities when the device is placed in a desktop or car dock.</li>
|
||||
</ul>
|
||||
|
||||
<h4>Key events executed on key-up</h4>
|
||||
|
||||
<p>Android 2.0 is designed to run on devices that use virtual keys for HOME,
|
||||
MENU, BACK, and SEARCH, rather than physical keys. To support the best user
|
||||
experience on those devices, the Android platform now executes these buttons at
|
||||
key-up, for a key-down/key-up pair, rather than key-down. This helps prevent
|
||||
accidental button events and lets the user press the button area and then drag
|
||||
out of it without generating an event. </p>
|
||||
|
||||
<p>This change in behavior should only affect your application if it is
|
||||
intercepting button events and taking an action on key-down, rather than on
|
||||
key-up. Especially if your application is intercepting the BACK key, you should
|
||||
make sure that your application is handling the key events properly. </p>
|
||||
|
||||
<p>In general, intercepting the BACK key in an application is not recommended,
|
||||
however, if your application is doing so and it invokes some action on
|
||||
key-down, rather than key-up, you should modify your code. </p>
|
||||
|
||||
<p>If your application will use APIs introduced in Android 2.0 (API Level 5),
|
||||
you can take advantage of new APIs for managing key-event pairs:</p>
|
||||
|
||||
<ul>
|
||||
<li>If you are intercepting the BACK key in an activity or dialog, just
|
||||
implement the new {@link android.app.Activity#onBackPressed()} method. </li>
|
||||
<li>If you are intercepting the BACK key in a view, you should track the key
|
||||
event on key-down (through the new {@link android.view.KeyEvent#startTracking}
|
||||
method), then invoke the action at key up. Here's a pattern you can use:</li>
|
||||
|
||||
<pre> public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK
|
||||
&& event.getRepeatCount() == 0) {
|
||||
event.startTracking();
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking()
|
||||
&& !event.isCanceled()) {
|
||||
// *** DO ACTION HERE ***
|
||||
return true;
|
||||
}
|
||||
return super.onKeyUp(keyCode, event);
|
||||
}</pre>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>If you want to update a legacy application so that its handling of the BACK
|
||||
key works properly for both Android 2.0 and older platform versions, you
|
||||
can use an approach similar to that shown above. Your code can catch the
|
||||
target button event on key-down, set a flag to track the key event, and
|
||||
then also catch the event on key-up, executing the desired action if the tracking
|
||||
flag is set. You'll also want to watch for focus changes and clear the tracking
|
||||
flag when gaining/losing focus.</p>
|
||||
|
||||
<h3 id="api-diff">API differences report</h3>
|
||||
|
||||
<p>For a detailed view of API changes in Android {@sdkPlatformVersion} (API Level {@sdkPlatformApiLevel}), as compared to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
page.title=Installing and Updating the ADT Plugin
|
||||
page.title=Installing and Updating ADT
|
||||
sdk.preview=0
|
||||
|
||||
@jd:body
|
||||
@@ -23,21 +23,23 @@ sdk.preview=0
|
||||
|
||||
<p>Android offers a custom plugin for the Eclipse IDE, called Android
|
||||
Development Tools (ADT), that is designed to give you a powerful,
|
||||
integrated environment in which to build Android applications. It
|
||||
extends the capabilites of Eclipse to let you quickly set up new Android
|
||||
integrated environment in which to build Android applications. </p>
|
||||
|
||||
<p>ADT extends the capabilites of Eclipse to let you quickly set up new Android
|
||||
projects, create an application UI, add components based on the Android
|
||||
Framework API, debug your applications using the Android SDK tools, and even export
|
||||
signed (or unsigned) APKs in order to distribute your application.</p>
|
||||
Framework API, debug your applications using the Android SDK tools, and even
|
||||
export signed (or unsigned) APKs in order to distribute your application.</p>
|
||||
|
||||
<p>In general, using Eclipse with ADT is a highly recommended approach to
|
||||
Android development and is the fastest way to get started.
|
||||
Android development and is the fastest way to get started. If you use Eclipse,
|
||||
the ADT plugin gives you an incredible boost in developing Android
|
||||
applications.</p>
|
||||
|
||||
<p>To install and update the ADT Plugin, you can take advantage of the Eclipse
|
||||
remote update feature. By setting up a remote update site, you can
|
||||
easily download, install, and check for ADT updates. Alternatively, you
|
||||
can download the latest ADT to your development
|
||||
computer as a local site archive. The sections below provide nstructions
|
||||
for both methods.</p>
|
||||
<p>To install and update the ADT Plugin, you can take advantage of the Eclipse
|
||||
remote update feature. By setting up a remote update site, you can easily
|
||||
download, install, and check for ADT updates. Alternatively, you can download
|
||||
the latest ADT to your development computer as a local site archive. The
|
||||
sections below provide instructions for both methods.</p>
|
||||
|
||||
|
||||
<h2 id="preparing">Prepare for Installation</h2>
|
||||
|
||||
BIN
docs/html/sdk/images/2.0/camera-modes.png
Normal file
BIN
docs/html/sdk/images/2.0/camera-modes.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
BIN
docs/html/sdk/images/2.0/email-inbox.png
Normal file
BIN
docs/html/sdk/images/2.0/email-inbox.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/html/sdk/images/2.0/mms-search.png
Normal file
BIN
docs/html/sdk/images/2.0/mms-search.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/html/sdk/images/2.0/multiple-accounts.png
Normal file
BIN
docs/html/sdk/images/2.0/multiple-accounts.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/html/sdk/images/2.0/quick-connect.png
Normal file
BIN
docs/html/sdk/images/2.0/quick-connect.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -3,70 +3,87 @@ sdk.redirect=0
|
||||
sdk.version=2.0
|
||||
sdk.date=October 2009
|
||||
|
||||
sdk.win_download=android-sdk-windows_r1.zip
|
||||
sdk.win_bytes=
|
||||
sdk.win_checksum=
|
||||
sdk.win_download=android-sdk_r3-windows.zip
|
||||
sdk.win_bytes=23070805
|
||||
sdk.win_checksum=bd7b57d5df37bd55ea101e76b24260a8
|
||||
|
||||
sdk.mac_download=android-sdk-mac_x86_r1.zip
|
||||
sdk.mac_bytes=
|
||||
sdk.mac_checksum=
|
||||
sdk.mac_download=android-sdk_r3-mac.zip
|
||||
sdk.mac_bytes=19653431
|
||||
sdk.mac_checksum=f6674bf45e5e36811eea7e584f0c1d67
|
||||
|
||||
sdk.linux_download=android-sdk-linux_x86_r1.tgz
|
||||
sdk.linux_bytes=
|
||||
sdk.linux_checksum=
|
||||
sdk.linux_download=android-sdk_r3-linux.tgz
|
||||
sdk.linux_bytes=15986291
|
||||
sdk.linux_checksum=3e1534e7fc15d154ff81616f0dc1545c
|
||||
|
||||
@jd:body
|
||||
|
||||
<p>For important information about this SDK release, please review the
|
||||
<a href="{@docRoot}sdk/RELEASENOTES.html">Release Notes</a>.</p>
|
||||
|
||||
<div class="special">
|
||||
<p>The Android SDK has changed! If you've worked with the Android SDK before, you will notice several important differences:</p>
|
||||
<h2 id="quickstart">Quick Start</h2>
|
||||
|
||||
<ul>
|
||||
<li style="margin-top:.5em">The SDK downloadable package includes <em>only</em> the latest version of the Android SDK Tools.</li>
|
||||
<li>Once you've installed the SDK, you now use the Android SDK and AVD Manager to download all of the SDK components that you need, such as Android platforms, SDK add-ons, tools, and documentation. </li>
|
||||
<li>The new approach is modular — you can install only the components you need and update any or all components without affecting your development environment.</li>
|
||||
<li>In short, once you've installed the new SDK, you will not need to download an SDK package again. Instead, you will use the Android SDK and AVD Manager to keep your development environment up-to-date. </li>
|
||||
</ul>
|
||||
|
||||
<p>If you are currently using the Android 1.6 SDK, you do not need to install the new SDK, since your existing SDK incudes the Android SDK and AVD Manager tool. To develop against Android 2.0, for example, you could just download the updated SDK Tools (Revision 3) and the Android 2.0 platform into your existing SDK. </p>
|
||||
</div>
|
||||
|
||||
<h2>Quick Start</h2>
|
||||
|
||||
<p class="xnote">The steps below provide an overview of how to get started with the Android SDK. For detailed instructions, start with the <a href="{@docRoot}sdk/installing.html">Installing</a> guide. </p>
|
||||
<p>The steps below provide an overview of how to get started with the Android
|
||||
SDK. For detailed instructions, start with the <a
|
||||
href="{@docRoot}sdk/installing.html">Installing</a> guide. </p>
|
||||
|
||||
<p><strong>0. Prepare your development computer</strong></p>
|
||||
|
||||
<p>Read the <a href="{@docRoot}sdk/requirements.html">System Requirements</a> document and make sure that your development computer meets the hardware and software requirements for the Android SDK. Install any additional software needed before downloading the Android SDK. In particular, if you plan to develop Android applications in the Eclipse IDE using the ADT Plugin (see below), make sure that you have the correct version of Eclipse installed.
|
||||
<p>Read the <a href="{@docRoot}sdk/requirements.html">System Requirements</a>
|
||||
document and make sure that your development computer meets the hardware and
|
||||
software requirements for the Android SDK. Install any additional software
|
||||
needed before downloading the Android SDK. In particular, if you plan to develop
|
||||
Android applications in the Eclipse IDE using the ADT Plugin (see below), make
|
||||
sure that you have the correct version of Eclipse installed.
|
||||
|
||||
<p><strong>1. Download and install the SDK starter package</strong></p>
|
||||
|
||||
<p>Select a starter package from the table at the top of this page and download it to your development computer. To install the SDK, simply unpack the starter package to a safe location and then add the location to your PATH. </p>
|
||||
<p>Select a starter package from the table at the top of this page and download
|
||||
it to your development computer. To install the SDK, simply unpack the starter
|
||||
package to a safe location and then add the location to your PATH. </p>
|
||||
|
||||
<p><strong>2. Install the ADT Plugin for Eclipse</strong></p>
|
||||
|
||||
<p>If you are developing in Eclipse, set up a remote update site and install the Android Development Tools (ADT) plugin.</p>
|
||||
|
||||
<p>For detailed instructions, see <a href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>.</p>
|
||||
<p>If you are developing in Eclipse, set up a remote update site and install the
|
||||
Android Development Tools (ADT) plugin. For detailed instructions, see <a
|
||||
href="{@docRoot}sdk/eclipse-adt.html">Installing and Updating ADT</a>.</p>
|
||||
|
||||
<p><strong>3. Add Android platforms to your SDK</strong></p>
|
||||
|
||||
<p>Use the Android SDK and AVD Manager, included in the SDK starter package, to add one or more Android platforms (for example, Android 1.6 or Android 2.0) to your SDK. In most cases, you will want to download multiple platforms, so that you can build your application on the lowest version you want to support, but test against higher versions that you intend the application to run on. Information about each platform is available at left, under "Downloadable SDK Components."</p>
|
||||
<p>Use the Android SDK and AVD Manager, included in the SDK starter package, to
|
||||
add one or more Android platforms (for example, Android 1.6 or Android 2.0) to
|
||||
your SDK. In most cases, you will want to download multiple platforms, so that
|
||||
you can build your application on the lowest version you want to support, but
|
||||
test against higher versions that you intend the application to run on.
|
||||
Information about each platform is available at left, under "Downloadable SDK
|
||||
Components."</p>
|
||||
|
||||
<p>For more information about how to add platforms and other SDK components, see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.</p>
|
||||
<p>To launch the Android SDK and AVD Manager on Windows, execute <code>SDK
|
||||
Setup.exe</code>, at the root of the SDK directory. On Mac OS X or Linux,
|
||||
execute the <code>android</code> tool in the <code><sdk>/tools/</code>
|
||||
folder. For more information about how to add platforms and other components,
|
||||
see <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.
|
||||
</p>
|
||||
|
||||
<p><strong>4. Get the latest documentation</strong></p>
|
||||
|
||||
<p>If you develop while offline, use the Android SDK and AVD Manager to download the latest documentation package. The documentation covers all versions of the API and lets you filter out those versions that your application won't support. Once installed, the documentation is also available to you directly from the Eclipse IDE. </p>
|
||||
<p>If you develop while offline, use the Android SDK and AVD Manager to download
|
||||
the latest documentation package. The documentation covers all versions of the
|
||||
API and lets you filter out those versions that your application won't support.
|
||||
Once installed, the documentation is also available to you directly from the
|
||||
Eclipse IDE. </p>
|
||||
|
||||
<p><strong>5. Download other SDK components</strong></p>
|
||||
|
||||
<p>You can use the Android SDK and AVD Manager to download other SDK components, such as the SDK add-ons. An SDK add-on provides a development environment for an Android external library or a customized Android system image. For example, the Google APIs Add-On lets you develop an application that takes advantage of the Google Maps external library. </p>
|
||||
<p>You can use the Android SDK and AVD Manager to download other SDK components,
|
||||
such as the SDK add-ons. An SDK add-on provides a development environment for an
|
||||
Android external library or a customized Android system image. For example, the
|
||||
Google APIs Add-On lets you develop an application that takes advantage of the
|
||||
Google Maps external library. </p>
|
||||
|
||||
<p><strong>6. Get started with an application project</strong></p>
|
||||
|
||||
<p>Once you've set up your SDK, the next step is to start a new application project or move existing applications into the new SDK.</p>
|
||||
<p>Once you've set up your SDK, the next step is to start a new application
|
||||
project or move existing applications into the new SDK.</p>
|
||||
|
||||
<p>If you are new to Android, you can use the <a href="{@docRoot}guide/tutorials/hello-world.html">Hello World</a> tutorial to get started quickly. Welcome!</p>
|
||||
<p>If you are new to Android, you can use the <a
|
||||
href="{@docRoot}guide/tutorials/hello-world.html">Hello World</a> tutorial to
|
||||
get started quickly. <a href="{@docRoot}sdk/installing.html#NextSteps">Next
|
||||
Steps</a> offers other suggestions of how to begin. Welcome!</p>
|
||||
|
||||
@@ -30,16 +30,16 @@ sdk.preview=0
|
||||
development environment for the first time.</p>
|
||||
|
||||
<p>If you encounter any problems during installation, see the
|
||||
<a href="#InstallationNotes">Installation Notes</a> at the bottom of
|
||||
<a href="#troubleshooting">Troubleshooting</a> section at the bottom of
|
||||
this page.</p>
|
||||
|
||||
<h4>Updating?</h4>
|
||||
|
||||
<p>If you are currently using the Android 1.6 SDK, you do not necessarily need
|
||||
to install the new SDK, since your existing SDK incudes the Android SDK and AVD
|
||||
Manager tool. To develop against the new Android 2.0 platform, for example, you
|
||||
could just download the updated SDK Tools (Revision 3) and the Android 2.0
|
||||
platform into your existing SDK.</p>
|
||||
to install the new SDK, since your existing SDK already includes the Android SDK
|
||||
and AVD Manager tool. To develop against the new Android 2.0 platform, for
|
||||
example, you could just download the updated SDK Tools (Revision 3) and the
|
||||
Android 2.0 platform into your existing SDK.</p>
|
||||
|
||||
<p>If you are using Android 1.5 SDK or older, you should install the new SDK as
|
||||
described in this document and move your application projects to the new
|
||||
@@ -125,14 +125,34 @@ information about how to install ADT, see
|
||||
install Eclipse or ADT, instead, you can directly use the SDK tools to build and
|
||||
debug your application.</p>
|
||||
|
||||
|
||||
<h2 id="components">Add Android Platforms and Other Components</h2>
|
||||
|
||||
<p>Once you've downloaded and installed the SDK, you need to install SDK
|
||||
components in it. The SDK starter package includes a tool called Android SDK and
|
||||
AVD Manager that helps you see what SDK components are available and then install
|
||||
them into your SDK environment. The <a
|
||||
href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a> document
|
||||
provides step-by-step instructions.</p>
|
||||
<div class="sidebox-wrapper">
|
||||
<div class="sidebox">
|
||||
<p>The <strong>Android SDK and AVD Manager</strong> tool is pre-installed in
|
||||
your SDK. Using the tool is a key part of performing the initial setup of your
|
||||
SDK, as well as keeping it up-to-date with the latest platforms, tools, and
|
||||
other components. </p>
|
||||
|
||||
<p style="margin-top:.75em;">For full instructions on how to use the tool, see
|
||||
<a href="/sdk/adding-components.html#installingComponents">Adding SDK
|
||||
Components</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>The Android SDK uses a modular structure that separates the major parts of
|
||||
the SDK — platforms, add-ons, tools, and the API documentation —
|
||||
into a set of separately installable components. The SDK components are
|
||||
available to you for individual download, as needed, from the Android SDK
|
||||
repository site. </p>
|
||||
|
||||
<p>The Android SDK starter package includes only a single component: the latest
|
||||
version of the SDK Tools. Included in that component is a tool called <em>Android
|
||||
SDK and AVD Manager</em> that you can use to download other components from the SDK
|
||||
repository site. The tool provides a graphical UI that lets you browse the
|
||||
repository, select new or updated components for download, and then install them
|
||||
in your SDK. </p>
|
||||
|
||||
<p>There are several types of SDK components available:</p>
|
||||
|
||||
@@ -163,17 +183,22 @@ multiversion documentation for the Android framework API.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>To develop any application, even if you are following the <a
|
||||
<p>To develop <em>any</em> Android application, even if you are following the <a
|
||||
href="{@docRoot}guide/tutorials/hello-world.html">Hello World</a> tutorial, you
|
||||
<strong>must download at least one Android platform</strong> into your SDK.
|
||||
Typically, you will want to download multiple platforms, including the version
|
||||
that you want to develop against and all other higher platforms. By downloading
|
||||
multiple platforms, you can test the forward-compatibility of your application
|
||||
by running it on different platforms in the Android emulator. </p>
|
||||
Typically, you will want to download multiple platforms, so that you can build
|
||||
your application on the lowest version you want to support, but test against
|
||||
higher versions that you intend the application to run on. You can test your
|
||||
applications on different platforms by running in an
|
||||
Android Virtual Device (AVD) on the Android emulator. </p>
|
||||
|
||||
<p>For more information about adding components and additional repository sites,
|
||||
see the <a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>.
|
||||
</p>
|
||||
<p>For step-by-step instructions on how to use the Android SDK and AVD Manager
|
||||
to add components, see the <a href="{@docRoot}sdk/adding-components.html">Adding
|
||||
SDK Components</a> document. </p>
|
||||
|
||||
<p>For release notes and other detailed information about individual SDK
|
||||
components, see the documents listed under "Downloadable SDK Components" in
|
||||
the navigation at left.</p>
|
||||
|
||||
|
||||
<h2 id="sdkContents">Explore the SDK</h2>
|
||||
|
||||
@@ -101,7 +101,10 @@
|
||||
<span style="display:none" class="zh-CN"></span>
|
||||
<span style="display:none" class="zh-TW"></span></a>
|
||||
</li>
|
||||
<li><a href="<?cs var:toroot ?>sdk/adt-notes.html">ADT <?cs var:adt.zip.version ?> Notes</span></a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="<?cs var:toroot ?>sdk/adt-notes.html">ADT <?cs var:adt.zip.version ?>
|
||||
<span class="new">new!</span></span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -5,15 +5,16 @@ page.title=SDK Tools Notes
|
||||
includes the complete set of development and debugging tools for the Android
|
||||
SDK.</p>
|
||||
|
||||
<p>This document provides version-specific information about SDK Tools
|
||||
releases. To keep up-to-date on new releases, make sure that you view this page
|
||||
at <a
|
||||
href="http://developer.android.com/sdk/tools-notes.html">http://developer.
|
||||
android.com/sdk/tools-notes.html</a>.</p>
|
||||
|
||||
<p>To install SDK Tools in your SDK environment (and replace the
|
||||
existing tools), use the Android SDK and AVD Manager. For more information, see
|
||||
<a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a>. </p>
|
||||
|
||||
<p>This document provides version-specific information about SDK Tools
|
||||
releases. To keep up to date on new releases, make sure that you view this page
|
||||
at <a
|
||||
href="http://developer.android.com/sdk/tools-notes.html">http://developer.
|
||||
android.com/sdk/tools-notes.html</a>.</p>
|
||||
|
||||
<h2 id="3">SDK Tools, Revision 3</h2>
|
||||
|
||||
@@ -57,6 +58,13 @@ properties of your AVDs.</li>
|
||||
between SDK add-ons and platforms.</li>
|
||||
</ul>
|
||||
|
||||
<h3>Layoutopt, a new tool for optimizing layouts</h3>
|
||||
|
||||
|
||||
<p>The SDK Tools 3 package includes <code>layoutopt</code>, a new command-line
|
||||
tool that helps you optimize your layout hierarchies. When run against your
|
||||
layout files, the tool analyzes their hierarchies and notifies you of
|
||||
inefficiencies and other potential issues. The tool also provides simple
|
||||
solutions for the issues it finds. For usage, see <a
|
||||
href="{@docRoot}guide/developing/tools/layoutopt.html">layoutopt</a>.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/resource.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -38,6 +39,18 @@
|
||||
#include "MidiMetadataRetriever.h"
|
||||
#include "MetadataRetrieverClient.h"
|
||||
|
||||
/* desktop Linux needs a little help with gettid() */
|
||||
#if defined(HAVE_GETTID) && !defined(HAVE_ANDROID_OS)
|
||||
#define __KERNEL__
|
||||
# include <linux/unistd.h>
|
||||
#ifdef _syscall0
|
||||
_syscall0(pid_t,gettid)
|
||||
#else
|
||||
pid_t gettid() { return syscall(__NR_gettid);}
|
||||
#endif
|
||||
#undef __KERNEL__
|
||||
#endif
|
||||
|
||||
namespace android {
|
||||
|
||||
extern player_type getPlayerType(const char* url);
|
||||
@@ -212,6 +225,7 @@ sp<IMemory> MetadataRetrieverClient::captureFrame()
|
||||
{
|
||||
LOGV("captureFrame");
|
||||
Mutex::Autolock lock(mLock);
|
||||
Priority priority(ANDROID_PRIORITY_BACKGROUND);
|
||||
mThumbnail.clear();
|
||||
mThumbnailDealer.clear();
|
||||
if (mRetriever == NULL) {
|
||||
@@ -253,6 +267,7 @@ sp<IMemory> MetadataRetrieverClient::extractAlbumArt()
|
||||
{
|
||||
LOGV("extractAlbumArt");
|
||||
Mutex::Autolock lock(mLock);
|
||||
Priority priority(ANDROID_PRIORITY_BACKGROUND);
|
||||
mAlbumArt.clear();
|
||||
mAlbumArtDealer.clear();
|
||||
if (mRetriever == NULL) {
|
||||
@@ -294,7 +309,19 @@ const char* MetadataRetrieverClient::extractMetadata(int keyCode)
|
||||
LOGE("retriever is not initialized");
|
||||
return NULL;
|
||||
}
|
||||
Priority priority(ANDROID_PRIORITY_BACKGROUND);
|
||||
return mRetriever->extractMetadata(keyCode);
|
||||
}
|
||||
|
||||
MetadataRetrieverClient::Priority::Priority(int newPriority)
|
||||
{
|
||||
mOldPriority = getpriority(PRIO_PROCESS, 0);
|
||||
setpriority(PRIO_PROCESS, 0, newPriority);
|
||||
}
|
||||
|
||||
MetadataRetrieverClient::Priority::~Priority()
|
||||
{
|
||||
setpriority(PRIO_PROCESS, 0, mOldPriority);
|
||||
}
|
||||
|
||||
}; // namespace android
|
||||
|
||||
@@ -54,6 +54,16 @@ public:
|
||||
private:
|
||||
friend class MediaPlayerService;
|
||||
|
||||
class Priority
|
||||
{
|
||||
public:
|
||||
Priority(int newPriority);
|
||||
~Priority();
|
||||
private:
|
||||
Priority();
|
||||
int mOldPriority;
|
||||
};
|
||||
|
||||
explicit MetadataRetrieverClient(pid_t pid);
|
||||
virtual ~MetadataRetrieverClient();
|
||||
|
||||
|
||||
@@ -230,6 +230,7 @@ sp<OMXCodec> OMXCodec::Create(
|
||||
}
|
||||
if (!strncmp(componentName, "OMX.qcom.video.decoder.", 23)) {
|
||||
// XXX Required on P....on only.
|
||||
quirks |= kRequiresAllocateBufferOnInputPorts;
|
||||
quirks |= kRequiresAllocateBufferOnOutputPorts;
|
||||
quirks |= kOutputDimensionsAre16Aligned;
|
||||
}
|
||||
|
||||
@@ -503,4 +503,5 @@ public class MediaNames {
|
||||
"http://75.17.48.204:10088/yslau/stress_media/mpeg4_qvga_24fps.3gp";
|
||||
public static final int STREAM_H264_480_360_1411k_DURATION = 46000;
|
||||
public static final int VIDEO_H263_AAC_DURATION = 501000;
|
||||
public static final int VIDEO_H263_AMR_DURATION = 502000;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class MediaPlayerStressTest extends ActivityInstrumentationTestCase2<Medi
|
||||
long randomseed = System.currentTimeMillis();
|
||||
Random generator = new Random(randomseed);
|
||||
Log.v(TAG, "Random seed: " + randomseed);
|
||||
int video_duration = MediaNames.VIDEO_H263_AAC_DURATION;
|
||||
int video_duration = MediaNames.VIDEO_H263_AMR_DURATION;
|
||||
int random_play_time = 0;
|
||||
int random_seek_time = 0;
|
||||
int random_no_of_seek = 0;
|
||||
|
||||
@@ -1709,6 +1709,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy) {
|
||||
checkMockPermissionsSafe();
|
||||
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
synchronized (mLock) {
|
||||
MockProvider provider = new MockProvider(name, this,
|
||||
requiresNetwork, requiresSatellite,
|
||||
@@ -1731,6 +1732,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
mLastKnownLocation.put(name, null);
|
||||
updateProvidersLocked();
|
||||
}
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
|
||||
public void removeTestProvider(String provider) {
|
||||
@@ -1740,6 +1742,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
if (mockProvider == null) {
|
||||
throw new IllegalArgumentException("Provider \"" + provider + "\" unknown");
|
||||
}
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
removeProvider(mProvidersByName.get(provider));
|
||||
mMockProviders.remove(mockProvider);
|
||||
// reinstall real provider if we were mocking GPS or network provider
|
||||
@@ -1752,6 +1755,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
}
|
||||
mLastKnownLocation.put(provider, null);
|
||||
updateProvidersLocked();
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1787,6 +1791,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
if (mockProvider == null) {
|
||||
throw new IllegalArgumentException("Provider \"" + provider + "\" unknown");
|
||||
}
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
if (enabled) {
|
||||
mockProvider.enable();
|
||||
mEnabledProviders.add(provider);
|
||||
@@ -1797,6 +1802,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
mDisabledProviders.add(provider);
|
||||
}
|
||||
updateProvidersLocked();
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1807,9 +1813,11 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
|
||||
if (mockProvider == null) {
|
||||
throw new IllegalArgumentException("Provider \"" + provider + "\" unknown");
|
||||
}
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
mEnabledProviders.remove(provider);
|
||||
mDisabledProviders.remove(provider);
|
||||
updateProvidersLocked();
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2037,16 +2037,21 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
}
|
||||
|
||||
private void setScreenBrightnessMode(int mode) {
|
||||
mAutoBrightessEnabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
|
||||
// reset computed brightness
|
||||
mLightSensorBrightness = -1;
|
||||
boolean enabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
|
||||
if (mAutoBrightessEnabled != enabled) {
|
||||
mAutoBrightessEnabled = enabled;
|
||||
// reset computed brightness
|
||||
mLightSensorBrightness = -1;
|
||||
|
||||
if (mHasHardwareAutoBrightness) {
|
||||
// When setting auto-brightness, must reset the brightness afterwards
|
||||
mHardware.setAutoBrightness_UNCHECKED(mAutoBrightessEnabled);
|
||||
setBacklightBrightness((int)mScreenBrightness.curValue);
|
||||
} else {
|
||||
enableLightSensor(screenIsOn() && mAutoBrightessEnabled);
|
||||
if (mHasHardwareAutoBrightness) {
|
||||
// When setting auto-brightness, must reset the brightness afterwards
|
||||
mHardware.setAutoBrightness_UNCHECKED(enabled);
|
||||
if (screenIsOn()) {
|
||||
setBacklightBrightness((int)mScreenBrightness.curValue);
|
||||
}
|
||||
} else {
|
||||
enableLightSensor(screenIsOn() && enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2273,15 +2278,27 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
if (mSpew) {
|
||||
Log.d(TAG, "enableProximityLockLocked");
|
||||
}
|
||||
mSensorManager.registerListener(mProximityListener, mProximitySensor,
|
||||
SensorManager.SENSOR_DELAY_NORMAL);
|
||||
// clear calling identity so sensor manager battery stats are accurate
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mSensorManager.registerListener(mProximityListener, mProximitySensor,
|
||||
SensorManager.SENSOR_DELAY_NORMAL);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
|
||||
private void disableProximityLockLocked() {
|
||||
if (mSpew) {
|
||||
Log.d(TAG, "disableProximityLockLocked");
|
||||
}
|
||||
mSensorManager.unregisterListener(mProximityListener);
|
||||
// clear calling identity so sensor manager battery stats are accurate
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mSensorManager.unregisterListener(mProximityListener);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
synchronized (mLocks) {
|
||||
if (mProximitySensorActive) {
|
||||
mProximitySensorActive = false;
|
||||
@@ -2296,12 +2313,18 @@ class PowerManagerService extends IPowerManager.Stub
|
||||
}
|
||||
if (mSensorManager != null && mLightSensorEnabled != enable) {
|
||||
mLightSensorEnabled = enable;
|
||||
if (enable) {
|
||||
mSensorManager.registerListener(mLightListener, mLightSensor,
|
||||
SensorManager.SENSOR_DELAY_NORMAL);
|
||||
} else {
|
||||
mSensorManager.unregisterListener(mLightListener);
|
||||
mHandler.removeCallbacks(mAutoBrightnessTask);
|
||||
// clear calling identity so sensor manager battery stats are accurate
|
||||
long identity = Binder.clearCallingIdentity();
|
||||
try {
|
||||
if (enable) {
|
||||
mSensorManager.registerListener(mLightListener, mLightSensor,
|
||||
SensorManager.SENSOR_DELAY_NORMAL);
|
||||
} else {
|
||||
mSensorManager.unregisterListener(mLightListener);
|
||||
mHandler.removeCallbacks(mAutoBrightnessTask);
|
||||
}
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(identity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ public class ApnSetting {
|
||||
String mmsPort;
|
||||
String user;
|
||||
String password;
|
||||
int authType;
|
||||
String[] types;
|
||||
int id;
|
||||
String numeric;
|
||||
@@ -38,7 +39,7 @@ public class ApnSetting {
|
||||
|
||||
ApnSetting(int id, String numeric, String carrier, String apn, String proxy, String port,
|
||||
String mmsc, String mmsProxy, String mmsPort,
|
||||
String user, String password, String[] types) {
|
||||
String user, String password, int authType, String[] types) {
|
||||
this.id = id;
|
||||
this.numeric = numeric;
|
||||
this.carrier = carrier;
|
||||
@@ -50,6 +51,7 @@ public class ApnSetting {
|
||||
this.mmsPort = mmsPort;
|
||||
this.user = user;
|
||||
this.password = password;
|
||||
this.authType = authType;
|
||||
this.types = types;
|
||||
}
|
||||
|
||||
@@ -63,7 +65,8 @@ public class ApnSetting {
|
||||
.append(", ").append(mmsc)
|
||||
.append(", ").append(mmsProxy)
|
||||
.append(", ").append(mmsPort)
|
||||
.append(", ").append(port);
|
||||
.append(", ").append(port)
|
||||
.append(", ").append(authType);
|
||||
for (String t : types) {
|
||||
sb.append(", ").append(t);
|
||||
}
|
||||
|
||||
@@ -556,6 +556,7 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
|
||||
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT)),
|
||||
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.USER)),
|
||||
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PASSWORD)),
|
||||
cursor.getInt(cursor.getColumnIndexOrThrow(Telephony.Carriers.AUTH_TYPE)),
|
||||
types);
|
||||
result.add(apn);
|
||||
} while (cursor.moveToNext());
|
||||
|
||||
@@ -84,9 +84,11 @@ public class PdpConnection extends DataConnection {
|
||||
lastFailCause = FailCause.NONE;
|
||||
receivedDisconnectReq = false;
|
||||
|
||||
int authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
|
||||
RILConstants.SETUP_DATA_AUTH_NONE;
|
||||
|
||||
int authType = apn.authType;
|
||||
if (authType == -1) {
|
||||
authType = (apn.user != null) ? RILConstants.SETUP_DATA_AUTH_PAP_CHAP :
|
||||
RILConstants.SETUP_DATA_AUTH_NONE;
|
||||
}
|
||||
phone.mCM.setupDataCall(Integer.toString(RILConstants.SETUP_DATA_TECH_GSM),
|
||||
Integer.toString(RILConstants.DATA_PROFILE_DEFAULT), apn.apn, apn.user,
|
||||
apn.password, Integer.toString(authType),
|
||||
|
||||
@@ -51,8 +51,8 @@ public class LifecycleTest extends ActivityTestsBase {
|
||||
}
|
||||
|
||||
//Marking flaky until bug 1164344 is fixed.
|
||||
@FlakyTest(tolerance=2)
|
||||
@LargeTest
|
||||
// @FlakyTest(tolerance=2)
|
||||
// @LargeTest
|
||||
public void testScreen() throws Exception {
|
||||
mIntent = mTopIntent;
|
||||
runLaunchpad(LaunchpadActivity.LIFECYCLE_SCREEN);
|
||||
|
||||
@@ -160,7 +160,8 @@ public class PerformanceCollectorTest extends TestCase {
|
||||
verifyTimingBundle(timing, labels);
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: flaky test
|
||||
// @LargeTest
|
||||
public void testSimpleSequence() throws Exception {
|
||||
MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter();
|
||||
mPerfCollector.setPerformanceResultsWriter(writer);
|
||||
@@ -192,7 +193,8 @@ public class PerformanceCollectorTest extends TestCase {
|
||||
verifyTimingBundle(timing, labels);
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: flaky test
|
||||
// @LargeTest
|
||||
public void testLongSequence() throws Exception {
|
||||
MockPerformanceResultsWriter writer = new MockPerformanceResultsWriter();
|
||||
mPerfCollector.setPerformanceResultsWriter(writer);
|
||||
|
||||
@@ -67,7 +67,8 @@ public class ScrollingThroughListOfFocusablesTest extends InstrumentationTestCas
|
||||
assertEquals(mNumRowsPerItem, mActivity.getNumRowsPerItem());
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @MediumTest
|
||||
public void testScrollingDownInFirstItem() throws Exception {
|
||||
|
||||
for (int i = 0; i < mNumRowsPerItem; i++) {
|
||||
|
||||
@@ -70,7 +70,8 @@ public class GridTouchVerticalSpacingStackFromBottomTest extends ActivityInstrum
|
||||
newLastChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testShortScroll() {
|
||||
View firstChild = mGridView.getChildAt(0);
|
||||
if (firstChild.getTop() < this.mGridView.getListPaddingTop()) {
|
||||
@@ -91,7 +92,8 @@ public class GridTouchVerticalSpacingStackFromBottomTest extends ActivityInstrum
|
||||
newLastChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testLongScroll() {
|
||||
View firstChild = mGridView.getChildAt(0);
|
||||
if (firstChild.getTop() < mGridView.getListPaddingTop()) {
|
||||
|
||||
@@ -67,7 +67,8 @@ public class GridTouchVerticalSpacingTest extends ActivityInstrumentationTestCas
|
||||
assertEquals("Wrong view in first position", 0, newFirstChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testShortScroll() {
|
||||
View firstChild = mGridView.getChildAt(0);
|
||||
View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1);
|
||||
@@ -83,7 +84,8 @@ public class GridTouchVerticalSpacingTest extends ActivityInstrumentationTestCas
|
||||
assertEquals("Wrong view in first position", 0, newFirstChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testLongScroll() {
|
||||
View lastChild = mGridView.getChildAt(mGridView.getChildCount() - 1);
|
||||
|
||||
|
||||
@@ -53,13 +53,15 @@ public class FixedWidthTest extends ActivityInstrumentationTestCase<FixedWidth>
|
||||
assertNotNull(mNonFixedWidth);
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @MediumTest
|
||||
public void testFixedWidth() throws Exception {
|
||||
assertEquals(150, mFixedWidth.getWidth());
|
||||
assertEquals(mFixedWidth.getWidth(), mNonFixedWidth.getWidth());
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @MediumTest
|
||||
public void testFixedHeight() throws Exception {
|
||||
assertEquals(48, mFixedHeight.getHeight());
|
||||
}
|
||||
|
||||
@@ -52,7 +52,8 @@ public class ListOfTouchablesTest extends ActivityInstrumentationTestCase<ListOf
|
||||
assertNotNull(mListView);
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testShortScroll() {
|
||||
View firstChild = mListView.getChildAt(0);
|
||||
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
|
||||
@@ -68,7 +69,8 @@ public class ListOfTouchablesTest extends ActivityInstrumentationTestCase<ListOf
|
||||
assertEquals("Wrong view in first position", 0, newFirstChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testLongScroll() {
|
||||
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
|
||||
|
||||
|
||||
@@ -112,7 +112,8 @@ public class ListTouchBottomGravityManyTest extends ActivityInstrumentationTestC
|
||||
newLastChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testShortScroll() {
|
||||
View firstChild = mListView.getChildAt(0);
|
||||
if (firstChild.getTop() < this.mListView.getListPaddingTop()) {
|
||||
@@ -133,7 +134,8 @@ public class ListTouchBottomGravityManyTest extends ActivityInstrumentationTestC
|
||||
newLastChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testLongScroll() {
|
||||
View firstChild = mListView.getChildAt(0);
|
||||
if (firstChild.getTop() < mListView.getListPaddingTop()) {
|
||||
|
||||
@@ -159,7 +159,8 @@ public class ListTouchManyTest extends ActivityInstrumentationTestCase<ListTopGr
|
||||
assertEquals("Wrong view in first position", 0, newFirstChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testShortScroll() {
|
||||
View firstChild = mListView.getChildAt(0);
|
||||
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
|
||||
@@ -175,7 +176,8 @@ public class ListTouchManyTest extends ActivityInstrumentationTestCase<ListTopGr
|
||||
assertEquals("Wrong view in first position", 0, newFirstChild.getId());
|
||||
}
|
||||
|
||||
@LargeTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @LargeTest
|
||||
public void testLongScroll() {
|
||||
View lastChild = mListView.getChildAt(mListView.getChildCount() - 1);
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ public class BigCacheTest extends ActivityInstrumentationTestCase<BigCache> {
|
||||
assertNotNull(createCacheForView(mTiny));
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @MediumTest
|
||||
public void testDrawingCacheAboveMaximumSize() throws Exception {
|
||||
final int max = ViewConfiguration.get(getActivity()).getScaledMaximumDrawingCacheSize();
|
||||
assertTrue(mLarge.getWidth() * mLarge.getHeight() * 2 > max);
|
||||
|
||||
@@ -66,7 +66,8 @@ public class IncludeTest extends ActivityInstrumentationTestCase<Include> {
|
||||
assertEquals("Included button should be invisible", View.INVISIBLE, button1.getVisibility());
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
// TODO: needs to be adjusted to pass on non-HVGA displays
|
||||
// @MediumTest
|
||||
public void testIncludedWithSize() throws Exception {
|
||||
final Include activity = getActivity();
|
||||
final View button1 = activity.findViewById(R.id.included_button_with_size);
|
||||
|
||||
Reference in New Issue
Block a user