am 635d8a06: Merge "Revert "Merge downstream branch \'developers-dev\' into \'klp-dev\'"" into klp-dev

* commit '635d8a06fe9f0fe837eeb36e833a18d36967c338':
  Revert "Merge downstream branch 'developers-dev' into 'klp-dev'"
diff --git a/.gitignore b/.gitignore
index 627e46f..2dd1573 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,9 +11,7 @@
 # generated files
 bin/
 out/
-src/common
-src/template
-_index.jd
+gen/
 
 # Libraries used by the app
 # Can explicitly add if we want, but shouldn't do so blindly.  Licenses, bloat, etc.
@@ -21,8 +19,10 @@
 
 
 # Build stuff (auto-generated by android update project ...)
+build.xml
 ant.properties
 local.properties
+project.properties
 
 # Eclipse project files
 .classpath
@@ -35,7 +35,5 @@
 *.ipr
 *.iws
 
-##Gradle-based build
-.gradle
-build/
-
+#gitignore file
+.gitignore
diff --git a/background/alarms/repeatingAlarm/Scheduler/AndroidManifest.xml b/background/alarms/repeatingAlarm/Scheduler/AndroidManifest.xml
deleted file mode 100755
index 1e43d63..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/AndroidManifest.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.scheduler"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="18" />
-    <uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-permission>
-    <uses-permission android:name="android.permission.INTERNET" />
-
-    <application android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/Theme.Sample">
-
-        <activity android:name=".MainActivity"
-            android:label="@string/app_name"
-            android:uiOptions="splitActionBarWhenNarrow">
-
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-        <receiver android:name=".SampleAlarmReceiver"></receiver>
-
-        <receiver android:name=".SampleBootReceiver"
-                android:enabled="false">
-            <intent-filter>
-            <action android:name="android.intent.action.BOOT_COMPLETED"></action>
-            </intent-filter>
-        </receiver>
-        <service android:name=".SampleSchedulingService" />
-    </application>
-
-</manifest>
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/drawable-hdpi/ic_launcher.png b/background/alarms/repeatingAlarm/Scheduler/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 015d248..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/drawable-mdpi/ic_launcher.png b/background/alarms/repeatingAlarm/Scheduler/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 605a256..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/drawable-xhdpi/ic_launcher.png b/background/alarms/repeatingAlarm/Scheduler/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index c08bafa..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/drawable-xxhdpi/ic_launcher.png b/background/alarms/repeatingAlarm/Scheduler/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 1224b39..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/layout/activity_main.xml b/background/alarms/repeatingAlarm/Scheduler/res/layout/activity_main.xml
deleted file mode 100755
index 8ba99cd..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/layout/activity_main.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <TextView android:id="@+id/sample_output"
-        style="@style/Widget.SampleOutput"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/intro_message" />
-
-</ScrollView>
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/menu/main.xml b/background/alarms/repeatingAlarm/Scheduler/res/menu/main.xml
deleted file mode 100644
index f961a64..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/menu/main.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:id="@+id/start_action"
-        android:showAsAction="ifRoom|withText"
-        android:title="@string/start_text" />
-    <item android:id="@+id/cancel_action"
-        android:showAsAction="ifRoom|withText"
-        android:title="@string/cancel_text" />
-</menu>
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values/strings.xml b/background/alarms/repeatingAlarm/Scheduler/res/values/strings.xml
deleted file mode 100755
index 9caa7a8..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/values/strings.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <string name="app_name">Scheduler</string>
-    <string name="intro_message">Welcome to <b>Scheduler</b>!
-        This sample demonstrates how you can schedule an alarm that causes a service to
-        be started. This is useful when you want to schedule alarms that initiate
-        long-running operations. Click START ALARM to activate an alarm to check
-        the Google home page for a custom doodle once a day. If the app finds a doodle,
-        it posts a \"Doodle Alert\" as a notification. Click CANCEL ALARM to cancel the
-        alarm. Once the alarm is active, it automatically restarts when the device is
-        rebooted.</string>
-    <string name="start_text">Start Alarm</string>
-    <string name="cancel_text">Cancel Alarm</string>
-    <string name="doodle_alert">Doodle Alert</string>
-    <string name="doodle_found">There is a Google doodle today!!</string>
-    <string name="no_doodle">No Google doodle today.</string>
-    <string name="connection_error">Connection error.</string>
-</resources>
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values/styles.xml b/background/alarms/repeatingAlarm/Scheduler/res/values/styles.xml
deleted file mode 100644
index b1461dd..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/res/values/styles.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-
-    <!-- Activity themes -->
-
-    <style name="Theme.Base" parent="android:Theme.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
-    <!-- Widget styling -->
-
-    <style name="Widget" />
-
-    <style name="Widget.SampleOutput">
-        <item name="android:padding">@dimen/margin_medium</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-</resources>
diff --git a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/MainActivity.java b/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/MainActivity.java
deleted file mode 100755
index efb8e52..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/MainActivity.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2013 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.scheduler;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuItem;
-
-
-/**
- * This sample demonstrates how to schedule an alarm that causes a service to
- * be started. This is useful when you want to schedule alarms that initiate
- * long-running operations, such as retrieving a daily forecast.
- * This particular sample retrieves content from the Google home page once a day and
- * checks it for the search string "doodle". If it finds this string, that indicates
- * that the page contains a custom doodle instead of the standard Google logo.
- */
-public class MainActivity extends Activity {
-    SampleAlarmReceiver alarm = new SampleAlarmReceiver();
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.main, menu);
-        return true;
-    }
-
-    // Menu options to set and cancel the alarm.
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            // When the user clicks START ALARM, set the alarm.
-            case R.id.start_action:
-                alarm.setAlarm(this);
-                return true;
-            // When the user clicks CANCEL ALARM, cancel the alarm.
-            case R.id.cancel_action:
-                alarm.cancelAlarm(this);
-                return true;
-        }
-        return false;
-    }
-}
diff --git a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleAlarmReceiver.java b/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleAlarmReceiver.java
deleted file mode 100644
index 3a8cce1..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleAlarmReceiver.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package com.example.android.scheduler;
-
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.support.v4.content.WakefulBroadcastReceiver;
-
-import java.util.Calendar;
-
-/**
- * When the alarm fires, this WakefulBroadcastReceiver receives the broadcast Intent
- * and then starts the IntentService {@code SampleSchedulingService} to do some work.
- */
-public class SampleAlarmReceiver extends WakefulBroadcastReceiver {
-    // The app's AlarmManager, which provides access to the system alarm services.
-    private AlarmManager alarmMgr;
-
-    // The pending intent that is triggered when the alarm fires.
-    private PendingIntent alarmIntent;
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        // BEGIN_INCLUDE(alarm_onreceive)
-        /*
-         * If your receiver intent includes extras that need to be passed along to the
-         * service, use setComponent() to indicate that the service should handle the
-         * receiver's intent. For example:
-         *
-         * ComponentName comp = new ComponentName(context.getPackageName(),
-         *      MyService.class.getName());
-         *
-         * // This intent passed in this call will include the wake lock extra as well as
-         * // the receiver intent contents.
-         * startWakefulService(context, (intent.setComponent(comp)));
-         *
-         * In this example, we simply create a new intent to deliver to the service.
-         * This intent holds an extra identifying the wake lock.
-         */
-        Intent service = new Intent(context, SampleSchedulingService.class);
-
-        // Start the service, keeping the device awake while it is launching.
-        startWakefulService(context, service);
-        // END_INCLUDE(alarm_onreceive)
-    }
-
-    // BEGIN_INCLUDE(set_alarm)
-    /**
-     * Sets a repeating alarm that runs once a day at approximately 8:30 a.m. When the
-     * alarm fires, the app broadcasts an Intent to this WakefulBroadcastReceiver.
-     * @param context
-     */
-    public void setAlarm(Context context) {
-        alarmMgr = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
-        Intent intent = new Intent(context, SampleAlarmReceiver.class);
-        alarmIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
-
-        Calendar calendar = Calendar.getInstance();
-        calendar.setTimeInMillis(System.currentTimeMillis());
-        // Set the alarm's trigger time to 8:30 a.m.
-        calendar.set(Calendar.HOUR_OF_DAY, 8);
-        calendar.set(Calendar.MINUTE, 30);
-
-        /*
-         * If you don't have precise time requirements, use an inexact repeating alarm
-         * to minimize the drain on the device battery.
-         *
-         * The call below specifies the alarm type, the trigger time, the interval at
-         * which the alarm is fired, and the alarm's associated PendingIntent.
-         * It uses the alarm type RTC_WAKEUP ("Real Time Clock" wake up), which wakes up
-         * the device and triggers the alarm according to the time of the device's clock.
-         *
-         * Alternatively, you can use the alarm type ELAPSED_REALTIME_WAKEUP to trigger
-         * an alarm based on how much time has elapsed since the device was booted. This
-         * is the preferred choice if your alarm is based on elapsed time--for example, if
-         * you simply want your alarm to fire every 60 minutes. You only need to use
-         * RTC_WAKEUP if you want your alarm to fire at a particular date/time. Remember
-         * that clock-based time may not translate well to other locales, and that your
-         * app's behavior could be affected by the user changing the device's time setting.
-         *
-         * Here are some examples of ELAPSED_REALTIME_WAKEUP:
-         *
-         * // Wake up the device to fire a one-time alarm in one minute.
-         * alarmMgr.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-         *         SystemClock.elapsedRealtime() +
-         *         60*1000, alarmIntent);
-         *
-         * // Wake up the device to fire the alarm in 30 minutes, and every 30 minutes
-         * // after that.
-         * alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-         *         AlarmManager.INTERVAL_HALF_HOUR,
-         *         AlarmManager.INTERVAL_HALF_HOUR, alarmIntent);
-         */
-
-        // Set the alarm to fire at approximately 8:30 a.m., according to the device's
-        // clock, and to repeat once a day.
-        alarmMgr.setInexactRepeating(AlarmManager.RTC_WAKEUP,
-                calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, alarmIntent);
-
-        // Enable {@code SampleBootReceiver} to automatically restart the alarm when the
-        // device is rebooted.
-        ComponentName receiver = new ComponentName(context, SampleBootReceiver.class);
-        PackageManager pm = context.getPackageManager();
-
-        pm.setComponentEnabledSetting(receiver,
-                PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
-                PackageManager.DONT_KILL_APP);
-    }
-    // END_INCLUDE(set_alarm)
-
-    /**
-     * Cancels the alarm.
-     * @param context
-     */
-    // BEGIN_INCLUDE(cancel_alarm)
-    public void cancelAlarm(Context context) {
-        // If the alarm has been set, cancel it.
-        if (alarmMgr!= null) {
-            alarmMgr.cancel(alarmIntent);
-        }
-
-        // Disable {@code SampleBootReceiver} so that it doesn't automatically restart the
-        // alarm when the device is rebooted.
-        ComponentName receiver = new ComponentName(context, SampleBootReceiver.class);
-        PackageManager pm = context.getPackageManager();
-
-        pm.setComponentEnabledSetting(receiver,
-                PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
-                PackageManager.DONT_KILL_APP);
-    }
-    // END_INCLUDE(cancel_alarm)
-}
diff --git a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleBootReceiver.java b/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleBootReceiver.java
deleted file mode 100644
index 16464da..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleBootReceiver.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.example.android.scheduler;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * This BroadcastReceiver automatically (re)starts the alarm when the device is
- * rebooted. This receiver is set to be disabled (android:enabled="false") in the
- * application's manifest file. When the user sets the alarm, the receiver is enabled.
- * When the user cancels the alarm, the receiver is disabled, so that rebooting the
- * device will not trigger this receiver.
- */
-// BEGIN_INCLUDE(autostart)
-public class SampleBootReceiver extends BroadcastReceiver {
-    SampleAlarmReceiver alarm = new SampleAlarmReceiver();
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED"))
-        {
-            alarm.setAlarm(context);
-        }
-    }
-}
-//END_INCLUDE(autostart)
diff --git a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleSchedulingService.java b/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleSchedulingService.java
deleted file mode 100644
index d99fe0c..0000000
--- a/background/alarms/repeatingAlarm/Scheduler/src/com/example/android/scheduler/SampleSchedulingService.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package com.example.android.scheduler;
-
-import android.app.IntentService;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.support.v4.app.NotificationCompat;
-import android.util.Log;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-/**
- * This {@code IntentService} does the app's actual work.
- * {@code SampleAlarmReceiver} (a {@code WakefulBroadcastReceiver}) holds a
- * partial wake lock for this service while the service does its work. When the
- * service is finished, it calls {@code completeWakefulIntent()} to release the
- * wake lock.
- */
-public class SampleSchedulingService extends IntentService {
-    public SampleSchedulingService() {
-        super("SchedulingService");
-    }
-
-    public static final String TAG = "Scheduling Demo";
-    // An ID used to post the notification.
-    public static final int NOTIFICATION_ID = 1;
-    // The string the app searches for in the Google home page content. If the app finds
-    // the string, it indicates the presence of a doodle.
-    public static final String SEARCH_STRING = "doodle";
-    // The Google home page URL from which the app fetches content.
-    // You can find a list of other Google domains with possible doodles here:
-    // http://en.wikipedia.org/wiki/List_of_Google_domains
-    public static final String URL = "http://www.google.com";
-    private NotificationManager mNotificationManager;
-    NotificationCompat.Builder builder;
-
-    @Override
-    protected void onHandleIntent(Intent intent) {
-        // BEGIN_INCLUDE(service_onhandle)
-        // The URL from which to fetch content.
-        String urlString = URL;
-
-        String result ="";
-
-        // Try to connect to the Google homepage and download content.
-        try {
-            result = loadFromNetwork(urlString);
-        } catch (IOException e) {
-            Log.i(TAG, getString(R.string.connection_error));
-        }
-
-        // If the app finds the string "doodle" in the Google home page content, it
-        // indicates the presence of a doodle. Post a "Doodle Alert" notification.
-        if (result.indexOf(SEARCH_STRING) != -1) {
-            sendNotification(getString(R.string.doodle_found));
-            Log.i(TAG, "Found doodle!!");
-        } else {
-            sendNotification(getString(R.string.no_doodle));
-            Log.i(TAG, "No doodle found. :-(");
-        }
-        // Release the wake lock provided by the BroadcastReceiver.
-        SampleAlarmReceiver.completeWakefulIntent(intent);
-        // END_INCLUDE(service_onhandle)
-    }
-
-    // Post a notification indicating whether a doodle was found.
-    private void sendNotification(String msg) {
-        mNotificationManager = (NotificationManager)
-               this.getSystemService(Context.NOTIFICATION_SERVICE);
-
-        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
-            new Intent(this, MainActivity.class), 0);
-
-        NotificationCompat.Builder mBuilder =
-                new NotificationCompat.Builder(this)
-        .setSmallIcon(R.drawable.ic_launcher)
-        .setContentTitle(getString(R.string.doodle_alert))
-        .setStyle(new NotificationCompat.BigTextStyle()
-        .bigText(msg))
-        .setContentText(msg);
-
-        mBuilder.setContentIntent(contentIntent);
-        mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build());
-    }
-
-//
-// The methods below this line fetch content from the specified URL and return the
-// content as a string.
-//
-    /** Given a URL string, initiate a fetch operation. */
-    private String loadFromNetwork(String urlString) throws IOException {
-        InputStream stream = null;
-        String str ="";
-
-        try {
-            stream = downloadUrl(urlString);
-            str = readIt(stream);
-        } finally {
-            if (stream != null) {
-                stream.close();
-            }
-        }
-        return str;
-    }
-
-    /**
-     * Given a string representation of a URL, sets up a connection and gets
-     * an input stream.
-     * @param urlString A string representation of a URL.
-     * @return An InputStream retrieved from a successful HttpURLConnection.
-     * @throws IOException
-     */
-    private InputStream downloadUrl(String urlString) throws IOException {
-
-        URL url = new URL(urlString);
-        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-        conn.setReadTimeout(10000 /* milliseconds */);
-        conn.setConnectTimeout(15000 /* milliseconds */);
-        conn.setRequestMethod("GET");
-        conn.setDoInput(true);
-        // Start the query
-        conn.connect();
-        InputStream stream = conn.getInputStream();
-        return stream;
-    }
-
-    /**
-     * Reads an InputStream and converts it to a String.
-     * @param stream InputStream containing HTML from www.google.com.
-     * @return String version of InputStream.
-     * @throws IOException
-     */
-    private String readIt(InputStream stream) throws IOException {
-
-        StringBuilder builder = new StringBuilder();
-        BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
-        for(String line = reader.readLine(); line != null; line = reader.readLine())
-            builder.append(line);
-        reader.close();
-        return builder.toString();
-    }
-}
diff --git a/background/alarms/repeatingAlarm/build.gradle b/background/alarms/repeatingAlarm/build.gradle
deleted file mode 100644
index cca9ac3..0000000
--- a/background/alarms/repeatingAlarm/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/background/alarms/repeatingAlarm/buildSrc/build.gradle b/background/alarms/repeatingAlarm/buildSrc/build.gradle
deleted file mode 100644
index 7cebf71..0000000
--- a/background/alarms/repeatingAlarm/buildSrc/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/background/alarms/repeatingAlarm/gradle/wrapper/gradle-wrapper.jar b/background/alarms/repeatingAlarm/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/background/alarms/repeatingAlarm/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/gradle/wrapper/gradle-wrapper.properties b/background/alarms/repeatingAlarm/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 5c22dec..0000000
--- a/background/alarms/repeatingAlarm/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/background/alarms/repeatingAlarm/gradlew b/background/alarms/repeatingAlarm/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/background/alarms/repeatingAlarm/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/background/alarms/repeatingAlarm/gradlew.bat b/background/alarms/repeatingAlarm/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/background/alarms/repeatingAlarm/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/.gitignore b/background/alarms/repeatingAlarm/repeatingAlarmSample/.gitignore
deleted file mode 100644
index f1e8ad1..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-src/template/
-src/common/
\ No newline at end of file
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle b/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle
deleted file mode 100644
index 069b740..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.6.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    // Add the support lib that is appropriate for SDK 4
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-// The sample build uses multiple directories to
-// keep boilerplate and common code separate from
-// the main sample code.
-List<String> dirs = [
-    'main',     // main sample code; look here for the interesting stuff.
-    'common',   // components that are reused by multiple samples
-    'template'] // boilerplate code that is generated by the sample template process
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-
-    sourceSets {
-        main {
-            dirs.each { dir ->
-                java.srcDirs "src/${dir}/java"
-                res.srcDirs "src/${dir}/res"
-            }
-        }
-        instrumentTest.setRoot('tests')
-        instrumentTest.java.srcDirs = ['tests/src']
-    }
-}
-
-task preflight (dependsOn: parent.preflight) {
-    project.afterEvaluate {
-        // Inject a preflight task into each variant so we have a place to hook tasks
-        // that need to run before any of the android build tasks.
-        //
-        android.applicationVariants.each { variant ->
-            tasks.getByPath("prepare${variant.name.capitalize()}Dependencies").dependsOn preflight
-        }
-    }
-}
-
-
-
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/AndroidManifest.xml b/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/AndroidManifest.xml
deleted file mode 100644
index b7d02e5..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.repeatingalarm"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-
-</manifest>
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/java/com/example/android/repeatingalarm/RepeatingAlarmFragment.java b/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/java/com/example/android/repeatingalarm/RepeatingAlarmFragment.java
deleted file mode 100644
index 81b1e44..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/java/com/example/android/repeatingalarm/RepeatingAlarmFragment.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* Copyright 2013 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.repeatingalarm;
-
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.SystemClock;
-import android.support.v4.app.Fragment;
-import android.view.MenuItem;
-import com.example.android.common.logger.*;
-
-
-public class RepeatingAlarmFragment extends Fragment {
-
-    // This value is defined and consumed by app code, so any value will work.
-    // There's no significance to this sample using 0.
-    public static final int REQUEST_CODE = 0;
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if(item.getItemId() == R.id.sample_action) {
-
-            // BEGIN_INCLUDE (intent_fired_by_alarm)
-            // First create an intent for the alarm to activate.
-            // This code simply starts an Activity, or brings it to the front if it has already
-            // been created.
-            Intent intent = new Intent(getActivity(), MainActivity.class);
-            intent.setAction(Intent.ACTION_MAIN);
-            intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
-            // END_INCLUDE (intent_fired_by_alarm)
-
-            // BEGIN_INCLUDE (pending_intent_for_alarm)
-            // Because the intent must be fired by a system service from outside the application,
-            // it's necessary to wrap it in a PendingIntent.  Providing a different process with
-            // a PendingIntent gives that other process permission to fire the intent that this
-            // application has created.
-            // Also, this code creates a PendingIntent to start an Activity.  To create a
-            // BroadcastIntent instead, simply call getBroadcast instead of getIntent.
-            PendingIntent pendingIntent = PendingIntent.getActivity(getActivity(), REQUEST_CODE,
-                    intent, 0);
-
-            // END_INCLUDE (pending_intent_for_alarm)
-
-            // BEGIN_INCLUDE (configure_alarm_manager)
-            // There are two clock types for alarms, ELAPSED_REALTIME and RTC.
-            // ELAPSED_REALTIME uses time since system boot as a reference, and RTC uses UTC (wall
-            // clock) time.  This means ELAPSED_REALTIME is suited to setting an alarm according to
-            // passage of time (every 15 seconds, 15 minutes, etc), since it isn't affected by
-            // timezone/locale.  RTC is better suited for alarms that should be dependant on current
-            // locale.
-
-            // Both types have a WAKEUP version, which says to wake up the device if the screen is
-            // off.  This is useful for situations such as alarm clocks.  Abuse of this flag is an
-            // efficient way to skyrocket the uninstall rate of an application, so use with care.
-            // For most situations, ELAPSED_REALTIME will suffice.
-            int alarmType = AlarmManager.ELAPSED_REALTIME;
-            final int FIFTEEN_SEC_MILLIS = 15000;
-
-            // The AlarmManager, like most system services, isn't created by application code, but
-            // requested from the system.
-            AlarmManager alarmManager = (AlarmManager)
-                    getActivity().getSystemService(getActivity().ALARM_SERVICE);
-
-            // setRepeating takes a start delay and period between alarms as arguments.
-            // The below code fires after 15 seconds, and repeats every 15 seconds.  This is very
-            // useful for demonstration purposes, but horrendous for production.  Don't be that dev.
-            alarmManager.setRepeating(alarmType, SystemClock.elapsedRealtime() + FIFTEEN_SEC_MILLIS,
-                    FIFTEEN_SEC_MILLIS, pendingIntent);
-            // END_INCLUDE (configure_alarm_manager);
-            Log.i("RepeatingAlarmFragment", "Alarm set.");
-        }
-        return true;
-    }
-}
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-hdpi/ic_launcher.png b/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-mdpi/ic_launcher.png b/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-xhdpi/ic_launcher.png b/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/background/alarms/repeatingAlarm/settings.gradle b/background/alarms/repeatingAlarm/settings.gradle
deleted file mode 100644
index 73a49e8..0000000
--- a/background/alarms/repeatingAlarm/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include 'repeatingAlarmSample'
diff --git a/background/alarms/repeatingAlarm/template-params.xml b/background/alarms/repeatingAlarm/template-params.xml
deleted file mode 100644
index b5a52bb..0000000
--- a/background/alarms/repeatingAlarm/template-params.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>repeatingAlarm</name>
-    <group>Background</group>
-    <package>com.example.android.repeatingalarm</package>
-
-
-    <!--TODO: change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                Introductory text that explains what the sample is intended to demonstrate. Edit
-                in template-params.xml.
-            ]]>
-        </intro>
-
-        <sample_action>Set Alarm</sample_action>
-    </strings>
-
-
-    <meatFragment>AlarmFragment</meatFragment>
-    <template src="base"/>
-    <template src="SingleView"/>
-    <common src="logger"/>
-    <common src="activities"/>
-
-</sample>
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index b895091..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,55 +0,0 @@
-List<String> samples = [
-"security/keystore/BasicAndroidKeyStore",
-"connectivity/sync/BasicSyncAdapter",
-"connectivity/network/NetworkConnect",
-"connectivity/network/BasicNetworking",
-"connectivity/bluetooth/BluetoothLeGatt",
-"content/multiuser/AppRestrictions",
-"content/contacts/BasicContactables",
-"content/documentsUi/StorageClient",
-"views/TextLinkify",
-"input/gestures/BasicGestureDetect",
-"input/multitouch/BasicMultitouch",
-"testing/ActivityInstrumentation",
-"media/BasicMediaRouter",
-"media/BasicMediaDecoder",
-"ui/holo/BorderlessButtons",
-"ui/accessibility/BasicAccessibility",
-"ui/lists/CustomChoiceList",
-"ui/views/TextSwitcher",
-"ui/views/HorizontalPaging",
-"ui/actionbarcompat/Styled",
-"ui/actionbarcompat/ListPopupMenu",
-"ui/actionbarcompat/ShareActionProvider",
-"ui/actionbarcompat/Basic",
-"ui/notifications/BasicNotifications",
-"ui/notifications/CustomNotifications",
-"ui/actionbar/DoneBar",
-"ui/window/BasicImmersiveMode",
-"ui/window/AdvancedImmersiveMode",
-"ui/window/ImmersiveMode",
-"background/alarms/repeatingAlarm"
-]
-
-List<String> taskNames = [
-    "clean",
-    "refresh",
-    "build",
-    "emitAnt",
-    "emitGradle",
-    "emitBrowseable",
-]
-
-taskNames.each { taskName ->
-    def task = project.hasProperty(taskName) ? project.tasks[taskName] : project.task(taskName)
-    println task
-    samples.each { sample ->
-        File sampleDir = new File(sample)
-        task.dependsOn project.task([type: GradleBuild], "${sample}_${taskName}", {
-            buildFile = "${sample}/build.gradle"
-            dir = sample
-            tasks = [taskName]
-        })
-    }
-}
-
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
deleted file mode 100644
index b42a6ef..0000000
--- a/buildSrc/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/common/src/com/example/android/common/Pools.java b/common/src/com/example/android/common/Pools.java
new file mode 100644
index 0000000..b31749a
--- /dev/null
+++ b/common/src/com/example/android/common/Pools.java
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2009 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.common;
+
+/**
+ * Helper class for creating pools of objects. Creating new objects is an
+ * expensive operation, which can lead to significant performance overhead if
+ * new objects of the same type are allocated and destroyed during run time.
+ * These performance issues can be mitigated by reusing unused objects and
+ * reinitializing them, rather than destroying and removing them from memory.
+ * <p>
+ * The object pool pattern provided by the {@link Pool} interface facilitates
+ * the reuse of objects by keeping unused ('released') objects in memory and
+ * making them available for use. This can provide a significant performance
+ * improvement, as objects are only created once and returned to the Pool when
+ * no longer required, rather than destroyed and reallocated. Object
+ * {@link Pools} keep track of these unused objects. An object pool provides two
+ * basic methods for access:
+ * <ul>
+ * <li><b>{@link Pool#acquire()}:</b> Returns an used object if one is
+ * available.</li>
+ * <li><b> {@link Pool#release(Object)}:</b> Adds the given object to the pool,
+ * ready to be reallocated in acquire().</li>
+ * </ul>
+ * <p>
+ * This class contains the interface defining a {@link Pool}, an implementation
+ * based on a fixed length array ({@link SimplePool}) and a synchronized pool
+ * for use with concurrency ({@link SynchronizedPool}).
+ * <p>
+ * A {@link SimplePool} can be used like this:
+ *
+ * <pre>
+ * public class MyPooledClass {
+ *
+ *     private static final SynchronizedPool<MyPooledClass> sPool =
+ *             new SynchronizedPool<MyPooledClass>(10);
+ *
+ *     public static MyPooledClass obtain() {
+ *         MyPooledClass instance = sPool.acquire();
+ *         return (instance != null) ? instance : new MyPooledClass();
+ *     }
+ *
+ *     public void recycle() {
+ *          // Clear state if needed.
+ *          sPool.release(this);
+ *     }
+ *
+ *     . . .
+ * }
+ * </pre>
+ */
+public final class Pools {
+
+    /**
+     * Interface for managing a pool of objects.
+     *
+     * @param T The pooled type.
+     */
+    public static interface Pool<T> {
+
+        /**
+         * Retrieves an object from the pool. Returns null if the pool is empty
+         * and no object is available.
+         *
+         * @return An instance from the pool if available, null otherwise.
+         */
+        public T acquire();
+
+        /**
+         * Releases an instance to the pool. This marks the object as reusable
+         * and makes it available through a call to {@link #acquire()}. An
+         * object should not be modified or accessed once it has been released.
+         *
+         * @param instance The instance to release.
+         * @return True if the instance was put in the pool.
+         * @throws IllegalStateException If the instance is already in the pool.
+         */
+        public boolean release(T instance);
+    }
+
+    private Pools() {
+        /* do nothing - hiding constructor */
+    }
+
+    /**
+     * Simple (non-synchronized) pool of objects. This class provides a simple,
+     * fixed sized pool of objects.
+     *
+     * @param T The pooled type.
+     */
+    public static class SimplePool<T> implements Pool<T> {
+        private final Object[] mPool;
+
+        private int mPoolSize;
+
+        /**
+         * Creates a new instance. The parameter defines the maximum number of
+         * objects that can be held in this pool.
+         *
+         * @param maxPoolSize The max pool size.
+         * @throws IllegalArgumentException If the max pool size is less than
+         *             zero.
+         */
+        public SimplePool(int maxPoolSize) {
+            if (maxPoolSize <= 0) {
+                throw new IllegalArgumentException("The max pool size must be > 0");
+            }
+            mPool = new Object[maxPoolSize];
+        }
+
+        /**
+         * Returns an object from the pool or null if the pool is empty.
+         *
+         * @return An object from the pool or null if no object is available.
+         */
+        @Override
+        @SuppressWarnings("unchecked")
+        public T acquire() {
+            if (mPoolSize > 0) {
+                final int lastPooledIndex = mPoolSize - 1;
+                T instance = (T) mPool[lastPooledIndex];
+                mPool[lastPooledIndex] = null;
+                mPoolSize--;
+                return instance;
+            }
+            return null;
+        }
+
+        /**
+         * Adds an object to the pool. If the pool is already full (its
+         * allocated size has been exceeded), the object is not added and false
+         * is returned. A linear check is performed to ensure that the object is
+         * not already held in the pool.
+         *
+         * @param instance The element to release.
+         * @return True if the object was added to the pool.
+         * @throws IllegalStateException If the object already exists in the
+         *             pool.
+         */
+        @Override
+        public boolean release(T instance) {
+            if (isInPool(instance)) {
+                throw new IllegalStateException("Already in the pool!");
+            }
+            if (mPoolSize < mPool.length) {
+                mPool[mPoolSize] = instance;
+                mPoolSize++;
+                return true;
+            }
+            return false;
+        }
+
+        /**
+         * Checks if the object already exists in the pool.
+         * @param instance The element to look for.
+         * @return True if the object exists in the pool.
+         */
+        private boolean isInPool(T instance) {
+            for (int i = 0; i < mPoolSize; i++) {
+                if (mPool[i] == instance) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * Synchronized pool of objects. Based on the implementation of a fixed size
+     * pool in {@link SimplePool}, this class provides synchronized concurrent
+     * access to the pool.
+     *
+     * @param T The pooled type.
+     */
+    public static class SynchronizedPool<T> extends SimplePool<T> {
+        private final Object mLock = new Object();
+
+        /**
+         * Creates a new instance.
+         *
+         * @param maxPoolSize The max pool size.
+         * @throws IllegalArgumentException If the max pool size is less than
+         *             zero.
+         */
+        public SynchronizedPool(int maxPoolSize) {
+            super(maxPoolSize);
+        }
+
+        /**
+         * Returns an object from the pool or null if the pool is empty.
+         * <p>
+         * Access to the pool is synchronized.
+         *
+         * @return An object from the pool or null if no object is available.
+         */
+        @Override
+        public T acquire() {
+            synchronized (mLock) {
+                return super.acquire();
+            }
+        }
+
+        /**
+         * Adds an object to the pool. If the pool is already full (its
+         * allocated size has been exceeded), the object is not added and false
+         * is returned. A linear check is performed to ensure that the object is
+         * not already held in the pool.
+         * <p>
+         * Access to the pool is synchronized.
+         *
+         * @param element The element to be released
+         * @return True if the object was added to the pool.
+         * @throws IllegalStateException If the object already exists in the
+         *             pool.
+         */
+        @Override
+        public boolean release(T element) {
+            synchronized (mLock) {
+                return super.release(element);
+            }
+        }
+    }
+}
diff --git a/common/src/com/example/android/common/accounts/GenericAccountService.java b/common/src/com/example/android/common/accounts/GenericAccountService.java
new file mode 100644
index 0000000..9480023
--- /dev/null
+++ b/common/src/com/example/android/common/accounts/GenericAccountService.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2013 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.common.accounts;
+
+import android.accounts.AbstractAccountAuthenticator;
+import android.accounts.Account;
+import android.accounts.AccountAuthenticatorResponse;
+import android.accounts.NetworkErrorException;
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.util.Log;
+
+public class GenericAccountService extends Service {
+    private static final String TAG = "GenericAccountService";
+    private static final String ACCOUNT_TYPE = "com.example.android.network.sync.basicsyncadapter";
+    public static final String ACCOUNT_NAME = "sync";
+    private Authenticator mAuthenticator;
+
+    /**
+     * Obtain a handle to the {@link android.accounts.Account} used for sync in this application.
+     *
+     * @return Handle to application's account (not guaranteed to resolve unless CreateSyncAccount()
+     *         has been called)
+     */
+    public static Account GetAccount() {
+        // Note: Normally the account name is set to the user's identity (username or email
+        // address). However, since we aren't actually using any user accounts, it makes more sense
+        // to use a generic string in this case.
+        //
+        // This string should *not* be localized. If the user switches locale, we would not be
+        // able to locate the old account, and may erroneously register multiple accounts.
+        final String accountName = ACCOUNT_NAME;
+        return new Account(accountName, ACCOUNT_TYPE);
+    }
+
+    @Override
+    public void onCreate() {
+        Log.i(TAG, "Service created");
+        mAuthenticator = new Authenticator(this);
+    }
+
+    @Override
+    public void onDestroy() {
+        Log.i(TAG, "Service destroyed");
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return mAuthenticator.getIBinder();
+    }
+
+    public class Authenticator extends AbstractAccountAuthenticator {
+        public Authenticator(Context context) {
+            super(context);
+        }
+
+        @Override
+        public Bundle editProperties(AccountAuthenticatorResponse accountAuthenticatorResponse,
+                                     String s) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public Bundle addAccount(AccountAuthenticatorResponse accountAuthenticatorResponse,
+                                 String s, String s2, String[] strings, Bundle bundle)
+                throws NetworkErrorException {
+            return null;
+        }
+
+        @Override
+        public Bundle confirmCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse,
+                                         Account account, Bundle bundle)
+                throws NetworkErrorException {
+            return null;
+        }
+
+        @Override
+        public Bundle getAuthToken(AccountAuthenticatorResponse accountAuthenticatorResponse,
+                                   Account account, String s, Bundle bundle)
+                throws NetworkErrorException {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public String getAuthTokenLabel(String s) {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public Bundle updateCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse,
+                                        Account account, String s, Bundle bundle)
+                throws NetworkErrorException {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public Bundle hasFeatures(AccountAuthenticatorResponse accountAuthenticatorResponse,
+                                  Account account, String[] strings)
+                throws NetworkErrorException {
+            throw new UnsupportedOperationException();
+        }
+    }
+
+}
+
diff --git a/common/src/com/example/android/common/actionbarcompat/MultiSelectionUtil.java b/common/src/com/example/android/common/actionbarcompat/MultiSelectionUtil.java
deleted file mode 100644
index 482f6ed..0000000
--- a/common/src/com/example/android/common/actionbarcompat/MultiSelectionUtil.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (C) 2013 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.common.actionbarcompat;
-
-import android.os.Bundle;
-import android.support.v7.app.ActionBarActivity;
-import android.support.v7.view.ActionMode;
-import android.util.Pair;
-import android.util.SparseBooleanArray;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AbsListView;
-import android.widget.Adapter;
-import android.widget.AdapterView;
-import android.widget.ListView;
-
-import java.util.HashSet;
-
-/**
- * Utilities for handling multiple selection in list views. Contains functionality similar to {@link
- * AbsListView#CHOICE_MODE_MULTIPLE_MODAL} which works with {@link ActionBarActivity} and
- * backward-compatible action bars.
- */
-public class MultiSelectionUtil {
-
-    /**
-     * Attach a Controller to the given <code>listView</code>, <code>activity</code>
-     * and <code>listener</code>.
-     *
-     * @param listView ListView which displays {@link android.widget.Checkable} items.
-     * @param activity Activity which contains the ListView.
-     * @param listener Listener that will manage the selection mode.
-     * @return the attached Controller instance.
-     */
-    public static Controller attachMultiSelectionController(final ListView listView,
-            final ActionBarActivity activity, final MultiChoiceModeListener listener) {
-        return new Controller(listView, activity, listener);
-    }
-
-    /**
-     * Class which provides functionality similar to {@link AbsListView#CHOICE_MODE_MULTIPLE_MODAL}
-     * for the {@link ListView} provided to it. A
-     * {@link android.widget.AdapterView.OnItemLongClickListener} is set on the ListView so that
-     * when an item is long-clicked an ActionBarCompat Action Mode is started. Once started, a
-     * {@link android.widget.AdapterView.OnItemClickListener} is set so that an item click toggles
-     * that item's checked state.
-     */
-    public static class Controller {
-
-        private final ListView mListView;
-        private final ActionBarActivity mActivity;
-        private final MultiChoiceModeListener mListener;
-        private final Callbacks mCallbacks;
-
-        // Current Action Mode (if there is one)
-        private ActionMode mActionMode;
-
-        // Keeps record of any items that should be checked on the next action mode creation
-        private HashSet<Pair<Integer, Long>> mItemsToCheck;
-
-        // Reference to the replace OnItemClickListener (so it can be restored later)
-        private AdapterView.OnItemClickListener mOldItemClickListener;
-
-        private final Runnable mSetChoiceModeNoneRunnable = new Runnable() {
-            @Override
-            public void run() {
-                mListView.setChoiceMode(AbsListView.CHOICE_MODE_NONE);
-            }
-        };
-
-        private Controller(ListView listView, ActionBarActivity activity,
-                MultiChoiceModeListener listener) {
-            mListView = listView;
-            mActivity = activity;
-            mListener = listener;
-            mCallbacks = new Callbacks();
-
-            // We set ourselves as the OnItemLongClickListener so we know when to start
-            // an Action Mode
-            listView.setOnItemLongClickListener(mCallbacks);
-        }
-
-        /**
-         * Finish the current Action Mode (if there is one).
-         */
-        public void finish() {
-            if (mActionMode != null) {
-                mActionMode.finish();
-            }
-        }
-
-        /**
-         * This method should be called from your {@link ActionBarActivity} or
-         * {@link android.support.v4.app.Fragment Fragment} to allow the controller to restore any
-         * instance state.
-         *
-         * @param savedInstanceState - The state passed to your Activity or Fragment.
-         */
-        public void restoreInstanceState(Bundle savedInstanceState) {
-            if (savedInstanceState != null) {
-                long[] checkedIds = savedInstanceState.getLongArray(getStateKey());
-                if (checkedIds != null && checkedIds.length > 0) {
-                    HashSet<Long> idsToCheckOnRestore = new HashSet<Long>();
-                    for (long id : checkedIds) {
-                        idsToCheckOnRestore.add(id);
-                    }
-                    tryRestoreInstanceState(idsToCheckOnRestore);
-                }
-            }
-        }
-
-        /**
-         * This method should be called from
-         * {@link ActionBarActivity#onSaveInstanceState(android.os.Bundle)} or
-         * {@link android.support.v4.app.Fragment#onSaveInstanceState(android.os.Bundle)
-         * Fragment.onSaveInstanceState(Bundle)} to allow the controller to save its instance
-         * state.
-         *
-         * @param outState - The state passed to your Activity or Fragment.
-         */
-        public void saveInstanceState(Bundle outState) {
-            if (mActionMode != null && mListView.getAdapter().hasStableIds()) {
-                outState.putLongArray(getStateKey(), mListView.getCheckedItemIds());
-            }
-        }
-
-        // Internal utility methods
-
-        private String getStateKey() {
-            return MultiSelectionUtil.class.getSimpleName() + "_" + mListView.getId();
-        }
-
-        private void tryRestoreInstanceState(HashSet<Long> idsToCheckOnRestore) {
-            if (idsToCheckOnRestore == null || mListView.getAdapter() == null) {
-                return;
-            }
-
-            boolean idsFound = false;
-            Adapter adapter = mListView.getAdapter();
-            for (int pos = adapter.getCount() - 1; pos >= 0; pos--) {
-                if (idsToCheckOnRestore.contains(adapter.getItemId(pos))) {
-                    idsFound = true;
-                    if (mItemsToCheck == null) {
-                        mItemsToCheck = new HashSet<Pair<Integer, Long>>();
-                    }
-                    mItemsToCheck.add(new Pair<Integer, Long>(pos, adapter.getItemId(pos)));
-                }
-            }
-
-            if (idsFound) {
-                // We found some IDs that were checked. Let's now restore the multi-selection
-                // state.
-                mActionMode = mActivity.startSupportActionMode(mCallbacks);
-            }
-        }
-
-        /**
-         * This class encapsulates all of the callbacks necessary for the controller class.
-         */
-        final class Callbacks implements ActionMode.Callback, AdapterView.OnItemClickListener,
-                AdapterView.OnItemLongClickListener {
-
-            @Override
-            public final boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
-                if (mListener.onCreateActionMode(actionMode, menu)) {
-                    mActionMode = actionMode;
-                    // Keep a reference to the existing OnItemClickListener so we can restore it
-                    mOldItemClickListener = mListView.getOnItemClickListener();
-
-                    // Set-up the ListView to emulate CHOICE_MODE_MULTIPLE_MODAL
-                    mListView.setOnItemClickListener(this);
-                    mListView.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
-                    mListView.removeCallbacks(mSetChoiceModeNoneRunnable);
-
-                    // If there are some items to check, do it now
-                    if (mItemsToCheck != null) {
-                        for (Pair<Integer, Long> posAndId : mItemsToCheck) {
-                            mListView.setItemChecked(posAndId.first, true);
-                            // Notify the listener that the item has been checked
-                            mListener.onItemCheckedStateChanged(mActionMode, posAndId.first,
-                                    posAndId.second, true);
-                        }
-                    }
-                    return true;
-                }
-                return false;
-            }
-
-            @Override
-            public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
-                // Proxy listener
-                return mListener.onPrepareActionMode(actionMode, menu);
-            }
-
-            @Override
-            public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
-                // Proxy listener
-                return mListener.onActionItemClicked(actionMode, menuItem);
-            }
-
-            @Override
-            public void onDestroyActionMode(ActionMode actionMode) {
-                mListener.onDestroyActionMode(actionMode);
-
-                // Clear all the checked items
-                SparseBooleanArray checkedPositions = mListView.getCheckedItemPositions();
-                if (checkedPositions != null) {
-                    for (int i = 0; i < checkedPositions.size(); i++) {
-                        mListView.setItemChecked(checkedPositions.keyAt(i), false);
-                    }
-                }
-
-                // Restore the original onItemClickListener
-                mListView.setOnItemClickListener(mOldItemClickListener);
-
-                // Clear the Action Mode
-                mActionMode = null;
-
-                // Reset the ListView's Choice Mode
-                mListView.post(mSetChoiceModeNoneRunnable);
-            }
-
-            @Override
-            public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
-                // Check to see what the new checked state is, and then notify the listener
-                final boolean checked = mListView.isItemChecked(position);
-                mListener.onItemCheckedStateChanged(mActionMode, position, id, checked);
-
-                boolean hasCheckedItem = checked;
-
-                // Check to see if we have any checked items
-                if (!hasCheckedItem) {
-                    SparseBooleanArray checkedItemPositions = mListView.getCheckedItemPositions();
-                    if (checkedItemPositions != null) {
-                        // Iterate through the SparseBooleanArray to see if there is a checked item
-                        int i = 0;
-                        while (!hasCheckedItem && i < checkedItemPositions.size()) {
-                            hasCheckedItem = checkedItemPositions.valueAt(i++);
-                        }
-                    }
-                }
-
-                // If we don't have any checked items, finish the action mode
-                if (!hasCheckedItem) {
-                    mActionMode.finish();
-                }
-            }
-
-            @Override
-            public boolean onItemLongClick(AdapterView<?> adapterView, View view, int position,
-                    long id) {
-                // If we already have an action mode started return false
-                // (onItemClick will be called anyway)
-                if (mActionMode != null) {
-                    return false;
-                }
-
-                mItemsToCheck = new HashSet<Pair<Integer, Long>>();
-                mItemsToCheck.add(new Pair<Integer, Long>(position, id));
-                mActionMode = mActivity.startSupportActionMode(this);
-                return true;
-            }
-        }
-    }
-
-    /**
-     * @see android.widget.AbsListView.MultiChoiceModeListener
-     */
-    public static interface MultiChoiceModeListener extends ActionMode.Callback {
-
-        /**
-         * @see android.widget.AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged(
-         *android.view.ActionMode, int, long, boolean)
-         */
-        public void onItemCheckedStateChanged(ActionMode mode, int position, long id,
-                boolean checked);
-    }
-}
diff --git a/common/src/com/example/android/common/db/SelectionBuilder.java b/common/src/com/example/android/common/db/SelectionBuilder.java
new file mode 100644
index 0000000..51d8cc3
--- /dev/null
+++ b/common/src/com/example/android/common/db/SelectionBuilder.java
@@ -0,0 +1,358 @@
+/*
+ * Copyright 2013 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.
+ */
+
+/*
+ * Modifications:
+ * -Imported from AOSP frameworks/base/core/java/com/android/internal/content
+ * -Changed package name
+ */
+
+package com.example.android.common.db;
+
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * Helper for building selection clauses for {@link SQLiteDatabase}.
+ *
+ * <p>This class provides a convenient frontend for working with SQL. Instead of composing statements
+ * manually using string concatenation, method calls are used to construct the statement one
+ * clause at a time. These methods can be chained together.
+ *
+ * <p>If multiple where() statements are provided, they're combined using {@code AND}.
+ *
+ * <p>Example:
+ *
+ * <pre>
+ *     SelectionBuilder builder = new SelectionBuilder();
+ *     Cursor c = builder.table(FeedContract.Entry.TABLE_NAME)       // String TABLE_NAME = "entry"
+ *                       .where(FeedContract.Entry._ID + "=?", id);  // String _ID = "_ID"
+ *                       .query(db, projection, sortOrder)
+ *
+ * </pre>
+ *
+ * <p>In this example, the table name and filters ({@code WHERE} clauses) are both explicitly
+ * specified via method call. SelectionBuilder takes care of issuing a "query" command to the
+ * database, and returns the resulting {@link Cursor} object.
+ *
+ * <p>Inner {@code JOIN}s can be accomplished using the mapToTable() function. The map() function
+ * can be used to create new columns based on arbitrary (SQL-based) criteria. In advanced usage,
+ * entire subqueries can be passed into the map() function.
+ *
+ * <p>Advanced example:
+ *
+ * <pre>
+ *     // String SESSIONS_JOIN_BLOCKS_ROOMS = "sessions "
+ *     //        + "LEFT OUTER JOIN blocks ON sessions.block_id=blocks.block_id "
+ *     //        + "LEFT OUTER JOIN rooms ON sessions.room_id=rooms.room_id";
+ *
+ *     // String Subquery.BLOCK_NUM_STARRED_SESSIONS =
+ *     //       "(SELECT COUNT(1) FROM "
+ *     //        + Tables.SESSIONS + " WHERE " + Qualified.SESSIONS_BLOCK_ID + "="
+ *     //        + Qualified.BLOCKS_BLOCK_ID + " AND " + Qualified.SESSIONS_STARRED + "=1)";
+ *
+ *     String Subqery.BLOCK_SESSIONS_COUNT =
+ *     Cursor c = builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
+ *               .map(Blocks.NUM_STARRED_SESSIONS, Subquery.BLOCK_NUM_STARRED_SESSIONS)
+ *               .mapToTable(Sessions._ID, Tables.SESSIONS)
+ *               .mapToTable(Sessions.SESSION_ID, Tables.SESSIONS)
+ *               .mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
+ *               .mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
+ *               .where(Qualified.SESSIONS_BLOCK_ID + "=?", blockId);
+ * </pre>
+ *
+ * <p>In this example, we have two different types of {@code JOIN}s: a left outer join using a
+ * modified table name (since this class doesn't directly support these), and an inner join using
+ * the mapToTable() function. The map() function is used to insert a count based on specific
+ * criteria, executed as a sub-query.
+ *
+ * This class is <em>not</em> thread safe.
+ */
+public class SelectionBuilder {
+    private static final String TAG = "basicsyncadapter";
+
+    private String mTable = null;
+    private Map<String, String> mProjectionMap = Maps.newHashMap();
+    private StringBuilder mSelection = new StringBuilder();
+    private ArrayList<String> mSelectionArgs = Lists.newArrayList();
+
+    /**
+     * Reset any internal state, allowing this builder to be recycled.
+     *
+     * <p>Calling this method is more efficient than creating a new SelectionBuilder object.
+     *
+     * @return Fluent interface
+     */
+    public SelectionBuilder reset() {
+        mTable = null;
+        mSelection.setLength(0);
+        mSelectionArgs.clear();
+        return this;
+    }
+
+    /**
+     * Append the given selection clause to the internal state. Each clause is
+     * surrounded with parenthesis and combined using {@code AND}.
+     *
+     * <p>In the most basic usage, simply provide a selection in SQL {@code WHERE} statement format.
+     *
+     * <p>Example:
+     *
+     * <pre>
+     *     .where("blog_posts.category = 'PROGRAMMING');
+     * </pre>
+     *
+     * <p>User input should never be directly supplied as as part of the selection statement.
+     * Instead, use positional parameters in your selection statement, then pass the user input
+     * in via the selectionArgs parameter. This prevents SQL escape characters in user input from
+     * causing unwanted side effects. (Failure to follow this convention may have security
+     * implications.)
+     *
+     * <p>Positional parameters are specified using the '?' character.
+     *
+     * <p>Example:
+     * <pre>
+     *     .where("blog_posts.title contains ?, userSearchString);
+     * </pre>
+     *
+     * @param selection SQL where statement
+     * @param selectionArgs Values to substitute for positional parameters ('?' characters in
+     *                      {@code selection} statement. Will be automatically escaped.
+     * @return Fluent interface
+     */
+    public SelectionBuilder where(String selection, String... selectionArgs) {
+        if (TextUtils.isEmpty(selection)) {
+            if (selectionArgs != null && selectionArgs.length > 0) {
+                throw new IllegalArgumentException(
+                        "Valid selection required when including arguments=");
+            }
+
+            // Shortcut when clause is empty
+            return this;
+        }
+
+        if (mSelection.length() > 0) {
+            mSelection.append(" AND ");
+        }
+
+        mSelection.append("(").append(selection).append(")");
+        if (selectionArgs != null) {
+            Collections.addAll(mSelectionArgs, selectionArgs);
+        }
+
+        return this;
+    }
+
+    /**
+     * Table name to use for SQL {@code FROM} statement.
+     *
+     * <p>This method may only be called once. If multiple tables are required, concatenate them
+     * in SQL-format (typically comma-separated).
+     *
+     * <p>If you need to do advanced {@code JOIN}s, they can also be specified here.
+     *
+     * See also: mapToTable()
+     *
+     * @param table Table name
+     * @return Fluent interface
+     */
+    public SelectionBuilder table(String table) {
+        mTable = table;
+        return this;
+    }
+
+    /**
+     * Verify that a table name has been supplied using table().
+     *
+     * @throws IllegalStateException if table not set
+     */
+    private void assertTable() {
+        if (mTable == null) {
+            throw new IllegalStateException("Table not specified");
+        }
+    }
+
+    /**
+     * Perform an inner join.
+     *
+     * <p>Map columns from a secondary table onto the current result set. References to the column
+     * specified in {@code column} will be replaced with {@code table.column} in the SQL {@code
+     * SELECT} clause.
+     *
+     * @param column Column name to join on. Must be the same in both tables.
+     * @param table Secondary table to join.
+     * @return Fluent interface
+     */
+    public SelectionBuilder mapToTable(String column, String table) {
+        mProjectionMap.put(column, table + "." + column);
+        return this;
+    }
+
+    /**
+     * Create a new column based on custom criteria (such as aggregate functions).
+     *
+     * <p>This adds a new column to the result set, based upon custom criteria in SQL format. This
+     * is equivalent to the SQL statement: {@code SELECT toClause AS fromColumn}
+     *
+     * <p>This method is useful for executing SQL sub-queries.
+     *
+     * @param fromColumn Name of column for mapping
+     * @param toClause SQL string representing data to be mapped
+     * @return Fluent interface
+     */
+    public SelectionBuilder map(String fromColumn, String toClause) {
+        mProjectionMap.put(fromColumn, toClause + " AS " + fromColumn);
+        return this;
+    }
+
+    /**
+     * Return selection string based on current internal state.
+     *
+     * @return Current selection as a SQL statement
+     * @see #getSelectionArgs()
+     */
+    public String getSelection() {
+        return mSelection.toString();
+
+    }
+
+    /**
+     * Return selection arguments based on current internal state.
+     *
+     * @see #getSelection()
+     */
+    public String[] getSelectionArgs() {
+        return mSelectionArgs.toArray(new String[mSelectionArgs.size()]);
+    }
+
+    /**
+     * Process user-supplied projection (column list).
+     *
+     * <p>In cases where a column is mapped to another data source (either another table, or an
+     * SQL sub-query), the column name will be replaced with a more specific, SQL-compatible
+     * representation.
+     *
+     * Assumes that incoming columns are non-null.
+     *
+     * <p>See also: map(), mapToTable()
+     *
+     * @param columns User supplied projection (column list).
+     */
+    private void mapColumns(String[] columns) {
+        for (int i = 0; i < columns.length; i++) {
+            final String target = mProjectionMap.get(columns[i]);
+            if (target != null) {
+                columns[i] = target;
+            }
+        }
+    }
+
+    /**
+     * Return a description of this builder's state. Does NOT output SQL.
+     *
+     * @return Human-readable internal state
+     */
+    @Override
+    public String toString() {
+        return "SelectionBuilder[table=" + mTable + ", selection=" + getSelection()
+                + ", selectionArgs=" + Arrays.toString(getSelectionArgs()) + "]";
+    }
+
+    /**
+     * Execute query (SQL {@code SELECT}) against specified database.
+     *
+     * <p>Using a null projection (column list) is not supported.
+     *
+     * @param db Database to query.
+     * @param columns Database projection (column list) to return, must be non-NULL.
+     * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause (excluding the
+     *                ORDER BY itself). Passing null will use the default sort order, which may be
+     *                unordered.
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     *         {@link Cursor}s are not synchronized, see the documentation for more details.
+     */
+    public Cursor query(SQLiteDatabase db, String[] columns, String orderBy) {
+        return query(db, columns, null, null, orderBy, null);
+    }
+
+    /**
+     * Execute query ({@code SELECT}) against database.
+     *
+     * <p>Using a null projection (column list) is not supported.
+     *
+     * @param db Database to query.
+     * @param columns Database projection (column list) to return, must be non-null.
+     * @param groupBy A filter declaring how to group rows, formatted as an SQL GROUP BY clause
+     *                (excluding the GROUP BY itself). Passing null will cause the rows to not be
+     *                grouped.
+     * @param having A filter declare which row groups to include in the cursor, if row grouping is
+     *               being used, formatted as an SQL HAVING clause (excluding the HAVING itself).
+     *               Passing null will cause all row groups to be included, and is required when
+     *               row grouping is not being used.
+     * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause (excluding the
+     *                ORDER BY itself). Passing null will use the default sort order, which may be
+     *                unordered.
+     * @param limit Limits the number of rows returned by the query, formatted as LIMIT clause.
+     *              Passing null denotes no LIMIT clause.
+     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
+     *         {@link Cursor}s are not synchronized, see the documentation for more details.
+     */
+    public Cursor query(SQLiteDatabase db, String[] columns, String groupBy,
+                        String having, String orderBy, String limit) {
+        assertTable();
+        if (columns != null) mapColumns(columns);
+        Log.v(TAG, "query(columns=" + Arrays.toString(columns) + ") " + this);
+        return db.query(mTable, columns, getSelection(), getSelectionArgs(), groupBy, having,
+                orderBy, limit);
+    }
+
+    /**
+     * Execute an {@code UPDATE} against database.
+     *
+     * @param db Database to query.
+     * @param values A map from column names to new column values. null is a valid value that will
+     *               be translated to NULL
+     * @return The number of rows affected.
+     */
+    public int update(SQLiteDatabase db, ContentValues values) {
+        assertTable();
+        Log.v(TAG, "update() " + this);
+        return db.update(mTable, values, getSelection(), getSelectionArgs());
+    }
+
+    /**
+     * Execute {@code DELETE} against database.
+     *
+     * @param db Database to query.
+     * @return The number of rows affected.
+     */
+    public int delete(SQLiteDatabase db) {
+        assertTable();
+        Log.v(TAG, "delete() " + this);
+        return db.delete(mTable, getSelection(), getSelectionArgs());
+    }
+}
diff --git a/common/src/com/example/android/common/dummydata/Cheeses.java b/common/src/com/example/android/common/dummydata/Cheeses.java
deleted file mode 100644
index a386e68..0000000
--- a/common/src/com/example/android/common/dummydata/Cheeses.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright 2013 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.common.dummydata;
-
-import java.util.ArrayList;
-
-/**
- * Dummy data.
- */
-public class Cheeses {
-    static final String[] CHEESES = {
-            "Abbaye de Belloc", "Abbaye du Mont des Cats", "Abertam", "Abondance", "Ackawi",
-            "Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l Pitu", "Airag", "Airedale",
-            "Aisy Cendre", "Allgauer Emmentaler", "Alverca", "Ambert", "American Cheese",
-            "Ami du Chambertin", "Anejo Enchilado", "Anneau du Vic-Bilh", "Anthoriro", "Appenzell",
-            "Aragon", "Ardi Gasna", "Ardrahan", "Armenian String", "Aromes au Gene de Marc",
-            "Asadero", "Asiago", "Aubisque Pyrenees", "Autun", "Avaxtskyr", "Baby Swiss",
-            "Babybel", "Baguette Laonnaise", "Bakers", "Baladi", "Balaton", "Bandal", "Banon",
-            "Barry's Bay Cheddar", "Basing", "Basket Cheese", "Bath Cheese", "Bavarian Bergkase",
-            "Baylough", "Beaufort", "Beauvoorde", "Beenleigh Blue", "Beer Cheese", "Bel Paese",
-            "Bergader", "Bergere Bleue", "Berkswell", "Beyaz Peynir", "Bierkase", "Bishop Kennedy",
-            "Blarney", "Bleu d'Auvergne", "Bleu de Gex", "Bleu de Laqueuille",
-            "Bleu de Septmoncel", "Bleu Des Causses", "Blue", "Blue Castello", "Blue Rathgore",
-            "Blue Vein (Australian)", "Blue Vein Cheeses", "Bocconcini", "Bocconcini (Australian)",
-            "Boeren Leidenkaas", "Bonchester", "Bosworth", "Bougon", "Boule Du Roves",
-            "Boulette d'Avesnes", "Boursault", "Boursin", "Bouyssou", "Bra", "Braudostur",
-            "Breakfast Cheese", "Brebis du Lavort", "Brebis du Lochois", "Brebis du Puyfaucon",
-            "Bresse Bleu", "Brick", "Brie", "Brie de Meaux", "Brie de Melun", "Brillat-Savarin",
-            "Brin", "Brin d' Amour", "Brin d'Amour", "Brinza (Burduf Brinza)",
-            "Briquette de Brebis", "Briquette du Forez", "Broccio", "Broccio Demi-Affine",
-            "Brousse du Rove", "Bruder Basil", "Brusselae Kaas (Fromage de Bruxelles)", "Bryndza",
-            "Buchette d'Anjou", "Buffalo", "Burgos", "Butte", "Butterkase", "Button (Innes)",
-            "Buxton Blue", "Cabecou", "Caboc", "Cabrales", "Cachaille", "Caciocavallo", "Caciotta",
-            "Caerphilly", "Cairnsmore", "Calenzana", "Cambazola", "Camembert de Normandie",
-            "Canadian Cheddar", "Canestrato", "Cantal", "Caprice des Dieux", "Capricorn Goat",
-            "Capriole Banon", "Carre de l'Est", "Casciotta di Urbino", "Cashel Blue", "Castellano",
-            "Castelleno", "Castelmagno", "Castelo Branco", "Castigliano", "Cathelain",
-            "Celtic Promise", "Cendre d'Olivet", "Cerney", "Chabichou", "Chabichou du Poitou",
-            "Chabis de Gatine", "Chaource", "Charolais", "Chaumes", "Cheddar",
-            "Cheddar Clothbound", "Cheshire", "Chevres", "Chevrotin des Aravis", "Chontaleno",
-            "Civray", "Coeur de Camembert au Calvados", "Coeur de Chevre", "Colby", "Cold Pack",
-            "Comte", "Coolea", "Cooleney", "Coquetdale", "Corleggy", "Cornish Pepper",
-            "Cotherstone", "Cotija", "Cottage Cheese", "Cottage Cheese (Australian)",
-            "Cougar Gold", "Coulommiers", "Coverdale", "Crayeux de Roncq", "Cream Cheese",
-            "Cream Havarti", "Crema Agria", "Crema Mexicana", "Creme Fraiche", "Crescenza",
-            "Croghan", "Crottin de Chavignol", "Crottin du Chavignol", "Crowdie", "Crowley",
-            "Cuajada", "Curd", "Cure Nantais", "Curworthy", "Cwmtawe Pecorino",
-            "Cypress Grove Chevre", "Danablu (Danish Blue)", "Danbo", "Danish Fontina",
-            "Daralagjazsky", "Dauphin", "Delice des Fiouves", "Denhany Dorset Drum", "Derby",
-            "Dessertnyj Belyj", "Devon Blue", "Devon Garland", "Dolcelatte", "Doolin",
-            "Doppelrhamstufel", "Dorset Blue Vinney", "Double Gloucester", "Double Worcester",
-            "Dreux a la Feuille", "Dry Jack", "Duddleswell", "Dunbarra", "Dunlop", "Dunsyre Blue",
-            "Duroblando", "Durrus", "Dutch Mimolette (Commissiekaas)", "Edam", "Edelpilz",
-            "Emental Grand Cru", "Emlett", "Emmental", "Epoisses de Bourgogne", "Esbareich",
-            "Esrom", "Etorki", "Evansdale Farmhouse Brie", "Evora De L'Alentejo", "Exmoor Blue",
-            "Explorateur", "Feta", "Feta (Australian)", "Figue", "Filetta", "Fin-de-Siecle",
-            "Finlandia Swiss", "Finn", "Fiore Sardo", "Fleur du Maquis", "Flor de Guia",
-            "Flower Marie", "Folded", "Folded cheese with mint", "Fondant de Brebis",
-            "Fontainebleau", "Fontal", "Fontina Val d'Aosta", "Formaggio di capra", "Fougerus",
-            "Four Herb Gouda", "Fourme d' Ambert", "Fourme de Haute Loire", "Fourme de Montbrison",
-            "Fresh Jack", "Fresh Mozzarella", "Fresh Ricotta", "Fresh Truffles", "Fribourgeois",
-            "Friesekaas", "Friesian", "Friesla", "Frinault", "Fromage a Raclette", "Fromage Corse",
-            "Fromage de Montagne de Savoie", "Fromage Frais", "Fruit Cream Cheese",
-            "Frying Cheese", "Fynbo", "Gabriel", "Galette du Paludier", "Galette Lyonnaise",
-            "Galloway Goat's Milk Gems", "Gammelost", "Gaperon a l'Ail", "Garrotxa", "Gastanberra",
-            "Geitost", "Gippsland Blue", "Gjetost", "Gloucester", "Golden Cross", "Gorgonzola",
-            "Gornyaltajski", "Gospel Green", "Gouda", "Goutu", "Gowrie", "Grabetto", "Graddost",
-            "Grafton Village Cheddar", "Grana", "Grana Padano", "Grand Vatel",
-            "Grataron d' Areches", "Gratte-Paille", "Graviera", "Greuilh", "Greve",
-            "Gris de Lille", "Gruyere", "Gubbeen", "Guerbigny", "Halloumi",
-            "Halloumy (Australian)", "Haloumi-Style Cheese", "Harbourne Blue", "Havarti",
-            "Heidi Gruyere", "Hereford Hop", "Herrgardsost", "Herriot Farmhouse", "Herve",
-            "Hipi Iti", "Hubbardston Blue Cow", "Hushallsost", "Iberico", "Idaho Goatster",
-            "Idiazabal", "Il Boschetto al Tartufo", "Ile d'Yeu", "Isle of Mull", "Jarlsberg",
-            "Jermi Tortes", "Jibneh Arabieh", "Jindi Brie", "Jubilee Blue", "Juustoleipa",
-            "Kadchgall", "Kaseri", "Kashta", "Kefalotyri", "Kenafa", "Kernhem", "Kervella Affine",
-            "Kikorangi", "King Island Cape Wickham Brie", "King River Gold", "Klosterkaese",
-            "Knockalara", "Kugelkase", "L'Aveyronnais", "L'Ecir de l'Aubrac", "La Taupiniere",
-            "La Vache Qui Rit", "Laguiole", "Lairobell", "Lajta", "Lanark Blue", "Lancashire",
-            "Langres", "Lappi", "Laruns", "Lavistown", "Le Brin", "Le Fium Orbo", "Le Lacandou",
-            "Le Roule", "Leafield", "Lebbene", "Leerdammer", "Leicester", "Leyden", "Limburger",
-            "Lincolnshire Poacher", "Lingot Saint Bousquet d'Orb", "Liptauer", "Little Rydings",
-            "Livarot", "Llanboidy", "Llanglofan Farmhouse", "Loch Arthur Farmhouse",
-            "Loddiswell Avondale", "Longhorn", "Lou Palou", "Lou Pevre", "Lyonnais", "Maasdam",
-            "Macconais", "Mahoe Aged Gouda", "Mahon", "Malvern", "Mamirolle", "Manchego",
-            "Manouri", "Manur", "Marble Cheddar", "Marbled Cheeses", "Maredsous", "Margotin",
-            "Maribo", "Maroilles", "Mascares", "Mascarpone", "Mascarpone (Australian)",
-            "Mascarpone Torta", "Matocq", "Maytag Blue", "Meira", "Menallack Farmhouse",
-            "Menonita", "Meredith Blue", "Mesost", "Metton (Cancoillotte)", "Meyer Vintage Gouda",
-            "Mihalic Peynir", "Milleens", "Mimolette", "Mine-Gabhar", "Mini Baby Bells", "Mixte",
-            "Molbo", "Monastery Cheeses", "Mondseer", "Mont D'or Lyonnais", "Montasio",
-            "Monterey Jack", "Monterey Jack Dry", "Morbier", "Morbier Cru de Montagne",
-            "Mothais a la Feuille", "Mozzarella", "Mozzarella (Australian)",
-            "Mozzarella di Bufala", "Mozzarella Fresh, in water", "Mozzarella Rolls", "Munster",
-            "Murol", "Mycella", "Myzithra", "Naboulsi", "Nantais", "Neufchatel",
-            "Neufchatel (Australian)", "Niolo", "Nokkelost", "Northumberland", "Oaxaca",
-            "Olde York", "Olivet au Foin", "Olivet Bleu", "Olivet Cendre",
-            "Orkney Extra Mature Cheddar", "Orla", "Oschtjepka", "Ossau Fermier", "Ossau-Iraty",
-            "Oszczypek", "Oxford Blue", "P'tit Berrichon", "Palet de Babligny", "Paneer", "Panela",
-            "Pannerone", "Pant ys Gawn", "Parmesan (Parmigiano)", "Parmigiano Reggiano",
-            "Pas de l'Escalette", "Passendale", "Pasteurized Processed", "Pate de Fromage",
-            "Patefine Fort", "Pave d'Affinois", "Pave d'Auge", "Pave de Chirac", "Pave du Berry",
-            "Pecorino", "Pecorino in Walnut Leaves", "Pecorino Romano", "Peekskill Pyramid",
-            "Pelardon des Cevennes", "Pelardon des Corbieres", "Penamellera", "Penbryn",
-            "Pencarreg", "Perail de Brebis", "Petit Morin", "Petit Pardou", "Petit-Suisse",
-            "Picodon de Chevre", "Picos de Europa", "Piora", "Pithtviers au Foin",
-            "Plateau de Herve", "Plymouth Cheese", "Podhalanski", "Poivre d'Ane", "Polkolbin",
-            "Pont l'Eveque", "Port Nicholson", "Port-Salut", "Postel", "Pouligny-Saint-Pierre",
-            "Pourly", "Prastost", "Pressato", "Prince-Jean", "Processed Cheddar", "Provolone",
-            "Provolone (Australian)", "Pyengana Cheddar", "Pyramide", "Quark",
-            "Quark (Australian)", "Quartirolo Lombardo", "Quatre-Vents", "Quercy Petit",
-            "Queso Blanco", "Queso Blanco con Frutas --Pina y Mango", "Queso de Murcia",
-            "Queso del Montsec", "Queso del Tietar", "Queso Fresco", "Queso Fresco (Adobera)",
-            "Queso Iberico", "Queso Jalapeno", "Queso Majorero", "Queso Media Luna",
-            "Queso Para Frier", "Queso Quesadilla", "Rabacal", "Raclette", "Ragusano", "Raschera",
-            "Reblochon", "Red Leicester", "Regal de la Dombes", "Reggianito", "Remedou",
-            "Requeson", "Richelieu", "Ricotta", "Ricotta (Australian)", "Ricotta Salata", "Ridder",
-            "Rigotte", "Rocamadour", "Rollot", "Romano", "Romans Part Dieu", "Roncal", "Roquefort",
-            "Roule", "Rouleau De Beaulieu", "Royalp Tilsit", "Rubens", "Rustinu", "Saaland Pfarr",
-            "Saanenkaese", "Saga", "Sage Derby", "Sainte Maure", "Saint-Marcellin",
-            "Saint-Nectaire", "Saint-Paulin", "Salers", "Samso", "San Simon", "Sancerre",
-            "Sap Sago", "Sardo", "Sardo Egyptian", "Sbrinz", "Scamorza", "Schabzieger", "Schloss",
-            "Selles sur Cher", "Selva", "Serat", "Seriously Strong Cheddar", "Serra da Estrela",
-            "Sharpam", "Shelburne Cheddar", "Shropshire Blue", "Siraz", "Sirene", "Smoked Gouda",
-            "Somerset Brie", "Sonoma Jack", "Sottocenare al Tartufo", "Soumaintrain",
-            "Sourire Lozerien", "Spenwood", "Sraffordshire Organic", "St. Agur Blue Cheese",
-            "Stilton", "Stinking Bishop", "String", "Sussex Slipcote", "Sveciaost", "Swaledale",
-            "Sweet Style Swiss", "Swiss", "Syrian (Armenian String)", "Tala", "Taleggio", "Tamie",
-            "Tasmania Highland Chevre Log", "Taupiniere", "Teifi", "Telemea", "Testouri",
-            "Tete de Moine", "Tetilla", "Texas Goat Cheese", "Tibet", "Tillamook Cheddar",
-            "Tilsit", "Timboon Brie", "Toma", "Tomme Brulee", "Tomme d'Abondance",
-            "Tomme de Chevre", "Tomme de Romans", "Tomme de Savoie", "Tomme des Chouans", "Tommes",
-            "Torta del Casar", "Toscanello", "Touree de L'Aubier", "Tourmalet",
-            "Trappe (Veritable)", "Trois Cornes De Vendee", "Tronchon", "Trou du Cru", "Truffe",
-            "Tupi", "Turunmaa", "Tymsboro", "Tyn Grug", "Tyning", "Ubriaco", "Ulloa",
-            "Vacherin-Fribourgeois", "Valencay", "Vasterbottenost", "Venaco", "Vendomois",
-            "Vieux Corse", "Vignotte", "Vulscombe", "Waimata Farmhouse Blue",
-            "Washed Rind Cheese (Australian)", "Waterloo", "Weichkaese", "Wellington",
-            "Wensleydale", "White Stilton", "Whitestone Farmhouse", "Wigmore", "Woodside Cabecou",
-            "Xanadu", "Xynotyro", "Yarg Cornish", "Yarra Valley Pyramid", "Yorkshire Blue",
-            "Zamorano", "Zanetti Grana Padano", "Zanetti Parmigiano Reggiano"
-    };
-
-    public static ArrayList<String> asList() {
-        ArrayList<String> items = new ArrayList<String>();
-        for (int i = 0, z = CHEESES.length ; i < z ; i++) {
-            items.add(CHEESES[i]);
-        }
-        return items;
-    }
-}
\ No newline at end of file
diff --git a/common/src/java/com/example/android/common/media/CameraHelper.java b/common/src/com/example/android/common/media/CameraHelper.java
similarity index 100%
rename from common/src/java/com/example/android/common/media/CameraHelper.java
rename to common/src/com/example/android/common/media/CameraHelper.java
diff --git a/common/src/com/example/android/common/play/PlayHelper.java b/common/src/com/example/android/common/play/PlayHelper.java
new file mode 100644
index 0000000..c38c2bb
--- /dev/null
+++ b/common/src/com/example/android/common/play/PlayHelper.java
@@ -0,0 +1,102 @@
+package com.example.android.common.play;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.FragmentActivity;
+
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.GooglePlayServicesUtil;
+
+/**
+ * Helper class for Google Play Services functions.
+ * <ul>
+ *     <li>
+ *         Checks availability
+ *     </li>
+ *     <li>
+ *         Validates version for version bound features
+ *     </li>
+ * </ul>
+ */
+public class PlayHelper {
+
+    /**
+     * Checks for Google Play Services installation on the device. If found, validates the
+     * installed version against the requested version. If the service is installed but
+     * can't be used, the utility initiates a recovery with user intervention.
+     *
+     * @param context The context to be associated with the request. For compatibility with 1.6+,
+     *                subclass {@link FragmentActivity}.
+     * @param requestCode If we need to download Google Play Services, the download activity will be
+     *                    started using {@link Activity#startActivityForResult(Intent, int)}
+     * @param versionCode The minimum required version of the library.
+     * @return True, if successful.
+     */
+    public static boolean checkGooglePlayServiceAvailability(
+            FragmentActivity context, int requestCode, int versionCode) {
+
+        // Query for the status of Google Play services on the device
+        int statusCode = GooglePlayServicesUtil
+                .isGooglePlayServicesAvailable(context);
+
+        if ((statusCode == ConnectionResult.SUCCESS )
+                &&  (GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE >=  versionCode)) {
+            return true;
+        } else {
+            if (GooglePlayServicesUtil.isUserRecoverableError(statusCode)) {
+                Dialog eDialog = GooglePlayServicesUtil.getErrorDialog(statusCode,
+                        context, requestCode);
+                // If Google Play services can provide an error dialog
+                if (eDialog != null) {
+                    // Create a new DialogFragment for the error dialog
+                    ErrorDialogFragment errorFragment =
+                            new ErrorDialogFragment();
+                    // Set the dialog in the DialogFragment
+                    errorFragment.setDialog(eDialog);
+                    // Show the error dialog in the DialogFragment
+                    errorFragment.show(
+                            context.getSupportFragmentManager(),
+                            "Activity Recognition");
+                }
+            } else {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Checks for Google Play Services installation on the device. If the service is installed but
+     * can't be used, the utility initiates a recovery with user intervention.
+     *
+     * @param context The context to be associated with the request. For compatibility with 1.6+,
+     *                subclass {@link FragmentActivity}.
+     * @return True, if successful.
+     */
+    public static boolean checkGooglePlayServiceAvailability(FragmentActivity context,
+            int requestCode) {
+        return checkGooglePlayServiceAvailability(context, requestCode, -1);
+    }
+
+    // Define a DialogFragment that displays the error dialog
+    public static class ErrorDialogFragment extends DialogFragment {
+        // Global field to contain the error dialog
+        private Dialog mDialog;
+        // Default constructor. Sets the dialog field to null
+        public ErrorDialogFragment() {
+            super();
+            mDialog = null;
+        }
+        // Set the dialog to display
+        public void setDialog(Dialog dialog) {
+            mDialog = dialog;
+        }
+        // Return a Dialog to the DialogFragment.
+        @Override
+        public Dialog onCreateDialog(Bundle savedInstanceState) {
+            return mDialog;
+        }
+    }
+}
diff --git a/common/src/java/com/example/android/common/accounts/GenericAccountService.java b/common/src/java/com/example/android/common/accounts/GenericAccountService.java
deleted file mode 100644
index 0cd499a..0000000
--- a/common/src/java/com/example/android/common/accounts/GenericAccountService.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2013 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.common.accounts;
-
-import android.accounts.AbstractAccountAuthenticator;
-import android.accounts.Account;
-import android.accounts.AccountAuthenticatorResponse;
-import android.accounts.NetworkErrorException;
-import android.app.Service;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.util.Log;
-
-public class GenericAccountService extends Service {
-    private static final String TAG = "GenericAccountService";
-    public static final String ACCOUNT_NAME = "Account";
-    private Authenticator mAuthenticator;
-
-    /**
-     * Obtain a handle to the {@link android.accounts.Account} used for sync in this application.
-     *
-     * <p>It is important that the accountType specified here matches the value in your sync adapter
-     * configuration XML file for android.accounts.AccountAuthenticator (often saved in
-     * res/xml/syncadapter.xml). If this is not set correctly, you'll receive an error indicating
-     * that "caller uid XXXXX is different than the authenticator's uid".
-     *
-     * @param accountType AccountType defined in the configuration XML file for
-     *                    android.accounts.AccountAuthenticator (e.g. res/xml/syncadapter.xml).
-     * @return Handle to application's account (not guaranteed to resolve unless CreateSyncAccount()
-     *         has been called)
-     */
-    public static Account GetAccount(String accountType) {
-        // Note: Normally the account name is set to the user's identity (username or email
-        // address). However, since we aren't actually using any user accounts, it makes more sense
-        // to use a generic string in this case.
-        //
-        // This string should *not* be localized. If the user switches locale, we would not be
-        // able to locate the old account, and may erroneously register multiple accounts.
-        final String accountName = ACCOUNT_NAME;
-        return new Account(accountName, accountType);
-    }
-
-    @Override
-    public void onCreate() {
-        Log.i(TAG, "Service created");
-        mAuthenticator = new Authenticator(this);
-    }
-
-    @Override
-    public void onDestroy() {
-        Log.i(TAG, "Service destroyed");
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return mAuthenticator.getIBinder();
-    }
-
-    public class Authenticator extends AbstractAccountAuthenticator {
-        public Authenticator(Context context) {
-            super(context);
-        }
-
-        @Override
-        public Bundle editProperties(AccountAuthenticatorResponse accountAuthenticatorResponse,
-                                     String s) {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public Bundle addAccount(AccountAuthenticatorResponse accountAuthenticatorResponse,
-                                 String s, String s2, String[] strings, Bundle bundle)
-                throws NetworkErrorException {
-            return null;
-        }
-
-        @Override
-        public Bundle confirmCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse,
-                                         Account account, Bundle bundle)
-                throws NetworkErrorException {
-            return null;
-        }
-
-        @Override
-        public Bundle getAuthToken(AccountAuthenticatorResponse accountAuthenticatorResponse,
-                                   Account account, String s, Bundle bundle)
-                throws NetworkErrorException {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public String getAuthTokenLabel(String s) {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public Bundle updateCredentials(AccountAuthenticatorResponse accountAuthenticatorResponse,
-                                        Account account, String s, Bundle bundle)
-                throws NetworkErrorException {
-            throw new UnsupportedOperationException();
-        }
-
-        @Override
-        public Bundle hasFeatures(AccountAuthenticatorResponse accountAuthenticatorResponse,
-                                  Account account, String[] strings)
-                throws NetworkErrorException {
-            throw new UnsupportedOperationException();
-        }
-    }
-
-}
-
diff --git a/common/src/java/com/example/android/common/activities/SampleActivityBase.java b/common/src/java/com/example/android/common/activities/SampleActivityBase.java
deleted file mode 100644
index 3228927..0000000
--- a/common/src/java/com/example/android/common/activities/SampleActivityBase.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-* Copyright 2013 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.common.activities;
-
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-
-import com.example.android.common.logger.Log;
-import com.example.android.common.logger.LogWrapper;
-
-/**
- * Base launcher activity, to handle most of the common plumbing for samples.
- */
-public class SampleActivityBase extends FragmentActivity {
-
-    public static final String TAG = "SampleActivityBase";
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-    }
-
-    @Override
-    protected  void onStart() {
-        super.onStart();
-        initializeLogging();
-    }
-
-    /** Set up targets to receive log data */
-    public void initializeLogging() {
-        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
-        // Wraps Android's native log framework
-        LogWrapper logWrapper = new LogWrapper();
-        Log.setLogNode(logWrapper);
-
-        Log.i(TAG, "Ready");
-    }
-}
diff --git a/common/src/java/com/example/android/common/db/SelectionBuilder.java b/common/src/java/com/example/android/common/db/SelectionBuilder.java
deleted file mode 100644
index a1964c5..0000000
--- a/common/src/java/com/example/android/common/db/SelectionBuilder.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright 2013 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.
- */
-
-/*
- * Modifications:
- * -Imported from AOSP frameworks/base/core/java/com/android/internal/content
- * -Changed package name
- */
-
-package com.example.android.common.db;
-
-import android.content.ContentValues;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteDatabase;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Helper for building selection clauses for {@link SQLiteDatabase}.
- *
- * <p>This class provides a convenient frontend for working with SQL. Instead of composing statements
- * manually using string concatenation, method calls are used to construct the statement one
- * clause at a time. These methods can be chained together.
- *
- * <p>If multiple where() statements are provided, they're combined using {@code AND}.
- *
- * <p>Example:
- *
- * <pre>
- *     SelectionBuilder builder = new SelectionBuilder();
- *     Cursor c = builder.table(FeedContract.Entry.TABLE_NAME)       // String TABLE_NAME = "entry"
- *                       .where(FeedContract.Entry._ID + "=?", id);  // String _ID = "_ID"
- *                       .query(db, projection, sortOrder)
- *
- * </pre>
- *
- * <p>In this example, the table name and filters ({@code WHERE} clauses) are both explicitly
- * specified via method call. SelectionBuilder takes care of issuing a "query" command to the
- * database, and returns the resulting {@link Cursor} object.
- *
- * <p>Inner {@code JOIN}s can be accomplished using the mapToTable() function. The map() function
- * can be used to create new columns based on arbitrary (SQL-based) criteria. In advanced usage,
- * entire subqueries can be passed into the map() function.
- *
- * <p>Advanced example:
- *
- * <pre>
- *     // String SESSIONS_JOIN_BLOCKS_ROOMS = "sessions "
- *     //        + "LEFT OUTER JOIN blocks ON sessions.block_id=blocks.block_id "
- *     //        + "LEFT OUTER JOIN rooms ON sessions.room_id=rooms.room_id";
- *
- *     // String Subquery.BLOCK_NUM_STARRED_SESSIONS =
- *     //       "(SELECT COUNT(1) FROM "
- *     //        + Tables.SESSIONS + " WHERE " + Qualified.SESSIONS_BLOCK_ID + "="
- *     //        + Qualified.BLOCKS_BLOCK_ID + " AND " + Qualified.SESSIONS_STARRED + "=1)";
- *
- *     String Subqery.BLOCK_SESSIONS_COUNT =
- *     Cursor c = builder.table(Tables.SESSIONS_JOIN_BLOCKS_ROOMS)
- *               .map(Blocks.NUM_STARRED_SESSIONS, Subquery.BLOCK_NUM_STARRED_SESSIONS)
- *               .mapToTable(Sessions._ID, Tables.SESSIONS)
- *               .mapToTable(Sessions.SESSION_ID, Tables.SESSIONS)
- *               .mapToTable(Sessions.BLOCK_ID, Tables.SESSIONS)
- *               .mapToTable(Sessions.ROOM_ID, Tables.SESSIONS)
- *               .where(Qualified.SESSIONS_BLOCK_ID + "=?", blockId);
- * </pre>
- *
- * <p>In this example, we have two different types of {@code JOIN}s: a left outer join using a
- * modified table name (since this class doesn't directly support these), and an inner join using
- * the mapToTable() function. The map() function is used to insert a count based on specific
- * criteria, executed as a sub-query.
- *
- * This class is <em>not</em> thread safe.
- */
-public class SelectionBuilder {
-    private static final String TAG = "basicsyncadapter";
-
-    private String mTable = null;
-    private Map<String, String> mProjectionMap = new HashMap<String, String>();
-    private StringBuilder mSelection = new StringBuilder();
-    private ArrayList<String> mSelectionArgs = new ArrayList<String>();
-
-    /**
-     * Reset any internal state, allowing this builder to be recycled.
-     *
-     * <p>Calling this method is more efficient than creating a new SelectionBuilder object.
-     *
-     * @return Fluent interface
-     */
-    public SelectionBuilder reset() {
-        mTable = null;
-        mSelection.setLength(0);
-        mSelectionArgs.clear();
-        return this;
-    }
-
-    /**
-     * Append the given selection clause to the internal state. Each clause is
-     * surrounded with parenthesis and combined using {@code AND}.
-     *
-     * <p>In the most basic usage, simply provide a selection in SQL {@code WHERE} statement format.
-     *
-     * <p>Example:
-     *
-     * <pre>
-     *     .where("blog_posts.category = 'PROGRAMMING');
-     * </pre>
-     *
-     * <p>User input should never be directly supplied as as part of the selection statement.
-     * Instead, use positional parameters in your selection statement, then pass the user input
-     * in via the selectionArgs parameter. This prevents SQL escape characters in user input from
-     * causing unwanted side effects. (Failure to follow this convention may have security
-     * implications.)
-     *
-     * <p>Positional parameters are specified using the '?' character.
-     *
-     * <p>Example:
-     * <pre>
-     *     .where("blog_posts.title contains ?, userSearchString);
-     * </pre>
-     *
-     * @param selection SQL where statement
-     * @param selectionArgs Values to substitute for positional parameters ('?' characters in
-     *                      {@code selection} statement. Will be automatically escaped.
-     * @return Fluent interface
-     */
-    public SelectionBuilder where(String selection, String... selectionArgs) {
-        if (TextUtils.isEmpty(selection)) {
-            if (selectionArgs != null && selectionArgs.length > 0) {
-                throw new IllegalArgumentException(
-                        "Valid selection required when including arguments=");
-            }
-
-            // Shortcut when clause is empty
-            return this;
-        }
-
-        if (mSelection.length() > 0) {
-            mSelection.append(" AND ");
-        }
-
-        mSelection.append("(").append(selection).append(")");
-        if (selectionArgs != null) {
-            Collections.addAll(mSelectionArgs, selectionArgs);
-        }
-
-        return this;
-    }
-
-    /**
-     * Table name to use for SQL {@code FROM} statement.
-     *
-     * <p>This method may only be called once. If multiple tables are required, concatenate them
-     * in SQL-format (typically comma-separated).
-     *
-     * <p>If you need to do advanced {@code JOIN}s, they can also be specified here.
-     *
-     * See also: mapToTable()
-     *
-     * @param table Table name
-     * @return Fluent interface
-     */
-    public SelectionBuilder table(String table) {
-        mTable = table;
-        return this;
-    }
-
-    /**
-     * Verify that a table name has been supplied using table().
-     *
-     * @throws IllegalStateException if table not set
-     */
-    private void assertTable() {
-        if (mTable == null) {
-            throw new IllegalStateException("Table not specified");
-        }
-    }
-
-    /**
-     * Perform an inner join.
-     *
-     * <p>Map columns from a secondary table onto the current result set. References to the column
-     * specified in {@code column} will be replaced with {@code table.column} in the SQL {@code
-     * SELECT} clause.
-     *
-     * @param column Column name to join on. Must be the same in both tables.
-     * @param table Secondary table to join.
-     * @return Fluent interface
-     */
-    public SelectionBuilder mapToTable(String column, String table) {
-        mProjectionMap.put(column, table + "." + column);
-        return this;
-    }
-
-    /**
-     * Create a new column based on custom criteria (such as aggregate functions).
-     *
-     * <p>This adds a new column to the result set, based upon custom criteria in SQL format. This
-     * is equivalent to the SQL statement: {@code SELECT toClause AS fromColumn}
-     *
-     * <p>This method is useful for executing SQL sub-queries.
-     *
-     * @param fromColumn Name of column for mapping
-     * @param toClause SQL string representing data to be mapped
-     * @return Fluent interface
-     */
-    public SelectionBuilder map(String fromColumn, String toClause) {
-        mProjectionMap.put(fromColumn, toClause + " AS " + fromColumn);
-        return this;
-    }
-
-    /**
-     * Return selection string based on current internal state.
-     *
-     * @return Current selection as a SQL statement
-     * @see #getSelectionArgs()
-     */
-    public String getSelection() {
-        return mSelection.toString();
-
-    }
-
-    /**
-     * Return selection arguments based on current internal state.
-     *
-     * @see #getSelection()
-     */
-    public String[] getSelectionArgs() {
-        return mSelectionArgs.toArray(new String[mSelectionArgs.size()]);
-    }
-
-    /**
-     * Process user-supplied projection (column list).
-     *
-     * <p>In cases where a column is mapped to another data source (either another table, or an
-     * SQL sub-query), the column name will be replaced with a more specific, SQL-compatible
-     * representation.
-     *
-     * Assumes that incoming columns are non-null.
-     *
-     * <p>See also: map(), mapToTable()
-     *
-     * @param columns User supplied projection (column list).
-     */
-    private void mapColumns(String[] columns) {
-        for (int i = 0; i < columns.length; i++) {
-            final String target = mProjectionMap.get(columns[i]);
-            if (target != null) {
-                columns[i] = target;
-            }
-        }
-    }
-
-    /**
-     * Return a description of this builder's state. Does NOT output SQL.
-     *
-     * @return Human-readable internal state
-     */
-    @Override
-    public String toString() {
-        return "SelectionBuilder[table=" + mTable + ", selection=" + getSelection()
-                + ", selectionArgs=" + Arrays.toString(getSelectionArgs()) + "]";
-    }
-
-    /**
-     * Execute query (SQL {@code SELECT}) against specified database.
-     *
-     * <p>Using a null projection (column list) is not supported.
-     *
-     * @param db Database to query.
-     * @param columns Database projection (column list) to return, must be non-NULL.
-     * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause (excluding the
-     *                ORDER BY itself). Passing null will use the default sort order, which may be
-     *                unordered.
-     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
-     *         {@link Cursor}s are not synchronized, see the documentation for more details.
-     */
-    public Cursor query(SQLiteDatabase db, String[] columns, String orderBy) {
-        return query(db, columns, null, null, orderBy, null);
-    }
-
-    /**
-     * Execute query ({@code SELECT}) against database.
-     *
-     * <p>Using a null projection (column list) is not supported.
-     *
-     * @param db Database to query.
-     * @param columns Database projection (column list) to return, must be non-null.
-     * @param groupBy A filter declaring how to group rows, formatted as an SQL GROUP BY clause
-     *                (excluding the GROUP BY itself). Passing null will cause the rows to not be
-     *                grouped.
-     * @param having A filter declare which row groups to include in the cursor, if row grouping is
-     *               being used, formatted as an SQL HAVING clause (excluding the HAVING itself).
-     *               Passing null will cause all row groups to be included, and is required when
-     *               row grouping is not being used.
-     * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause (excluding the
-     *                ORDER BY itself). Passing null will use the default sort order, which may be
-     *                unordered.
-     * @param limit Limits the number of rows returned by the query, formatted as LIMIT clause.
-     *              Passing null denotes no LIMIT clause.
-     * @return A {@link Cursor} object, which is positioned before the first entry. Note that
-     *         {@link Cursor}s are not synchronized, see the documentation for more details.
-     */
-    public Cursor query(SQLiteDatabase db, String[] columns, String groupBy,
-                        String having, String orderBy, String limit) {
-        assertTable();
-        if (columns != null) mapColumns(columns);
-        Log.v(TAG, "query(columns=" + Arrays.toString(columns) + ") " + this);
-        return db.query(mTable, columns, getSelection(), getSelectionArgs(), groupBy, having,
-                orderBy, limit);
-    }
-
-    /**
-     * Execute an {@code UPDATE} against database.
-     *
-     * @param db Database to query.
-     * @param values A map from column names to new column values. null is a valid value that will
-     *               be translated to NULL
-     * @return The number of rows affected.
-     */
-    public int update(SQLiteDatabase db, ContentValues values) {
-        assertTable();
-        Log.v(TAG, "update() " + this);
-        return db.update(mTable, values, getSelection(), getSelectionArgs());
-    }
-
-    /**
-     * Execute {@code DELETE} against database.
-     *
-     * @param db Database to query.
-     * @return The number of rows affected.
-     */
-    public int delete(SQLiteDatabase db) {
-        assertTable();
-        Log.v(TAG, "delete() " + this);
-        return db.delete(mTable, getSelection(), getSelectionArgs());
-    }
-}
diff --git a/common/src/java/com/example/android/common/logger/LogFragment.java b/common/src/java/com/example/android/common/logger/LogFragment.java
deleted file mode 100644
index b302acd..0000000
--- a/common/src/java/com/example/android/common/logger/LogFragment.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-/*
- * Copyright 2013 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.common.logger;
-
-import android.graphics.Typeface;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ScrollView;
-
-/**
- * Simple fraggment which contains a LogView and uses is to output log data it receives
- * through the LogNode interface.
- */
-public class LogFragment extends Fragment {
-
-    private LogView mLogView;
-    private ScrollView mScrollView;
-
-    public LogFragment() {}
-
-    public View inflateViews() {
-        mScrollView = new ScrollView(getActivity());
-        ViewGroup.LayoutParams scrollParams = new ViewGroup.LayoutParams(
-                ViewGroup.LayoutParams.MATCH_PARENT,
-                ViewGroup.LayoutParams.MATCH_PARENT);
-        mScrollView.setLayoutParams(scrollParams);
-
-        mLogView = new LogView(getActivity());
-        ViewGroup.LayoutParams logParams = new ViewGroup.LayoutParams(scrollParams);
-        logParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
-        mLogView.setLayoutParams(logParams);
-        mLogView.setClickable(true);
-        mLogView.setFocusable(true);
-        mLogView.setTypeface(Typeface.MONOSPACE);
-
-        // Want to set padding as 16 dips, setPadding takes pixels.  Hooray math!
-        int paddingDips = 16;
-        double scale = getResources().getDisplayMetrics().density;
-        int paddingPixels = (int) ((paddingDips * (scale)) + .5);
-        mLogView.setPadding(paddingPixels, paddingPixels, paddingPixels, paddingPixels);
-        mLogView.setCompoundDrawablePadding(paddingPixels);
-
-        mLogView.setGravity(Gravity.BOTTOM);
-        mLogView.setTextAppearance(getActivity(), android.R.style.TextAppearance_Holo_Medium);
-
-        mScrollView.addView(mLogView);
-        return mScrollView;
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                             Bundle savedInstanceState) {
-
-        View result = inflateViews();
-
-        mLogView.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) {}
-
-            @Override
-            public void afterTextChanged(Editable s) {
-                mScrollView.fullScroll(ScrollView.FOCUS_DOWN);
-            }
-        });
-        return result;
-    }
-
-    public LogView getLogView() {
-        return mLogView;
-    }
-}
\ No newline at end of file
diff --git a/common/src/java/com/example/android/common/logger/LogView.java b/common/src/java/com/example/android/common/logger/LogView.java
deleted file mode 100644
index c01542b..0000000
--- a/common/src/java/com/example/android/common/logger/LogView.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright (C) 2013 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.common.logger;
-
-import android.app.Activity;
-import android.content.Context;
-import android.util.*;
-import android.widget.TextView;
-
-/** Simple TextView which is used to output log data received through the LogNode interface.
-*/
-public class LogView extends TextView implements LogNode {
-
-    public LogView(Context context) {
-        super(context);
-    }
-
-    public LogView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public LogView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    /**
-     * Formats the log data and prints it out to the LogView.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-
-        
-        String priorityStr = null;
-
-        // For the purposes of this View, we want to print the priority as readable text.
-        switch(priority) {
-            case android.util.Log.VERBOSE:
-                priorityStr = "VERBOSE";
-                break;
-            case android.util.Log.DEBUG:
-                priorityStr = "DEBUG";
-                break;
-            case android.util.Log.INFO:
-                priorityStr = "INFO";
-                break;
-            case android.util.Log.WARN:
-                priorityStr = "WARN";
-                break;
-            case android.util.Log.ERROR:
-                priorityStr = "ERROR";
-                break;
-            case android.util.Log.ASSERT:
-                priorityStr = "ASSERT";
-                break;
-            default:
-                break;
-        }
-
-        // Handily, the Log class has a facility for converting a stack trace into a usable string.
-        String exceptionStr = null;
-        if (tr != null) {
-            exceptionStr = android.util.Log.getStackTraceString(tr);
-        }
-
-        // Take the priority, tag, message, and exception, and concatenate as necessary
-        // into one usable line of text.
-        final StringBuilder outputBuilder = new StringBuilder();
-
-        String delimiter = "\t";
-        appendIfNotNull(outputBuilder, priorityStr, delimiter);
-        appendIfNotNull(outputBuilder, tag, delimiter);
-        appendIfNotNull(outputBuilder, msg, delimiter);
-        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
-
-        // In case this was originally called from an AsyncTask or some other off-UI thread,
-        // make sure the update occurs within the UI thread.
-        ((Activity) getContext()).runOnUiThread( (new Thread(new Runnable() {
-            @Override
-            public void run() {
-                // Display the text we just generated within the LogView.
-                appendToLog(outputBuilder.toString());
-            }
-        })));
-
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
-     * the logger takes so many arguments that might be null, this method helps cut out some of the
-     * agonizing tedium of writing the same 3 lines over and over.
-     * @param source StringBuilder containing the text to append to.
-     * @param addStr The String to append
-     * @param delimiter The String to separate the source and appended strings. A tab or comma,
-     *                  for instance.
-     * @return The fully concatenated String as a StringBuilder
-     */
-    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
-        if (addStr != null) {
-            if (addStr.length() == 0) {
-                delimiter = "";
-            }
-
-            return source.append(addStr).append(delimiter);
-        }
-        return source;
-    }
-
-    // The next LogNode in the chain.
-    LogNode mNext;
-
-    /** Outputs the string as a new line of log data in the LogView. */
-    public void appendToLog(String s) {
-        append("\n" + s);
-    }
-
-
-}
diff --git a/common/src/java/com/example/android/common/media/MediaCodecWrapper.java b/common/src/java/com/example/android/common/media/MediaCodecWrapper.java
deleted file mode 100644
index a511221..0000000
--- a/common/src/java/com/example/android/common/media/MediaCodecWrapper.java
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- * Copyright (C) 2013 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.common.media;
-
-import android.media.*;
-import android.os.Handler;
-import android.os.Looper;
-import android.view.Surface;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayDeque;
-import java.util.Queue;
-
-/**
- * Simplifies the MediaCodec interface by wrapping around the buffer processing operations.
- */
-public class MediaCodecWrapper {
-
-    // Handler to use for {@code OutputSampleListener} and {code OutputFormatChangedListener}
-    // callbacks
-    private Handler mHandler;
-
-
-    // Callback when media output format changes.
-    public interface OutputFormatChangedListener {
-        void outputFormatChanged(MediaCodecWrapper sender, MediaFormat newFormat);
-    }
-
-    private OutputFormatChangedListener mOutputFormatChangedListener = null;
-
-    /**
-     * Callback for decodes frames. Observers can register a listener for optional stream
-     * of decoded data
-     */
-    public interface OutputSampleListener {
-        void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer);
-    }
-
-    /**
-     * The {@link MediaCodec} that is managed by this class.
-     */
-    private MediaCodec mDecoder;
-
-    // References to the internal buffers managed by the codec. The codec
-    // refers to these buffers by index, never by reference so it's up to us
-    // to keep track of which buffer is which.
-    private ByteBuffer[] mInputBuffers;
-    private ByteBuffer[] mOutputBuffers;
-
-    // Indices of the input buffers that are currently available for writing. We'll
-    // consume these in the order they were dequeued from the codec.
-    private Queue<Integer> mAvailableInputBuffers;
-
-    // Indices of the output buffers that currently hold valid data, in the order
-    // they were produced by the codec.
-    private Queue<Integer> mAvailableOutputBuffers;
-
-    // Information about each output buffer, by index. Each entry in this array
-    // is valid if and only if its index is currently contained in mAvailableOutputBuffers.
-    private MediaCodec.BufferInfo[] mOutputBufferInfo;
-
-    // An (optional) stream that will receive decoded data.
-    private OutputSampleListener mOutputSampleListener;
-
-    private MediaCodecWrapper(MediaCodec codec) {
-        mDecoder = codec;
-        codec.start();
-        mInputBuffers = codec.getInputBuffers();
-        mOutputBuffers = codec.getOutputBuffers();
-        mOutputBufferInfo = new MediaCodec.BufferInfo[mOutputBuffers.length];
-        mAvailableInputBuffers = new ArrayDeque<Integer>(mOutputBuffers.length);
-        mAvailableOutputBuffers = new ArrayDeque<Integer>(mInputBuffers.length);
-    }
-
-    /**
-     * Releases resources and ends the encoding/decoding session.
-     */
-    public void stopAndRelease() {
-        mDecoder.stop();
-        mDecoder.release();
-        mDecoder = null;
-        mHandler = null;
-    }
-
-    /**
-     * Getter for the registered {@link OutputFormatChangedListener}
-     */
-    public OutputFormatChangedListener getOutputFormatChangedListener() {
-        return mOutputFormatChangedListener;
-    }
-
-    /**
-     *
-     * @param outputFormatChangedListener the listener for callback.
-     * @param handler message handler for posting the callback.
-     */
-    public void setOutputFormatChangedListener(final OutputFormatChangedListener
-            outputFormatChangedListener, Handler handler) {
-        mOutputFormatChangedListener = outputFormatChangedListener;
-
-        // Making sure we don't block ourselves due to a bad implementation of the callback by
-        // using a handler provided by client.
-        Looper looper;
-        mHandler = handler;
-        if (outputFormatChangedListener != null && mHandler == null) {
-            if ((looper = Looper.myLooper()) != null) {
-                mHandler = new Handler();
-            } else {
-                throw new IllegalArgumentException(
-                        "Looper doesn't exist in the calling thread");
-            }
-        }
-    }
-
-    /**
-     * Constructs the {@link MediaCodecWrapper} wrapper object around the video codec.
-     * The codec is created using the encapsulated information in the
-     * {@link MediaFormat} object.
-     *
-     * @param trackFormat The format of the media object to be decoded.
-     * @param surface Surface to render the decoded frames.
-     * @return
-     */
-    public static MediaCodecWrapper fromVideoFormat(final MediaFormat trackFormat,
-            Surface surface) {
-        MediaCodecWrapper result = null;
-        MediaCodec videoCodec = null;
-
-        // BEGIN_INCLUDE(create_codec)
-        final String mimeType = trackFormat.getString(MediaFormat.KEY_MIME);
-
-        // Check to see if this is actually a video mime type. If it is, then create
-        // a codec that can decode this mime type.
-        if (mimeType.contains("video/")) {
-            videoCodec = MediaCodec.createDecoderByType(mimeType);
-            videoCodec.configure(trackFormat, surface, null,  0);
-
-        }
-
-        // If codec creation was successful, then create a wrapper object around the
-        // newly created codec.
-        if (videoCodec != null) {
-            result = new MediaCodecWrapper(videoCodec);
-        }
-        // END_INCLUDE(create_codec)
-
-        return result;
-    }
-
-
-    /**
-     * Write a media sample to the decoder.
-     *
-     * A "sample" here refers to a single atomic access unit in the media stream. The definition
-     * of "access unit" is dependent on the type of encoding used, but it typically refers to
-     * a single frame of video or a few seconds of audio. {@link android.media.MediaExtractor}
-     * extracts data from a stream one sample at a time.
-     *
-     * @param input A ByteBuffer containing the input data for one sample. The buffer must be set
-     * up for reading, with its position set to the beginning of the sample data and its limit
-     * set to the end of the sample data.
-     *
-     * @param presentationTimeUs  The time, relative to the beginning of the media stream,
-     * at which this buffer should be rendered.
-     *
-     * @param flags Flags to pass to the decoder. See {@link MediaCodec#queueInputBuffer(int,
-     * int, int, long, int)}
-     *
-     * @throws MediaCodec.CryptoException
-     */
-    public boolean writeSample(final ByteBuffer input,
-            final MediaCodec.CryptoInfo crypto,
-            final long presentationTimeUs,
-            final int flags) throws MediaCodec.CryptoException, WriteException {
-        boolean result = false;
-        int size = input.remaining();
-
-        // check if we have dequed input buffers available from the codec
-        if (size > 0 &&  !mAvailableInputBuffers.isEmpty()) {
-            int index = mAvailableInputBuffers.remove();
-            ByteBuffer buffer = mInputBuffers[index];
-
-            // we can't write our sample to a lesser capacity input buffer.
-            if (size > buffer.capacity()) {
-                throw new MediaCodecWrapper.WriteException(String.format(
-                        "Insufficient capacity in MediaCodec buffer: "
-                            + "tried to write %d, buffer capacity is %d.",
-                        input.remaining(),
-                        buffer.capacity()));
-            }
-
-            buffer.clear();
-            buffer.put(input);
-
-            // Submit the buffer to the codec for decoding. The presentationTimeUs
-            // indicates the position (play time) for the current sample.
-            if (crypto == null) {
-                mDecoder.queueInputBuffer(index, 0, size, presentationTimeUs, flags);
-            } else {
-                mDecoder.queueSecureInputBuffer(index, 0, crypto, presentationTimeUs, flags);
-            }
-            result = true;
-        }
-        return result;
-    }
-
-    static MediaCodec.CryptoInfo cryptoInfo= new MediaCodec.CryptoInfo();
-
-    /**
-     * Write a media sample to the decoder.
-     *
-     * A "sample" here refers to a single atomic access unit in the media stream. The definition
-     * of "access unit" is dependent on the type of encoding used, but it typically refers to
-     * a single frame of video or a few seconds of audio. {@link android.media.MediaExtractor}
-     * extracts data from a stream one sample at a time.
-     *
-     * @param extractor  Instance of {@link android.media.MediaExtractor} wrapping the media.
-     *
-     * @param presentationTimeUs The time, relative to the beginning of the media stream,
-     * at which this buffer should be rendered.
-     *
-     * @param flags  Flags to pass to the decoder. See {@link MediaCodec#queueInputBuffer(int,
-     * int, int, long, int)}
-     *
-     * @throws MediaCodec.CryptoException
-     */
-    public boolean writeSample(final MediaExtractor extractor,
-            final boolean isSecure,
-            final long presentationTimeUs,
-            int flags) {
-        boolean result = false;
-        boolean isEos = false;
-
-        if (!mAvailableInputBuffers.isEmpty()) {
-            int index = mAvailableInputBuffers.remove();
-            ByteBuffer buffer = mInputBuffers[index];
-
-            // reads the sample from the file using extractor into the buffer
-            int size = extractor.readSampleData(buffer, 0);
-            if (size <= 0) {
-                flags |= MediaCodec.BUFFER_FLAG_END_OF_STREAM;
-            }
-
-            // Submit the buffer to the codec for decoding. The presentationTimeUs
-            // indicates the position (play time) for the current sample.
-            if (!isSecure) {
-                mDecoder.queueInputBuffer(index, 0, size, presentationTimeUs, flags);
-            } else {
-                extractor.getSampleCryptoInfo(cryptoInfo);
-                mDecoder.queueSecureInputBuffer(index, 0, cryptoInfo, presentationTimeUs, flags);
-            }
-
-            result = true;
-        }
-        return result;
-    }
-
-    /**
-     * Performs a peek() operation in the queue to extract media info for the buffer ready to be
-     * released i.e. the head element of the queue.
-     *
-     * @param out_bufferInfo An output var to hold the buffer info.
-     *
-     * @return True, if the peek was successful.
-     */
-    public boolean peekSample(MediaCodec.BufferInfo out_bufferInfo) {
-        // dequeue available buffers and synchronize our data structures with the codec.
-        update();
-        boolean result = false;
-        if (!mAvailableOutputBuffers.isEmpty()) {
-            int index = mAvailableOutputBuffers.peek();
-            MediaCodec.BufferInfo info = mOutputBufferInfo[index];
-            // metadata of the sample
-            out_bufferInfo.set(
-                    info.offset,
-                    info.size,
-                    info.presentationTimeUs,
-                    info.flags);
-            result = true;
-        }
-        return result;
-    }
-
-    /**
-     * Processes, releases and optionally renders the output buffer available at the head of the
-     * queue. All observers are notified with a callback. See {@link
-     * OutputSampleListener#outputSample(MediaCodecWrapper, android.media.MediaCodec.BufferInfo,
-     * java.nio.ByteBuffer)}
-     *
-     * @param render True, if the buffer is to be rendered on the {@link Surface} configured
-     *
-     */
-    public void popSample(boolean render) {
-        // dequeue available buffers and synchronize our data structures with the codec.
-        update();
-        if (!mAvailableOutputBuffers.isEmpty()) {
-            int index = mAvailableOutputBuffers.remove();
-
-            if (render && mOutputSampleListener != null) {
-                ByteBuffer buffer = mOutputBuffers[index];
-                MediaCodec.BufferInfo info = mOutputBufferInfo[index];
-                mOutputSampleListener.outputSample(this, info, buffer);
-            }
-
-            // releases the buffer back to the codec
-            mDecoder.releaseOutputBuffer(index, render);
-        }
-    }
-
-    /**
-     * Synchronize this object's state with the internal state of the wrapped
-     * MediaCodec.
-     */
-    private void update() {
-        // BEGIN_INCLUDE(update_codec_state)
-        int index;
-
-        // Get valid input buffers from the codec to fill later in the same order they were
-        // made available by the codec.
-        while ((index = mDecoder.dequeueInputBuffer(0)) != MediaCodec.INFO_TRY_AGAIN_LATER) {
-            mAvailableInputBuffers.add(index);
-        }
-
-
-        // Likewise with output buffers. If the output buffers have changed, start using the
-        // new set of output buffers. If the output format has changed, notify listeners.
-        MediaCodec.BufferInfo info = new MediaCodec.BufferInfo();
-        while ((index = mDecoder.dequeueOutputBuffer(info, 0)) !=  MediaCodec.INFO_TRY_AGAIN_LATER) {
-            switch (index) {
-                case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED:
-                    mOutputBuffers = mDecoder.getOutputBuffers();
-                    mOutputBufferInfo = new MediaCodec.BufferInfo[mOutputBuffers.length];
-                    mAvailableOutputBuffers.clear();
-                    break;
-                case MediaCodec.INFO_OUTPUT_FORMAT_CHANGED:
-                    if (mOutputFormatChangedListener != null) {
-                        mHandler.post(new Runnable() {
-                            @Override
-                            public void run() {
-                                mOutputFormatChangedListener
-                                        .outputFormatChanged(MediaCodecWrapper.this,
-                                                mDecoder.getOutputFormat());
-
-                            }
-                        });
-                    }
-                    break;
-                default:
-                    // Making sure the index is valid before adding to output buffers. We've already
-                    // handled INFO_TRY_AGAIN_LATER, INFO_OUTPUT_FORMAT_CHANGED &
-                    // INFO_OUTPUT_BUFFERS_CHANGED i.e all the other possible return codes but
-                    // asserting index value anyways for future-proofing the code.
-                    if(index >= 0) {
-                        mOutputBufferInfo[index] = info;
-                        mAvailableOutputBuffers.add(index);
-                    } else {
-                        throw new IllegalStateException("Unknown status from dequeueOutputBuffer");
-                    }
-                    break;
-            }
-
-        }
-        // END_INCLUDE(update_codec_state)
-
-    }
-
-    private class WriteException extends Throwable {
-        private WriteException(final String detailMessage) {
-            super(detailMessage);
-        }
-    }
-}
diff --git a/common/src/java/com/example/android/common/play/GoogleServicesConnectionFailedHelper.java b/common/src/java/com/example/android/common/play/GoogleServicesConnectionFailedHelper.java
deleted file mode 100644
index 0a80d88..0000000
--- a/common/src/java/com/example/android/common/play/GoogleServicesConnectionFailedHelper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/**
- * Copyright 2013 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.common.play;
-
-import android.app.Dialog;
-import android.content.IntentSender;
-import android.support.v4.app.FragmentActivity;
-
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GooglePlayServicesClient;
-
-/**
- * Helper to handle errors from Google Play Services connections.
- *
- */
-public class GoogleServicesConnectionFailedHelper implements
-        GooglePlayServicesClient.OnConnectionFailedListener {
-
-    FragmentActivity mActivity;
-    int mRequestCode = -1;
-
-    public GoogleServicesConnectionFailedHelper(FragmentActivity mActivity, int requestCode) {
-        this.mActivity = mActivity;
-        mRequestCode = requestCode;
-    }
-
-    @Override
-    public void onConnectionFailed(ConnectionResult connectionResult) {
-
-        /*
-         * Google Play services can resolve some errors it detects.
-         * If the error has a resolution, try sending an Intent to
-         * start a Google Play services activity that can resolve
-         * error.
-         */
-        if (connectionResult.hasResolution()) {
-            try {
-                // Start an Activity that tries to resolve the error
-                connectionResult.startResolutionForResult(mActivity, mRequestCode);
-                /*
-                 * Thrown if Google Play services canceled the original
-                 * PendingIntent
-                 */
-            } catch (IntentSender.SendIntentException e) {
-                // Log the error
-                e.printStackTrace();
-            }
-        } else {
-            /*
-             * If no resolution is available, display a dialog to the
-             * user with the error.
-             */
-            PlayHelper.ErrorDialogFragment fragment = new PlayHelper.ErrorDialogFragment();
-            fragment.setDialog(new Dialog(mActivity));
-            fragment.show(mActivity.getSupportFragmentManager(), null);
-
-        }
-    }
-}
-
diff --git a/common/src/java/com/example/android/common/play/PlayHelper.java b/common/src/java/com/example/android/common/play/PlayHelper.java
deleted file mode 100644
index 95b8554..0000000
--- a/common/src/java/com/example/android/common/play/PlayHelper.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright 2013 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.common.play;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.os.Bundle;
-import android.support.v4.app.DialogFragment;
-import android.support.v4.app.FragmentActivity;
-
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GooglePlayServicesUtil;
-
-/**
- * Helper class for Google Play Services functions.
- * <ul>
- *     <li>
- *         Checks availability
- *     </li>
- *     <li>
- *         Validates version for version bound features
- *     </li>
- * </ul>
- */
-public class PlayHelper {
-
-    /**
-     * Checks for Google Play Services installation on the device. If found, validates the
-     * installed version against the requested version. If the service is installed but
-     * can't be used, the utility initiates a recovery with user intervention.
-     *
-     * @param context The context to be associated with the request. For compatibility with 1.6+,
-     *                subclass {@link FragmentActivity}.
-     * @param requestCode If we need to download Google Play Services, the download activity will be
-     *                    started using {@link Activity#startActivityForResult(Intent, int)}
-     * @param versionCode The minimum required version of the library.
-     * @return True, if successful.
-     */
-    public static boolean checkGooglePlayServiceAvailability(
-            FragmentActivity context, int requestCode, int versionCode) {
-
-        // Query for the status of Google Play services on the device
-        int statusCode = GooglePlayServicesUtil
-                .isGooglePlayServicesAvailable(context);
-
-        if ((statusCode == ConnectionResult.SUCCESS )
-                &&  (GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE >=  versionCode)) {
-            return true;
-        } else {
-            if (GooglePlayServicesUtil.isUserRecoverableError(statusCode)) {
-                Dialog eDialog = GooglePlayServicesUtil.getErrorDialog(statusCode,
-                        context, requestCode);
-                // If Google Play services can provide an error dialog
-                if (eDialog != null) {
-                    // Create a new DialogFragment for the error dialog
-                    ErrorDialogFragment errorFragment =
-                            new ErrorDialogFragment();
-                    // Set the dialog in the DialogFragment
-                    errorFragment.setDialog(eDialog);
-                    // Show the error dialog in the DialogFragment
-                    errorFragment.show(
-                            context.getSupportFragmentManager(),
-                            "Activity Recognition");
-                }
-            } else {
-                return false;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks for Google Play Services installation on the device. If the service is installed but
-     * can't be used, the utility initiates a recovery with user intervention.
-     *
-     * @param context The context to be associated with the request. For compatibility with 1.6+,
-     *                subclass {@link FragmentActivity}.
-     * @return True, if successful.
-     */
-    public static boolean checkGooglePlayServiceAvailability(FragmentActivity context,
-            int requestCode) {
-        return checkGooglePlayServiceAvailability(context, requestCode, -1);
-    }
-
-    // Define a DialogFragment that displays the error dialog
-    public static class ErrorDialogFragment extends DialogFragment {
-        // Global field to contain the error dialog
-        private Dialog mDialog;
-        // Default constructor. Sets the dialog field to null
-        public ErrorDialogFragment() {
-            super();
-            mDialog = null;
-        }
-        // Set the dialog to display
-        public void setDialog(Dialog dialog) {
-            mDialog = dialog;
-        }
-        // Return a Dialog to the DialogFragment.
-        @Override
-        public Dialog onCreateDialog(Bundle savedInstanceState) {
-            return mDialog;
-        }
-    }
-
-}
diff --git a/common/src/java/com/example/android/common/util/Pools.java b/common/src/java/com/example/android/common/util/Pools.java
deleted file mode 100644
index 1b7edb0..0000000
--- a/common/src/java/com/example/android/common/util/Pools.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (C) 2009 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.common.util;
-
-/**
- * Helper class for creating pools of objects. Creating new objects is an
- * expensive operation, which can lead to significant performance overhead if
- * new objects of the same type are allocated and destroyed during run time.
- * These performance issues can be mitigated by reusing unused objects and
- * reinitializing them, rather than destroying and removing them from memory.
- * <p>
- * The object pool pattern provided by the {@link Pool} interface facilitates
- * the reuse of objects by keeping unused ('released') objects in memory and
- * making them available for use. This can provide a significant performance
- * improvement, as objects are only created once and returned to the Pool when
- * no longer required, rather than destroyed and reallocated. Object
- * {@link Pools} keep track of these unused objects. An object pool provides two
- * basic methods for access:
- * <ul>
- * <li><b>{@link Pool#acquire()}:</b> Returns an used object if one is
- * available.</li>
- * <li><b> {@link Pool#release(Object)}:</b> Adds the given object to the pool,
- * ready to be reallocated in acquire().</li>
- * </ul>
- * <p>
- * This class contains the interface defining a {@link Pool}, an implementation
- * based on a fixed length array ({@link SimplePool}) and a synchronized pool
- * for use with concurrency ({@link SynchronizedPool}).
- * <p>
- * A {@link SimplePool} can be used like this:
- *
- * <pre>
- * public class MyPooledClass {
- *
- *     private static final SynchronizedPool<MyPooledClass> sPool =
- *             new SynchronizedPool<MyPooledClass>(10);
- *
- *     public static MyPooledClass obtain() {
- *         MyPooledClass instance = sPool.acquire();
- *         return (instance != null) ? instance : new MyPooledClass();
- *     }
- *
- *     public void recycle() {
- *          // Clear state if needed.
- *          sPool.release(this);
- *     }
- *
- *     . . .
- * }
- * </pre>
- */
-public final class Pools {
-
-    /**
-     * Interface for managing a pool of objects.
-     *
-     * @param T The pooled type.
-     */
-    public static interface Pool<T> {
-
-        /**
-         * Retrieves an object from the pool. Returns null if the pool is empty
-         * and no object is available.
-         *
-         * @return An instance from the pool if available, null otherwise.
-         */
-        public T acquire();
-
-        /**
-         * Releases an instance to the pool. This marks the object as reusable
-         * and makes it available through a call to {@link #acquire()}. An
-         * object should not be modified or accessed once it has been released.
-         *
-         * @param instance The instance to release.
-         * @return True if the instance was put in the pool.
-         * @throws IllegalStateException If the instance is already in the pool.
-         */
-        public boolean release(T instance);
-    }
-
-    private Pools() {
-        /* do nothing - hiding constructor */
-    }
-
-    /**
-     * Simple (non-synchronized) pool of objects. This class provides a simple,
-     * fixed sized pool of objects.
-     *
-     * @param T The pooled type.
-     */
-    public static class SimplePool<T> implements Pool<T> {
-        private final Object[] mPool;
-
-        private int mPoolSize;
-
-        /**
-         * Creates a new instance. The parameter defines the maximum number of
-         * objects that can be held in this pool.
-         *
-         * @param maxPoolSize The max pool size.
-         * @throws IllegalArgumentException If the max pool size is less than
-         *             zero.
-         */
-        public SimplePool(int maxPoolSize) {
-            if (maxPoolSize <= 0) {
-                throw new IllegalArgumentException("The max pool size must be > 0");
-            }
-            mPool = new Object[maxPoolSize];
-        }
-
-        /**
-         * Returns an object from the pool or null if the pool is empty.
-         *
-         * @return An object from the pool or null if no object is available.
-         */
-        @Override
-        @SuppressWarnings("unchecked")
-        public T acquire() {
-            if (mPoolSize > 0) {
-                final int lastPooledIndex = mPoolSize - 1;
-                T instance = (T) mPool[lastPooledIndex];
-                mPool[lastPooledIndex] = null;
-                mPoolSize--;
-                return instance;
-            }
-            return null;
-        }
-
-        /**
-         * Adds an object to the pool. If the pool is already full (its
-         * allocated size has been exceeded), the object is not added and false
-         * is returned. A linear check is performed to ensure that the object is
-         * not already held in the pool.
-         *
-         * @param instance The element to release.
-         * @return True if the object was added to the pool.
-         * @throws IllegalStateException If the object already exists in the
-         *             pool.
-         */
-        @Override
-        public boolean release(T instance) {
-            if (isInPool(instance)) {
-                throw new IllegalStateException("Already in the pool!");
-            }
-            if (mPoolSize < mPool.length) {
-                mPool[mPoolSize] = instance;
-                mPoolSize++;
-                return true;
-            }
-            return false;
-        }
-
-        /**
-         * Checks if the object already exists in the pool.
-         * @param instance The element to look for.
-         * @return True if the object exists in the pool.
-         */
-        private boolean isInPool(T instance) {
-            for (int i = 0; i < mPoolSize; i++) {
-                if (mPool[i] == instance) {
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Synchronized pool of objects. Based on the implementation of a fixed size
-     * pool in {@link SimplePool}, this class provides synchronized concurrent
-     * access to the pool.
-     *
-     * @param T The pooled type.
-     */
-    public static class SynchronizedPool<T> extends SimplePool<T> {
-        private final Object mLock = new Object();
-
-        /**
-         * Creates a new instance.
-         *
-         * @param maxPoolSize The max pool size.
-         * @throws IllegalArgumentException If the max pool size is less than
-         *             zero.
-         */
-        public SynchronizedPool(int maxPoolSize) {
-            super(maxPoolSize);
-        }
-
-        /**
-         * Returns an object from the pool or null if the pool is empty.
-         * <p>
-         * Access to the pool is synchronized.
-         *
-         * @return An object from the pool or null if no object is available.
-         */
-        @Override
-        public T acquire() {
-            synchronized (mLock) {
-                return super.acquire();
-            }
-        }
-
-        /**
-         * Adds an object to the pool. If the pool is already full (its
-         * allocated size has been exceeded), the object is not added and false
-         * is returned. A linear check is performed to ensure that the object is
-         * not already held in the pool.
-         * <p>
-         * Access to the pool is synchronized.
-         *
-         * @param element The element to be released
-         * @return True if the object was added to the pool.
-         * @throws IllegalStateException If the object already exists in the
-         *             pool.
-         */
-        @Override
-        public boolean release(T element) {
-            synchronized (mLock) {
-                return super.release(element);
-            }
-        }
-    }
-}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/build.gradle b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/build.gradle
new file mode 100644
index 0000000..945e1f5
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/AndroidManifest.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..019d258
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/AndroidManifest.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2013 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.example.bluetooth.le"
+          android:versionCode="1"
+          android:versionName="1.0">
+    <uses-sdk android:minSdkVersion="18"
+              android:targetSdkVersion="18"/>
+    <!-- Declare this required feature if you want to make the app available to BLE-capable
+    devices only.  If you want to make your app available to devices that don't support BLE,
+    you should omit this in the manifest.  Instead, determine BLE capability by using
+    PackageManager.hasSystemFeature(FEATURE_BLUETOOTH_LE) -->
+    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
+
+    <uses-permission android:name="android.permission.BLUETOOTH"/>
+    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
+
+    <application android:label="@string/app_name"
+                 android:icon="@drawable/ic_launcher"
+                 android:theme="@android:style/Theme.Holo.Light">
+        <activity android:name=".DeviceScanActivity"
+                  android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+        <activity android:name=".DeviceControlActivity"/>
+        <service android:name=".BluetoothLeService" android:enabled="true"/>
+    </application>
+</manifest>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/BluetoothLeService.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/BluetoothLeService.java
new file mode 100644
index 0000000..9e7aabd
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/BluetoothLeService.java
@@ -0,0 +1,319 @@
+/*
+ * Copyright (C) 2013 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.bluetooth.le;
+
+import android.app.Service;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothGatt;
+import android.bluetooth.BluetoothGattCallback;
+import android.bluetooth.BluetoothGattCharacteristic;
+import android.bluetooth.BluetoothGattDescriptor;
+import android.bluetooth.BluetoothGattService;
+import android.bluetooth.BluetoothManager;
+import android.bluetooth.BluetoothProfile;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+import android.util.Log;
+
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * Service for managing connection and data communication with a GATT server hosted on a
+ * given Bluetooth LE device.
+ */
+public class BluetoothLeService extends Service {
+    private final static String TAG = BluetoothLeService.class.getSimpleName();
+
+    private BluetoothManager mBluetoothManager;
+    private BluetoothAdapter mBluetoothAdapter;
+    private String mBluetoothDeviceAddress;
+    private BluetoothGatt mBluetoothGatt;
+    private int mConnectionState = STATE_DISCONNECTED;
+
+    private static final int STATE_DISCONNECTED = 0;
+    private static final int STATE_CONNECTING = 1;
+    private static final int STATE_CONNECTED = 2;
+
+    public final static String ACTION_GATT_CONNECTED =
+            "com.example.bluetooth.le.ACTION_GATT_CONNECTED";
+    public final static String ACTION_GATT_DISCONNECTED =
+            "com.example.bluetooth.le.ACTION_GATT_DISCONNECTED";
+    public final static String ACTION_GATT_SERVICES_DISCOVERED =
+            "com.example.bluetooth.le.ACTION_GATT_SERVICES_DISCOVERED";
+    public final static String ACTION_DATA_AVAILABLE =
+            "com.example.bluetooth.le.ACTION_DATA_AVAILABLE";
+    public final static String EXTRA_DATA =
+            "com.example.bluetooth.le.EXTRA_DATA";
+
+    public final static UUID UUID_HEART_RATE_MEASUREMENT =
+            UUID.fromString(SampleGattAttributes.HEART_RATE_MEASUREMENT);
+
+    // Implements callback methods for GATT events that the app cares about.  For example,
+    // connection change and services discovered.
+    private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() {
+        @Override
+        public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
+            String intentAction;
+            if (newState == BluetoothProfile.STATE_CONNECTED) {
+                intentAction = ACTION_GATT_CONNECTED;
+                mConnectionState = STATE_CONNECTED;
+                broadcastUpdate(intentAction);
+                Log.i(TAG, "Connected to GATT server.");
+                // Attempts to discover services after successful connection.
+                Log.i(TAG, "Attempting to start service discovery:" +
+                        mBluetoothGatt.discoverServices());
+
+            } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
+                intentAction = ACTION_GATT_DISCONNECTED;
+                mConnectionState = STATE_DISCONNECTED;
+                Log.i(TAG, "Disconnected from GATT server.");
+                broadcastUpdate(intentAction);
+            }
+        }
+
+        @Override
+        public void onServicesDiscovered(BluetoothGatt gatt, int status) {
+            if (status == BluetoothGatt.GATT_SUCCESS) {
+                broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED);
+            } else {
+                Log.w(TAG, "onServicesDiscovered received: " + status);
+            }
+        }
+
+        @Override
+        public void onCharacteristicRead(BluetoothGatt gatt,
+                                         BluetoothGattCharacteristic characteristic,
+                                         int status) {
+            if (status == BluetoothGatt.GATT_SUCCESS) {
+                broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
+            }
+        }
+
+        @Override
+        public void onCharacteristicChanged(BluetoothGatt gatt,
+                                            BluetoothGattCharacteristic characteristic) {
+            broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
+        }
+    };
+
+    private void broadcastUpdate(final String action) {
+        final Intent intent = new Intent(action);
+        sendBroadcast(intent);
+    }
+
+    private void broadcastUpdate(final String action,
+                                 final BluetoothGattCharacteristic characteristic) {
+        final Intent intent = new Intent(action);
+
+        // This is special handling for the Heart Rate Measurement profile.  Data parsing is
+        // carried out as per profile specifications:
+        // http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.heart_rate_measurement.xml
+        if (UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())) {
+            int flag = characteristic.getProperties();
+            int format = -1;
+            if ((flag & 0x01) != 0) {
+                format = BluetoothGattCharacteristic.FORMAT_UINT16;
+                Log.d(TAG, "Heart rate format UINT16.");
+            } else {
+                format = BluetoothGattCharacteristic.FORMAT_UINT8;
+                Log.d(TAG, "Heart rate format UINT8.");
+            }
+            final int heartRate = characteristic.getIntValue(format, 1);
+            Log.d(TAG, String.format("Received heart rate: %d", heartRate));
+            intent.putExtra(EXTRA_DATA, String.valueOf(heartRate));
+        } else {
+            // For all other profiles, writes the data formatted in HEX.
+            final byte[] data = characteristic.getValue();
+            if (data != null && data.length > 0) {
+                final StringBuilder stringBuilder = new StringBuilder(data.length);
+                for(byte byteChar : data)
+                    stringBuilder.append(String.format("%02X ", byteChar));
+                intent.putExtra(EXTRA_DATA, new String(data) + "\n" + stringBuilder.toString());
+            }
+        }
+        sendBroadcast(intent);
+    }
+
+    public class LocalBinder extends Binder {
+        BluetoothLeService getService() {
+            return BluetoothLeService.this;
+        }
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return mBinder;
+    }
+
+    @Override
+    public boolean onUnbind(Intent intent) {
+        // After using a given device, you should make sure that BluetoothGatt.close() is called
+        // such that resources are cleaned up properly.  In this particular example, close() is
+        // invoked when the UI is disconnected from the Service.
+        close();
+        return super.onUnbind(intent);
+    }
+
+    private final IBinder mBinder = new LocalBinder();
+
+    /**
+     * Initializes a reference to the local Bluetooth adapter.
+     *
+     * @return Return true if the initialization is successful.
+     */
+    public boolean initialize() {
+        // For API level 18 and above, get a reference to BluetoothAdapter through
+        // BluetoothManager.
+        if (mBluetoothManager == null) {
+            mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
+            if (mBluetoothManager == null) {
+                Log.e(TAG, "Unable to initialize BluetoothManager.");
+                return false;
+            }
+        }
+
+        mBluetoothAdapter = mBluetoothManager.getAdapter();
+        if (mBluetoothAdapter == null) {
+            Log.e(TAG, "Unable to obtain a BluetoothAdapter.");
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Connects to the GATT server hosted on the Bluetooth LE device.
+     *
+     * @param address The device address of the destination device.
+     *
+     * @return Return true if the connection is initiated successfully. The connection result
+     *         is reported asynchronously through the
+     *         {@code BluetoothGattCallback#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)}
+     *         callback.
+     */
+    public boolean connect(final String address) {
+        if (mBluetoothAdapter == null || address == null) {
+            Log.w(TAG, "BluetoothAdapter not initialized or unspecified address.");
+            return false;
+        }
+
+        // Previously connected device.  Try to reconnect.
+        if (mBluetoothDeviceAddress != null && address.equals(mBluetoothDeviceAddress)
+                && mBluetoothGatt != null) {
+            Log.d(TAG, "Trying to use an existing mBluetoothGatt for connection.");
+            if (mBluetoothGatt.connect()) {
+                mConnectionState = STATE_CONNECTING;
+                return true;
+            } else {
+                return false;
+            }
+        }
+
+        final BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
+        if (device == null) {
+            Log.w(TAG, "Device not found.  Unable to connect.");
+            return false;
+        }
+        // We want to directly connect to the device, so we are setting the autoConnect
+        // parameter to false.
+        mBluetoothGatt = device.connectGatt(this, false, mGattCallback);
+        Log.d(TAG, "Trying to create a new connection.");
+        mBluetoothDeviceAddress = address;
+        mConnectionState = STATE_CONNECTING;
+        return true;
+    }
+
+    /**
+     * Disconnects an existing connection or cancel a pending connection. The disconnection result
+     * is reported asynchronously through the
+     * {@code BluetoothGattCallback#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)}
+     * callback.
+     */
+    public void disconnect() {
+        if (mBluetoothAdapter == null || mBluetoothGatt == null) {
+            Log.w(TAG, "BluetoothAdapter not initialized");
+            return;
+        }
+        mBluetoothGatt.disconnect();
+    }
+
+    /**
+     * After using a given BLE device, the app must call this method to ensure resources are
+     * released properly.
+     */
+    public void close() {
+        if (mBluetoothGatt == null) {
+            return;
+        }
+        mBluetoothGatt.close();
+        mBluetoothGatt = null;
+    }
+
+    /**
+     * Request a read on a given {@code BluetoothGattCharacteristic}. The read result is reported
+     * asynchronously through the {@code BluetoothGattCallback#onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int)}
+     * callback.
+     *
+     * @param characteristic The characteristic to read from.
+     */
+    public void readCharacteristic(BluetoothGattCharacteristic characteristic) {
+        if (mBluetoothAdapter == null || mBluetoothGatt == null) {
+            Log.w(TAG, "BluetoothAdapter not initialized");
+            return;
+        }
+        mBluetoothGatt.readCharacteristic(characteristic);
+    }
+
+    /**
+     * Enables or disables notification on a give characteristic.
+     *
+     * @param characteristic Characteristic to act on.
+     * @param enabled If true, enable notification.  False otherwise.
+     */
+    public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic,
+                                              boolean enabled) {
+        if (mBluetoothAdapter == null || mBluetoothGatt == null) {
+            Log.w(TAG, "BluetoothAdapter not initialized");
+            return;
+        }
+        mBluetoothGatt.setCharacteristicNotification(characteristic, enabled);
+
+        // This is specific to Heart Rate Measurement.
+        if (UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())) {
+            BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
+                    UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
+            descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
+            mBluetoothGatt.writeDescriptor(descriptor);
+        }
+    }
+
+    /**
+     * Retrieves a list of supported GATT services on the connected device. This should be
+     * invoked only after {@code BluetoothGatt#discoverServices()} completes successfully.
+     *
+     * @return A {@code List} of supported services.
+     */
+    public List<BluetoothGattService> getSupportedGattServices() {
+        if (mBluetoothGatt == null) return null;
+
+        return mBluetoothGatt.getServices();
+    }
+}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceControlActivity.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceControlActivity.java
new file mode 100644
index 0000000..06b3bb4
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceControlActivity.java
@@ -0,0 +1,309 @@
+/*
+ * Copyright (C) 2013 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.bluetooth.le;
+
+import android.app.Activity;
+import android.bluetooth.BluetoothGattCharacteristic;
+import android.bluetooth.BluetoothGattService;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.ServiceConnection;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ExpandableListView;
+import android.widget.SimpleExpandableListAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * For a given BLE device, this Activity provides the user interface to connect, display data,
+ * and display GATT services and characteristics supported by the device.  The Activity
+ * communicates with {@code BluetoothLeService}, which in turn interacts with the
+ * Bluetooth LE API.
+ */
+public class DeviceControlActivity extends Activity {
+    private final static String TAG = DeviceControlActivity.class.getSimpleName();
+
+    public static final String EXTRAS_DEVICE_NAME = "DEVICE_NAME";
+    public static final String EXTRAS_DEVICE_ADDRESS = "DEVICE_ADDRESS";
+
+    private TextView mConnectionState;
+    private TextView mDataField;
+    private String mDeviceName;
+    private String mDeviceAddress;
+    private ExpandableListView mGattServicesList;
+    private BluetoothLeService mBluetoothLeService;
+    private ArrayList<ArrayList<BluetoothGattCharacteristic>> mGattCharacteristics =
+            new ArrayList<ArrayList<BluetoothGattCharacteristic>>();
+    private boolean mConnected = false;
+    private BluetoothGattCharacteristic mNotifyCharacteristic;
+
+    private final String LIST_NAME = "NAME";
+    private final String LIST_UUID = "UUID";
+
+    // Code to manage Service lifecycle.
+    private final ServiceConnection mServiceConnection = new ServiceConnection() {
+
+        @Override
+        public void onServiceConnected(ComponentName componentName, IBinder service) {
+            mBluetoothLeService = ((BluetoothLeService.LocalBinder) service).getService();
+            if (!mBluetoothLeService.initialize()) {
+                Log.e(TAG, "Unable to initialize Bluetooth");
+                finish();
+            }
+            // Automatically connects to the device upon successful start-up initialization.
+            mBluetoothLeService.connect(mDeviceAddress);
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName componentName) {
+            mBluetoothLeService = null;
+        }
+    };
+
+    // Handles various events fired by the Service.
+    // ACTION_GATT_CONNECTED: connected to a GATT server.
+    // ACTION_GATT_DISCONNECTED: disconnected from a GATT server.
+    // ACTION_GATT_SERVICES_DISCOVERED: discovered GATT services.
+    // ACTION_DATA_AVAILABLE: received data from the device.  This can be a result of read
+    //                        or notification operations.
+    private final BroadcastReceiver mGattUpdateReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            final String action = intent.getAction();
+            if (BluetoothLeService.ACTION_GATT_CONNECTED.equals(action)) {
+                mConnected = true;
+                updateConnectionState(R.string.connected);
+                invalidateOptionsMenu();
+            } else if (BluetoothLeService.ACTION_GATT_DISCONNECTED.equals(action)) {
+                mConnected = false;
+                updateConnectionState(R.string.disconnected);
+                invalidateOptionsMenu();
+                clearUI();
+            } else if (BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED.equals(action)) {
+                // Show all the supported services and characteristics on the user interface.
+                displayGattServices(mBluetoothLeService.getSupportedGattServices());
+            } else if (BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action)) {
+                displayData(intent.getStringExtra(BluetoothLeService.EXTRA_DATA));
+            }
+        }
+    };
+
+    // If a given GATT characteristic is selected, check for supported features.  This sample
+    // demonstrates 'Read' and 'Notify' features.  See
+    // http://d.android.com/reference/android/bluetooth/BluetoothGatt.html for the complete
+    // list of supported characteristic features.
+    private final ExpandableListView.OnChildClickListener servicesListClickListner =
+            new ExpandableListView.OnChildClickListener() {
+                @Override
+                public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
+                                            int childPosition, long id) {
+                    if (mGattCharacteristics != null) {
+                        final BluetoothGattCharacteristic characteristic =
+                                mGattCharacteristics.get(groupPosition).get(childPosition);
+                        final int charaProp = characteristic.getProperties();
+                        if ((charaProp | BluetoothGattCharacteristic.PROPERTY_READ) > 0) {
+                            // If there is an active notification on a characteristic, clear
+                            // it first so it doesn't update the data field on the user interface.
+                            if (mNotifyCharacteristic != null) {
+                                mBluetoothLeService.setCharacteristicNotification(
+                                        mNotifyCharacteristic, false);
+                                mNotifyCharacteristic = null;
+                            }
+                            mBluetoothLeService.readCharacteristic(characteristic);
+                        }
+                        if ((charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) {
+                            mNotifyCharacteristic = characteristic;
+                            mBluetoothLeService.setCharacteristicNotification(
+                                    characteristic, true);
+                        }
+                        return true;
+                    }
+                    return false;
+                }
+    };
+
+    private void clearUI() {
+        mGattServicesList.setAdapter((SimpleExpandableListAdapter) null);
+        mDataField.setText(R.string.no_data);
+    }
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.gatt_services_characteristics);
+
+        final Intent intent = getIntent();
+        mDeviceName = intent.getStringExtra(EXTRAS_DEVICE_NAME);
+        mDeviceAddress = intent.getStringExtra(EXTRAS_DEVICE_ADDRESS);
+
+        // Sets up UI references.
+        ((TextView) findViewById(R.id.device_address)).setText(mDeviceAddress);
+        mGattServicesList = (ExpandableListView) findViewById(R.id.gatt_services_list);
+        mGattServicesList.setOnChildClickListener(servicesListClickListner);
+        mConnectionState = (TextView) findViewById(R.id.connection_state);
+        mDataField = (TextView) findViewById(R.id.data_value);
+
+        getActionBar().setTitle(mDeviceName);
+        getActionBar().setDisplayHomeAsUpEnabled(true);
+        Intent gattServiceIntent = new Intent(this, BluetoothLeService.class);
+        bindService(gattServiceIntent, mServiceConnection, BIND_AUTO_CREATE);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        registerReceiver(mGattUpdateReceiver, makeGattUpdateIntentFilter());
+        if (mBluetoothLeService != null) {
+            final boolean result = mBluetoothLeService.connect(mDeviceAddress);
+            Log.d(TAG, "Connect request result=" + result);
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        unregisterReceiver(mGattUpdateReceiver);
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        unbindService(mServiceConnection);
+        mBluetoothLeService = null;
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.gatt_services, menu);
+        if (mConnected) {
+            menu.findItem(R.id.menu_connect).setVisible(false);
+            menu.findItem(R.id.menu_disconnect).setVisible(true);
+        } else {
+            menu.findItem(R.id.menu_connect).setVisible(true);
+            menu.findItem(R.id.menu_disconnect).setVisible(false);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch(item.getItemId()) {
+            case R.id.menu_connect:
+                mBluetoothLeService.connect(mDeviceAddress);
+                return true;
+            case R.id.menu_disconnect:
+                mBluetoothLeService.disconnect();
+                return true;
+            case android.R.id.home:
+                onBackPressed();
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    private void updateConnectionState(final int resourceId) {
+        runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                mConnectionState.setText(resourceId);
+            }
+        });
+    }
+
+    private void displayData(String data) {
+        if (data != null) {
+            mDataField.setText(data);
+        }
+    }
+
+    // Demonstrates how to iterate through the supported GATT Services/Characteristics.
+    // In this sample, we populate the data structure that is bound to the ExpandableListView
+    // on the UI.
+    private void displayGattServices(List<BluetoothGattService> gattServices) {
+        if (gattServices == null) return;
+        String uuid = null;
+        String unknownServiceString = getResources().getString(R.string.unknown_service);
+        String unknownCharaString = getResources().getString(R.string.unknown_characteristic);
+        ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>();
+        ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData
+                = new ArrayList<ArrayList<HashMap<String, String>>>();
+        mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>();
+
+        // Loops through available GATT Services.
+        for (BluetoothGattService gattService : gattServices) {
+            HashMap<String, String> currentServiceData = new HashMap<String, String>();
+            uuid = gattService.getUuid().toString();
+            currentServiceData.put(
+                    LIST_NAME, SampleGattAttributes.lookup(uuid, unknownServiceString));
+            currentServiceData.put(LIST_UUID, uuid);
+            gattServiceData.add(currentServiceData);
+
+            ArrayList<HashMap<String, String>> gattCharacteristicGroupData =
+                    new ArrayList<HashMap<String, String>>();
+            List<BluetoothGattCharacteristic> gattCharacteristics =
+                    gattService.getCharacteristics();
+            ArrayList<BluetoothGattCharacteristic> charas =
+                    new ArrayList<BluetoothGattCharacteristic>();
+
+            // Loops through available Characteristics.
+            for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {
+                charas.add(gattCharacteristic);
+                HashMap<String, String> currentCharaData = new HashMap<String, String>();
+                uuid = gattCharacteristic.getUuid().toString();
+                currentCharaData.put(
+                        LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString));
+                currentCharaData.put(LIST_UUID, uuid);
+                gattCharacteristicGroupData.add(currentCharaData);
+            }
+            mGattCharacteristics.add(charas);
+            gattCharacteristicData.add(gattCharacteristicGroupData);
+        }
+
+        SimpleExpandableListAdapter gattServiceAdapter = new SimpleExpandableListAdapter(
+                this,
+                gattServiceData,
+                android.R.layout.simple_expandable_list_item_2,
+                new String[] {LIST_NAME, LIST_UUID},
+                new int[] { android.R.id.text1, android.R.id.text2 },
+                gattCharacteristicData,
+                android.R.layout.simple_expandable_list_item_2,
+                new String[] {LIST_NAME, LIST_UUID},
+                new int[] { android.R.id.text1, android.R.id.text2 }
+        );
+        mGattServicesList.setAdapter(gattServiceAdapter);
+    }
+
+    private static IntentFilter makeGattUpdateIntentFilter() {
+        final IntentFilter intentFilter = new IntentFilter();
+        intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED);
+        intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED);
+        intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED);
+        intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE);
+        return intentFilter;
+    }
+}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceScanActivity.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceScanActivity.java
new file mode 100644
index 0000000..1cc954d
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceScanActivity.java
@@ -0,0 +1,269 @@
+/*
+ * Copyright (C) 2013 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.bluetooth.le;
+
+import android.app.Activity;
+import android.app.ListActivity;
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.os.Bundle;
+import android.os.Handler;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.util.ArrayList;
+import java.util.UUID;
+
+/**
+ * Activity for scanning and displaying available Bluetooth LE devices.
+ */
+public class DeviceScanActivity extends ListActivity {
+    private LeDeviceListAdapter mLeDeviceListAdapter;
+    private BluetoothAdapter mBluetoothAdapter;
+    private boolean mScanning;
+    private Handler mHandler;
+
+    private static final int REQUEST_ENABLE_BT = 1;
+    // Stops scanning after 10 seconds.
+    private static final long SCAN_PERIOD = 10000;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        getActionBar().setTitle(R.string.title_devices);
+        mHandler = new Handler();
+
+        // Use this check to determine whether BLE is supported on the device.  Then you can
+        // selectively disable BLE-related features.
+        if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
+            Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();
+            finish();
+        }
+
+        // Initializes a Bluetooth adapter.  For API level 18 and above, get a reference to
+        // BluetoothAdapter through BluetoothManager.
+        final BluetoothManager bluetoothManager =
+                (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
+        mBluetoothAdapter = bluetoothManager.getAdapter();
+
+        // Checks if Bluetooth is supported on the device.
+        if (mBluetoothAdapter == null) {
+            Toast.makeText(this, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();
+            finish();
+            return;
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        if (!mScanning) {
+            menu.findItem(R.id.menu_stop).setVisible(false);
+            menu.findItem(R.id.menu_scan).setVisible(true);
+            menu.findItem(R.id.menu_refresh).setActionView(null);
+        } else {
+            menu.findItem(R.id.menu_stop).setVisible(true);
+            menu.findItem(R.id.menu_scan).setVisible(false);
+            menu.findItem(R.id.menu_refresh).setActionView(
+                    R.layout.actionbar_indeterminate_progress);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_scan:
+                mLeDeviceListAdapter.clear();
+                scanLeDevice(true);
+                break;
+            case R.id.menu_stop:
+                scanLeDevice(false);
+                break;
+        }
+        return true;
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        // Ensures Bluetooth is enabled on the device.  If Bluetooth is not currently enabled,
+        // fire an intent to display a dialog asking the user to grant permission to enable it.
+        if (!mBluetoothAdapter.isEnabled()) {
+            if (!mBluetoothAdapter.isEnabled()) {
+                Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
+                startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
+            }
+        }
+
+        // Initializes list view adapter.
+        mLeDeviceListAdapter = new LeDeviceListAdapter();
+        setListAdapter(mLeDeviceListAdapter);
+        scanLeDevice(true);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        // User chose not to enable Bluetooth.
+        if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {
+            finish();
+            return;
+        }
+        super.onActivityResult(requestCode, resultCode, data);
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        scanLeDevice(false);
+        mLeDeviceListAdapter.clear();
+    }
+
+    @Override
+    protected void onListItemClick(ListView l, View v, int position, long id) {
+        final BluetoothDevice device = mLeDeviceListAdapter.getDevice(position);
+        if (device == null) return;
+        final Intent intent = new Intent(this, DeviceControlActivity.class);
+        intent.putExtra(DeviceControlActivity.EXTRAS_DEVICE_NAME, device.getName());
+        intent.putExtra(DeviceControlActivity.EXTRAS_DEVICE_ADDRESS, device.getAddress());
+        if (mScanning) {
+            mBluetoothAdapter.stopLeScan(mLeScanCallback);
+            mScanning = false;
+        }
+        startActivity(intent);
+    }
+
+    private void scanLeDevice(final boolean enable) {
+        if (enable) {
+            // Stops scanning after a pre-defined scan period.
+            mHandler.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    mScanning = false;
+                    mBluetoothAdapter.stopLeScan(mLeScanCallback);
+                    invalidateOptionsMenu();
+                }
+            }, SCAN_PERIOD);
+
+            mScanning = true;
+            mBluetoothAdapter.startLeScan(mLeScanCallback);
+        } else {
+            mScanning = false;
+            mBluetoothAdapter.stopLeScan(mLeScanCallback);
+        }
+        invalidateOptionsMenu();
+    }
+
+    // Adapter for holding devices found through scanning.
+    private class LeDeviceListAdapter extends BaseAdapter {
+        private ArrayList<BluetoothDevice> mLeDevices;
+        private LayoutInflater mInflator;
+
+        public LeDeviceListAdapter() {
+            super();
+            mLeDevices = new ArrayList<BluetoothDevice>();
+            mInflator = DeviceScanActivity.this.getLayoutInflater();
+        }
+
+        public void addDevice(BluetoothDevice device) {
+            if(!mLeDevices.contains(device)) {
+                mLeDevices.add(device);
+            }
+        }
+
+        public BluetoothDevice getDevice(int position) {
+            return mLeDevices.get(position);
+        }
+
+        public void clear() {
+            mLeDevices.clear();
+        }
+
+        @Override
+        public int getCount() {
+            return mLeDevices.size();
+        }
+
+        @Override
+        public Object getItem(int i) {
+            return mLeDevices.get(i);
+        }
+
+        @Override
+        public long getItemId(int i) {
+            return i;
+        }
+
+        @Override
+        public View getView(int i, View view, ViewGroup viewGroup) {
+            ViewHolder viewHolder;
+            // General ListView optimization code.
+            if (view == null) {
+                view = mInflator.inflate(R.layout.listitem_device, null);
+                viewHolder = new ViewHolder();
+                viewHolder.deviceAddress = (TextView) view.findViewById(R.id.device_address);
+                viewHolder.deviceName = (TextView) view.findViewById(R.id.device_name);
+                view.setTag(viewHolder);
+            } else {
+                viewHolder = (ViewHolder) view.getTag();
+            }
+
+            BluetoothDevice device = mLeDevices.get(i);
+            final String deviceName = device.getName();
+            if (deviceName != null && deviceName.length() > 0)
+                viewHolder.deviceName.setText(deviceName);
+            else
+                viewHolder.deviceName.setText(R.string.unknown_device);
+            viewHolder.deviceAddress.setText(device.getAddress());
+
+            return view;
+        }
+    }
+
+    // Device scan callback.
+    private BluetoothAdapter.LeScanCallback mLeScanCallback =
+            new BluetoothAdapter.LeScanCallback() {
+
+        @Override
+        public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) {
+            runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    mLeDeviceListAdapter.addDevice(device);
+                    mLeDeviceListAdapter.notifyDataSetChanged();
+                }
+            });
+        }
+    };
+
+    static class ViewHolder {
+        TextView deviceName;
+        TextView deviceAddress;
+    }
+}
\ No newline at end of file
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/SampleGattAttributes.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/SampleGattAttributes.java
new file mode 100644
index 0000000..255653e
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/SampleGattAttributes.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2013 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.bluetooth.le;
+
+import java.util.HashMap;
+
+/**
+ * This class includes a small subset of standard GATT attributes for demonstration purposes.
+ */
+public class SampleGattAttributes {
+    private static HashMap<String, String> attributes = new HashMap();
+    public static String HEART_RATE_MEASUREMENT = "00002a37-0000-1000-8000-00805f9b34fb";
+    public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
+
+    static {
+        // Sample Services.
+        attributes.put("0000180d-0000-1000-8000-00805f9b34fb", "Heart Rate Service");
+        attributes.put("0000180a-0000-1000-8000-00805f9b34fb", "Device Information Service");
+        // Sample Characteristics.
+        attributes.put(HEART_RATE_MEASUREMENT, "Heart Rate Measurement");
+        attributes.put("00002a29-0000-1000-8000-00805f9b34fb", "Manufacturer Name String");
+    }
+
+    public static String lookup(String uuid, String defaultName) {
+        String name = attributes.get(uuid);
+        return name == null ? defaultName : name;
+    }
+}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/actionbar_indeterminate_progress.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/actionbar_indeterminate_progress.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/actionbar_indeterminate_progress.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/actionbar_indeterminate_progress.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/gatt_services_characteristics.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/gatt_services_characteristics.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/gatt_services_characteristics.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/gatt_services_characteristics.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/listitem_device.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/listitem_device.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/listitem_device.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/listitem_device.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/gatt_services.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/gatt_services.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/gatt_services.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/gatt_services.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/main.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/main.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/main.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/values/strings.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/values/strings.xml
new file mode 100644
index 0000000..d828aa0
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/values/strings.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<resources>
+    <string name="app_name">BLE Sample</string>
+    <string name="ble_not_supported">BLE is not supported</string>
+    <string name="label_data">Data:</string>
+    <string name="label_device_address">Device address:</string>
+    <string name="label_state">State:</string>
+    <string name="no_data">No data</string>
+    <string name="connected">Connected</string>
+    <string name="disconnected">Disconnected</string>
+    <string name="title_devices">BLE Device Scan</string>
+    <string name="error_bluetooth_not_supported">Bluetooth not supported.</string>
+
+    <string name="unknown_device">Unknown device</string>
+    <string name="unknown_characteristic">Unknown characteristic</string>
+    <string name="unknown_service">Unknown service</string>
+
+    <!-- Menu items -->
+    <string name="menu_connect">Connect</string>
+    <string name="menu_disconnect">Disconnect</string>
+    <string name="menu_scan">Scan</string>
+    <string name="menu_stop">Stop</string>
+</resources>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/.gitignore b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/proguard-project.txt b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/AndroidManifest.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/AndroidManifest.xml
deleted file mode 100644
index babd6df..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.bluetoothlegatt"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="18"
-        android:targetSdkVersion="18"/>
-    <!-- Declare this required feature if you want to make the app available to BLE-capable
-    devices only.  If you want to make your app available to devices that don't support BLE,
-    you should omit this in the manifest.  Instead, determine BLE capability by using
-    PackageManager.hasSystemFeature(FEATURE_BLUETOOTH_LE) -->
-    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
-
-    <uses-permission android:name="android.permission.BLUETOOTH"/>
-    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
-
-    <application android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@android:style/Theme.Holo.Light">
-        <activity android:name=".DeviceScanActivity"
-            android:label="@string/app_name">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
-            </intent-filter>
-        </activity>
-        <activity android:name=".DeviceControlActivity"/>
-        <service android:name=".BluetoothLeService" android:enabled="true"/>
-    </application>
-
-</manifest>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java
deleted file mode 100644
index 694faaf..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright (C) 2013 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.bluetoothlegatt;
-
-import android.app.Service;
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothGatt;
-import android.bluetooth.BluetoothGattCallback;
-import android.bluetooth.BluetoothGattCharacteristic;
-import android.bluetooth.BluetoothGattDescriptor;
-import android.bluetooth.BluetoothGattService;
-import android.bluetooth.BluetoothManager;
-import android.bluetooth.BluetoothProfile;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Binder;
-import android.os.IBinder;
-import android.util.Log;
-
-import java.util.List;
-import java.util.UUID;
-
-/**
- * Service for managing connection and data communication with a GATT server hosted on a
- * given Bluetooth LE device.
- */
-public class BluetoothLeService extends Service {
-    private final static String TAG = BluetoothLeService.class.getSimpleName();
-
-    private BluetoothManager mBluetoothManager;
-    private BluetoothAdapter mBluetoothAdapter;
-    private String mBluetoothDeviceAddress;
-    private BluetoothGatt mBluetoothGatt;
-    private int mConnectionState = STATE_DISCONNECTED;
-
-    private static final int STATE_DISCONNECTED = 0;
-    private static final int STATE_CONNECTING = 1;
-    private static final int STATE_CONNECTED = 2;
-
-    public final static String ACTION_GATT_CONNECTED =
-            "com.example.bluetooth.le.ACTION_GATT_CONNECTED";
-    public final static String ACTION_GATT_DISCONNECTED =
-            "com.example.bluetooth.le.ACTION_GATT_DISCONNECTED";
-    public final static String ACTION_GATT_SERVICES_DISCOVERED =
-            "com.example.bluetooth.le.ACTION_GATT_SERVICES_DISCOVERED";
-    public final static String ACTION_DATA_AVAILABLE =
-            "com.example.bluetooth.le.ACTION_DATA_AVAILABLE";
-    public final static String EXTRA_DATA =
-            "com.example.bluetooth.le.EXTRA_DATA";
-
-    public final static UUID UUID_HEART_RATE_MEASUREMENT =
-            UUID.fromString(SampleGattAttributes.HEART_RATE_MEASUREMENT);
-
-    // Implements callback methods for GATT events that the app cares about.  For example,
-    // connection change and services discovered.
-    private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() {
-        @Override
-        public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
-            String intentAction;
-            if (newState == BluetoothProfile.STATE_CONNECTED) {
-                intentAction = ACTION_GATT_CONNECTED;
-                mConnectionState = STATE_CONNECTED;
-                broadcastUpdate(intentAction);
-                Log.i(TAG, "Connected to GATT server.");
-                // Attempts to discover services after successful connection.
-                Log.i(TAG, "Attempting to start service discovery:" +
-                        mBluetoothGatt.discoverServices());
-
-            } else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
-                intentAction = ACTION_GATT_DISCONNECTED;
-                mConnectionState = STATE_DISCONNECTED;
-                Log.i(TAG, "Disconnected from GATT server.");
-                broadcastUpdate(intentAction);
-            }
-        }
-
-        @Override
-        public void onServicesDiscovered(BluetoothGatt gatt, int status) {
-            if (status == BluetoothGatt.GATT_SUCCESS) {
-                broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED);
-            } else {
-                Log.w(TAG, "onServicesDiscovered received: " + status);
-            }
-        }
-
-        @Override
-        public void onCharacteristicRead(BluetoothGatt gatt,
-                                         BluetoothGattCharacteristic characteristic,
-                                         int status) {
-            if (status == BluetoothGatt.GATT_SUCCESS) {
-                broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
-            }
-        }
-
-        @Override
-        public void onCharacteristicChanged(BluetoothGatt gatt,
-                                            BluetoothGattCharacteristic characteristic) {
-            broadcastUpdate(ACTION_DATA_AVAILABLE, characteristic);
-        }
-    };
-
-    private void broadcastUpdate(final String action) {
-        final Intent intent = new Intent(action);
-        sendBroadcast(intent);
-    }
-
-    private void broadcastUpdate(final String action,
-                                 final BluetoothGattCharacteristic characteristic) {
-        final Intent intent = new Intent(action);
-
-        // This is special handling for the Heart Rate Measurement profile.  Data parsing is
-        // carried out as per profile specifications:
-        // http://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.heart_rate_measurement.xml
-        if (UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())) {
-            int flag = characteristic.getProperties();
-            int format = -1;
-            if ((flag & 0x01) != 0) {
-                format = BluetoothGattCharacteristic.FORMAT_UINT16;
-                Log.d(TAG, "Heart rate format UINT16.");
-            } else {
-                format = BluetoothGattCharacteristic.FORMAT_UINT8;
-                Log.d(TAG, "Heart rate format UINT8.");
-            }
-            final int heartRate = characteristic.getIntValue(format, 1);
-            Log.d(TAG, String.format("Received heart rate: %d", heartRate));
-            intent.putExtra(EXTRA_DATA, String.valueOf(heartRate));
-        } else {
-            // For all other profiles, writes the data formatted in HEX.
-            final byte[] data = characteristic.getValue();
-            if (data != null && data.length > 0) {
-                final StringBuilder stringBuilder = new StringBuilder(data.length);
-                for(byte byteChar : data)
-                    stringBuilder.append(String.format("%02X ", byteChar));
-                intent.putExtra(EXTRA_DATA, new String(data) + "\n" + stringBuilder.toString());
-            }
-        }
-        sendBroadcast(intent);
-    }
-
-    public class LocalBinder extends Binder {
-        BluetoothLeService getService() {
-            return BluetoothLeService.this;
-        }
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return mBinder;
-    }
-
-    @Override
-    public boolean onUnbind(Intent intent) {
-        // After using a given device, you should make sure that BluetoothGatt.close() is called
-        // such that resources are cleaned up properly.  In this particular example, close() is
-        // invoked when the UI is disconnected from the Service.
-        close();
-        return super.onUnbind(intent);
-    }
-
-    private final IBinder mBinder = new LocalBinder();
-
-    /**
-     * Initializes a reference to the local Bluetooth adapter.
-     *
-     * @return Return true if the initialization is successful.
-     */
-    public boolean initialize() {
-        // For API level 18 and above, get a reference to BluetoothAdapter through
-        // BluetoothManager.
-        if (mBluetoothManager == null) {
-            mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
-            if (mBluetoothManager == null) {
-                Log.e(TAG, "Unable to initialize BluetoothManager.");
-                return false;
-            }
-        }
-
-        mBluetoothAdapter = mBluetoothManager.getAdapter();
-        if (mBluetoothAdapter == null) {
-            Log.e(TAG, "Unable to obtain a BluetoothAdapter.");
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Connects to the GATT server hosted on the Bluetooth LE device.
-     *
-     * @param address The device address of the destination device.
-     *
-     * @return Return true if the connection is initiated successfully. The connection result
-     *         is reported asynchronously through the
-     *         {@code BluetoothGattCallback#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)}
-     *         callback.
-     */
-    public boolean connect(final String address) {
-        if (mBluetoothAdapter == null || address == null) {
-            Log.w(TAG, "BluetoothAdapter not initialized or unspecified address.");
-            return false;
-        }
-
-        // Previously connected device.  Try to reconnect.
-        if (mBluetoothDeviceAddress != null && address.equals(mBluetoothDeviceAddress)
-                && mBluetoothGatt != null) {
-            Log.d(TAG, "Trying to use an existing mBluetoothGatt for connection.");
-            if (mBluetoothGatt.connect()) {
-                mConnectionState = STATE_CONNECTING;
-                return true;
-            } else {
-                return false;
-            }
-        }
-
-        final BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
-        if (device == null) {
-            Log.w(TAG, "Device not found.  Unable to connect.");
-            return false;
-        }
-        // We want to directly connect to the device, so we are setting the autoConnect
-        // parameter to false.
-        mBluetoothGatt = device.connectGatt(this, false, mGattCallback);
-        Log.d(TAG, "Trying to create a new connection.");
-        mBluetoothDeviceAddress = address;
-        mConnectionState = STATE_CONNECTING;
-        return true;
-    }
-
-    /**
-     * Disconnects an existing connection or cancel a pending connection. The disconnection result
-     * is reported asynchronously through the
-     * {@code BluetoothGattCallback#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)}
-     * callback.
-     */
-    public void disconnect() {
-        if (mBluetoothAdapter == null || mBluetoothGatt == null) {
-            Log.w(TAG, "BluetoothAdapter not initialized");
-            return;
-        }
-        mBluetoothGatt.disconnect();
-    }
-
-    /**
-     * After using a given BLE device, the app must call this method to ensure resources are
-     * released properly.
-     */
-    public void close() {
-        if (mBluetoothGatt == null) {
-            return;
-        }
-        mBluetoothGatt.close();
-        mBluetoothGatt = null;
-    }
-
-    /**
-     * Request a read on a given {@code BluetoothGattCharacteristic}. The read result is reported
-     * asynchronously through the {@code BluetoothGattCallback#onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int)}
-     * callback.
-     *
-     * @param characteristic The characteristic to read from.
-     */
-    public void readCharacteristic(BluetoothGattCharacteristic characteristic) {
-        if (mBluetoothAdapter == null || mBluetoothGatt == null) {
-            Log.w(TAG, "BluetoothAdapter not initialized");
-            return;
-        }
-        mBluetoothGatt.readCharacteristic(characteristic);
-    }
-
-    /**
-     * Enables or disables notification on a give characteristic.
-     *
-     * @param characteristic Characteristic to act on.
-     * @param enabled If true, enable notification.  False otherwise.
-     */
-    public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic,
-                                              boolean enabled) {
-        if (mBluetoothAdapter == null || mBluetoothGatt == null) {
-            Log.w(TAG, "BluetoothAdapter not initialized");
-            return;
-        }
-        mBluetoothGatt.setCharacteristicNotification(characteristic, enabled);
-
-        // This is specific to Heart Rate Measurement.
-        if (UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())) {
-            BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
-                    UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));
-            descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
-            mBluetoothGatt.writeDescriptor(descriptor);
-        }
-    }
-
-    /**
-     * Retrieves a list of supported GATT services on the connected device. This should be
-     * invoked only after {@code BluetoothGatt#discoverServices()} completes successfully.
-     *
-     * @return A {@code List} of supported services.
-     */
-    public List<BluetoothGattService> getSupportedGattServices() {
-        if (mBluetoothGatt == null) return null;
-
-        return mBluetoothGatt.getServices();
-    }
-}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java
deleted file mode 100644
index dc2f90b..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Copyright (C) 2013 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.bluetoothlegatt;
-
-import android.app.Activity;
-import android.bluetooth.BluetoothGattCharacteristic;
-import android.bluetooth.BluetoothGattService;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.ServiceConnection;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.ExpandableListView;
-import android.widget.SimpleExpandableListAdapter;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * For a given BLE device, this Activity provides the user interface to connect, display data,
- * and display GATT services and characteristics supported by the device.  The Activity
- * communicates with {@code BluetoothLeService}, which in turn interacts with the
- * Bluetooth LE API.
- */
-public class DeviceControlActivity extends Activity {
-    private final static String TAG = DeviceControlActivity.class.getSimpleName();
-
-    public static final String EXTRAS_DEVICE_NAME = "DEVICE_NAME";
-    public static final String EXTRAS_DEVICE_ADDRESS = "DEVICE_ADDRESS";
-
-    private TextView mConnectionState;
-    private TextView mDataField;
-    private String mDeviceName;
-    private String mDeviceAddress;
-    private ExpandableListView mGattServicesList;
-    private BluetoothLeService mBluetoothLeService;
-    private ArrayList<ArrayList<BluetoothGattCharacteristic>> mGattCharacteristics =
-            new ArrayList<ArrayList<BluetoothGattCharacteristic>>();
-    private boolean mConnected = false;
-    private BluetoothGattCharacteristic mNotifyCharacteristic;
-
-    private final String LIST_NAME = "NAME";
-    private final String LIST_UUID = "UUID";
-
-    // Code to manage Service lifecycle.
-    private final ServiceConnection mServiceConnection = new ServiceConnection() {
-
-        @Override
-        public void onServiceConnected(ComponentName componentName, IBinder service) {
-            mBluetoothLeService = ((BluetoothLeService.LocalBinder) service).getService();
-            if (!mBluetoothLeService.initialize()) {
-                Log.e(TAG, "Unable to initialize Bluetooth");
-                finish();
-            }
-            // Automatically connects to the device upon successful start-up initialization.
-            mBluetoothLeService.connect(mDeviceAddress);
-        }
-
-        @Override
-        public void onServiceDisconnected(ComponentName componentName) {
-            mBluetoothLeService = null;
-        }
-    };
-
-    // Handles various events fired by the Service.
-    // ACTION_GATT_CONNECTED: connected to a GATT server.
-    // ACTION_GATT_DISCONNECTED: disconnected from a GATT server.
-    // ACTION_GATT_SERVICES_DISCOVERED: discovered GATT services.
-    // ACTION_DATA_AVAILABLE: received data from the device.  This can be a result of read
-    //                        or notification operations.
-    private final BroadcastReceiver mGattUpdateReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            final String action = intent.getAction();
-            if (BluetoothLeService.ACTION_GATT_CONNECTED.equals(action)) {
-                mConnected = true;
-                updateConnectionState(R.string.connected);
-                invalidateOptionsMenu();
-            } else if (BluetoothLeService.ACTION_GATT_DISCONNECTED.equals(action)) {
-                mConnected = false;
-                updateConnectionState(R.string.disconnected);
-                invalidateOptionsMenu();
-                clearUI();
-            } else if (BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED.equals(action)) {
-                // Show all the supported services and characteristics on the user interface.
-                displayGattServices(mBluetoothLeService.getSupportedGattServices());
-            } else if (BluetoothLeService.ACTION_DATA_AVAILABLE.equals(action)) {
-                displayData(intent.getStringExtra(BluetoothLeService.EXTRA_DATA));
-            }
-        }
-    };
-
-    // If a given GATT characteristic is selected, check for supported features.  This sample
-    // demonstrates 'Read' and 'Notify' features.  See
-    // http://d.android.com/reference/android/bluetooth/BluetoothGatt.html for the complete
-    // list of supported characteristic features.
-    private final ExpandableListView.OnChildClickListener servicesListClickListner =
-            new ExpandableListView.OnChildClickListener() {
-                @Override
-                public boolean onChildClick(ExpandableListView parent, View v, int groupPosition,
-                                            int childPosition, long id) {
-                    if (mGattCharacteristics != null) {
-                        final BluetoothGattCharacteristic characteristic =
-                                mGattCharacteristics.get(groupPosition).get(childPosition);
-                        final int charaProp = characteristic.getProperties();
-                        if ((charaProp | BluetoothGattCharacteristic.PROPERTY_READ) > 0) {
-                            // If there is an active notification on a characteristic, clear
-                            // it first so it doesn't update the data field on the user interface.
-                            if (mNotifyCharacteristic != null) {
-                                mBluetoothLeService.setCharacteristicNotification(
-                                        mNotifyCharacteristic, false);
-                                mNotifyCharacteristic = null;
-                            }
-                            mBluetoothLeService.readCharacteristic(characteristic);
-                        }
-                        if ((charaProp | BluetoothGattCharacteristic.PROPERTY_NOTIFY) > 0) {
-                            mNotifyCharacteristic = characteristic;
-                            mBluetoothLeService.setCharacteristicNotification(
-                                    characteristic, true);
-                        }
-                        return true;
-                    }
-                    return false;
-                }
-    };
-
-    private void clearUI() {
-        mGattServicesList.setAdapter((SimpleExpandableListAdapter) null);
-        mDataField.setText(R.string.no_data);
-    }
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.gatt_services_characteristics);
-
-        final Intent intent = getIntent();
-        mDeviceName = intent.getStringExtra(EXTRAS_DEVICE_NAME);
-        mDeviceAddress = intent.getStringExtra(EXTRAS_DEVICE_ADDRESS);
-
-        // Sets up UI references.
-        ((TextView) findViewById(R.id.device_address)).setText(mDeviceAddress);
-        mGattServicesList = (ExpandableListView) findViewById(R.id.gatt_services_list);
-        mGattServicesList.setOnChildClickListener(servicesListClickListner);
-        mConnectionState = (TextView) findViewById(R.id.connection_state);
-        mDataField = (TextView) findViewById(R.id.data_value);
-
-        getActionBar().setTitle(mDeviceName);
-        getActionBar().setDisplayHomeAsUpEnabled(true);
-        Intent gattServiceIntent = new Intent(this, BluetoothLeService.class);
-        bindService(gattServiceIntent, mServiceConnection, BIND_AUTO_CREATE);
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        registerReceiver(mGattUpdateReceiver, makeGattUpdateIntentFilter());
-        if (mBluetoothLeService != null) {
-            final boolean result = mBluetoothLeService.connect(mDeviceAddress);
-            Log.d(TAG, "Connect request result=" + result);
-        }
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        unregisterReceiver(mGattUpdateReceiver);
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        unbindService(mServiceConnection);
-        mBluetoothLeService = null;
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.gatt_services, menu);
-        if (mConnected) {
-            menu.findItem(R.id.menu_connect).setVisible(false);
-            menu.findItem(R.id.menu_disconnect).setVisible(true);
-        } else {
-            menu.findItem(R.id.menu_connect).setVisible(true);
-            menu.findItem(R.id.menu_disconnect).setVisible(false);
-        }
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch(item.getItemId()) {
-            case R.id.menu_connect:
-                mBluetoothLeService.connect(mDeviceAddress);
-                return true;
-            case R.id.menu_disconnect:
-                mBluetoothLeService.disconnect();
-                return true;
-            case android.R.id.home:
-                onBackPressed();
-                return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-    private void updateConnectionState(final int resourceId) {
-        runOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                mConnectionState.setText(resourceId);
-            }
-        });
-    }
-
-    private void displayData(String data) {
-        if (data != null) {
-            mDataField.setText(data);
-        }
-    }
-
-    // Demonstrates how to iterate through the supported GATT Services/Characteristics.
-    // In this sample, we populate the data structure that is bound to the ExpandableListView
-    // on the UI.
-    private void displayGattServices(List<BluetoothGattService> gattServices) {
-        if (gattServices == null) return;
-        String uuid = null;
-        String unknownServiceString = getResources().getString(R.string.unknown_service);
-        String unknownCharaString = getResources().getString(R.string.unknown_characteristic);
-        ArrayList<HashMap<String, String>> gattServiceData = new ArrayList<HashMap<String, String>>();
-        ArrayList<ArrayList<HashMap<String, String>>> gattCharacteristicData
-                = new ArrayList<ArrayList<HashMap<String, String>>>();
-        mGattCharacteristics = new ArrayList<ArrayList<BluetoothGattCharacteristic>>();
-
-        // Loops through available GATT Services.
-        for (BluetoothGattService gattService : gattServices) {
-            HashMap<String, String> currentServiceData = new HashMap<String, String>();
-            uuid = gattService.getUuid().toString();
-            currentServiceData.put(
-                    LIST_NAME, SampleGattAttributes.lookup(uuid, unknownServiceString));
-            currentServiceData.put(LIST_UUID, uuid);
-            gattServiceData.add(currentServiceData);
-
-            ArrayList<HashMap<String, String>> gattCharacteristicGroupData =
-                    new ArrayList<HashMap<String, String>>();
-            List<BluetoothGattCharacteristic> gattCharacteristics =
-                    gattService.getCharacteristics();
-            ArrayList<BluetoothGattCharacteristic> charas =
-                    new ArrayList<BluetoothGattCharacteristic>();
-
-            // Loops through available Characteristics.
-            for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) {
-                charas.add(gattCharacteristic);
-                HashMap<String, String> currentCharaData = new HashMap<String, String>();
-                uuid = gattCharacteristic.getUuid().toString();
-                currentCharaData.put(
-                        LIST_NAME, SampleGattAttributes.lookup(uuid, unknownCharaString));
-                currentCharaData.put(LIST_UUID, uuid);
-                gattCharacteristicGroupData.add(currentCharaData);
-            }
-            mGattCharacteristics.add(charas);
-            gattCharacteristicData.add(gattCharacteristicGroupData);
-        }
-
-        SimpleExpandableListAdapter gattServiceAdapter = new SimpleExpandableListAdapter(
-                this,
-                gattServiceData,
-                android.R.layout.simple_expandable_list_item_2,
-                new String[] {LIST_NAME, LIST_UUID},
-                new int[] { android.R.id.text1, android.R.id.text2 },
-                gattCharacteristicData,
-                android.R.layout.simple_expandable_list_item_2,
-                new String[] {LIST_NAME, LIST_UUID},
-                new int[] { android.R.id.text1, android.R.id.text2 }
-        );
-        mGattServicesList.setAdapter(gattServiceAdapter);
-    }
-
-    private static IntentFilter makeGattUpdateIntentFilter() {
-        final IntentFilter intentFilter = new IntentFilter();
-        intentFilter.addAction(BluetoothLeService.ACTION_GATT_CONNECTED);
-        intentFilter.addAction(BluetoothLeService.ACTION_GATT_DISCONNECTED);
-        intentFilter.addAction(BluetoothLeService.ACTION_GATT_SERVICES_DISCOVERED);
-        intentFilter.addAction(BluetoothLeService.ACTION_DATA_AVAILABLE);
-        return intentFilter;
-    }
-}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceScanActivity.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceScanActivity.java
deleted file mode 100644
index 9b86f7a..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceScanActivity.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (C) 2013 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.bluetoothlegatt;
-
-import android.app.Activity;
-import android.app.ListActivity;
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothManager;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.os.Bundle;
-import android.os.Handler;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ListView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.util.ArrayList;
-
-/**
- * Activity for scanning and displaying available Bluetooth LE devices.
- */
-public class DeviceScanActivity extends ListActivity {
-    private LeDeviceListAdapter mLeDeviceListAdapter;
-    private BluetoothAdapter mBluetoothAdapter;
-    private boolean mScanning;
-    private Handler mHandler;
-
-    private static final int REQUEST_ENABLE_BT = 1;
-    // Stops scanning after 10 seconds.
-    private static final long SCAN_PERIOD = 10000;
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        getActionBar().setTitle(R.string.title_devices);
-        mHandler = new Handler();
-
-        // Use this check to determine whether BLE is supported on the device.  Then you can
-        // selectively disable BLE-related features.
-        if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) {
-            Toast.makeText(this, R.string.ble_not_supported, Toast.LENGTH_SHORT).show();
-            finish();
-        }
-
-        // Initializes a Bluetooth adapter.  For API level 18 and above, get a reference to
-        // BluetoothAdapter through BluetoothManager.
-        final BluetoothManager bluetoothManager =
-                (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
-        mBluetoothAdapter = bluetoothManager.getAdapter();
-
-        // Checks if Bluetooth is supported on the device.
-        if (mBluetoothAdapter == null) {
-            Toast.makeText(this, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();
-            finish();
-            return;
-        }
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.main, menu);
-        if (!mScanning) {
-            menu.findItem(R.id.menu_stop).setVisible(false);
-            menu.findItem(R.id.menu_scan).setVisible(true);
-            menu.findItem(R.id.menu_refresh).setActionView(null);
-        } else {
-            menu.findItem(R.id.menu_stop).setVisible(true);
-            menu.findItem(R.id.menu_scan).setVisible(false);
-            menu.findItem(R.id.menu_refresh).setActionView(
-                    R.layout.actionbar_indeterminate_progress);
-        }
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.menu_scan:
-                mLeDeviceListAdapter.clear();
-                scanLeDevice(true);
-                break;
-            case R.id.menu_stop:
-                scanLeDevice(false);
-                break;
-        }
-        return true;
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        // Ensures Bluetooth is enabled on the device.  If Bluetooth is not currently enabled,
-        // fire an intent to display a dialog asking the user to grant permission to enable it.
-        if (!mBluetoothAdapter.isEnabled()) {
-            if (!mBluetoothAdapter.isEnabled()) {
-                Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
-                startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
-            }
-        }
-
-        // Initializes list view adapter.
-        mLeDeviceListAdapter = new LeDeviceListAdapter();
-        setListAdapter(mLeDeviceListAdapter);
-        scanLeDevice(true);
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        // User chose not to enable Bluetooth.
-        if (requestCode == REQUEST_ENABLE_BT && resultCode == Activity.RESULT_CANCELED) {
-            finish();
-            return;
-        }
-        super.onActivityResult(requestCode, resultCode, data);
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        scanLeDevice(false);
-        mLeDeviceListAdapter.clear();
-    }
-
-    @Override
-    protected void onListItemClick(ListView l, View v, int position, long id) {
-        final BluetoothDevice device = mLeDeviceListAdapter.getDevice(position);
-        if (device == null) return;
-        final Intent intent = new Intent(this, DeviceControlActivity.class);
-        intent.putExtra(DeviceControlActivity.EXTRAS_DEVICE_NAME, device.getName());
-        intent.putExtra(DeviceControlActivity.EXTRAS_DEVICE_ADDRESS, device.getAddress());
-        if (mScanning) {
-            mBluetoothAdapter.stopLeScan(mLeScanCallback);
-            mScanning = false;
-        }
-        startActivity(intent);
-    }
-
-    private void scanLeDevice(final boolean enable) {
-        if (enable) {
-            // Stops scanning after a pre-defined scan period.
-            mHandler.postDelayed(new Runnable() {
-                @Override
-                public void run() {
-                    mScanning = false;
-                    mBluetoothAdapter.stopLeScan(mLeScanCallback);
-                    invalidateOptionsMenu();
-                }
-            }, SCAN_PERIOD);
-
-            mScanning = true;
-            mBluetoothAdapter.startLeScan(mLeScanCallback);
-        } else {
-            mScanning = false;
-            mBluetoothAdapter.stopLeScan(mLeScanCallback);
-        }
-        invalidateOptionsMenu();
-    }
-
-    // Adapter for holding devices found through scanning.
-    private class LeDeviceListAdapter extends BaseAdapter {
-        private ArrayList<BluetoothDevice> mLeDevices;
-        private LayoutInflater mInflator;
-
-        public LeDeviceListAdapter() {
-            super();
-            mLeDevices = new ArrayList<BluetoothDevice>();
-            mInflator = DeviceScanActivity.this.getLayoutInflater();
-        }
-
-        public void addDevice(BluetoothDevice device) {
-            if(!mLeDevices.contains(device)) {
-                mLeDevices.add(device);
-            }
-        }
-
-        public BluetoothDevice getDevice(int position) {
-            return mLeDevices.get(position);
-        }
-
-        public void clear() {
-            mLeDevices.clear();
-        }
-
-        @Override
-        public int getCount() {
-            return mLeDevices.size();
-        }
-
-        @Override
-        public Object getItem(int i) {
-            return mLeDevices.get(i);
-        }
-
-        @Override
-        public long getItemId(int i) {
-            return i;
-        }
-
-        @Override
-        public View getView(int i, View view, ViewGroup viewGroup) {
-            ViewHolder viewHolder;
-            // General ListView optimization code.
-            if (view == null) {
-                view = mInflator.inflate(R.layout.listitem_device, null);
-                viewHolder = new ViewHolder();
-                viewHolder.deviceAddress = (TextView) view.findViewById(R.id.device_address);
-                viewHolder.deviceName = (TextView) view.findViewById(R.id.device_name);
-                view.setTag(viewHolder);
-            } else {
-                viewHolder = (ViewHolder) view.getTag();
-            }
-
-            BluetoothDevice device = mLeDevices.get(i);
-            final String deviceName = device.getName();
-            if (deviceName != null && deviceName.length() > 0)
-                viewHolder.deviceName.setText(deviceName);
-            else
-                viewHolder.deviceName.setText(R.string.unknown_device);
-            viewHolder.deviceAddress.setText(device.getAddress());
-
-            return view;
-        }
-    }
-
-    // Device scan callback.
-    private BluetoothAdapter.LeScanCallback mLeScanCallback =
-            new BluetoothAdapter.LeScanCallback() {
-
-        @Override
-        public void onLeScan(final BluetoothDevice device, int rssi, byte[] scanRecord) {
-            runOnUiThread(new Runnable() {
-                @Override
-                public void run() {
-                    mLeDeviceListAdapter.addDevice(device);
-                    mLeDeviceListAdapter.notifyDataSetChanged();
-                }
-            });
-        }
-    };
-
-    static class ViewHolder {
-        TextView deviceName;
-        TextView deviceAddress;
-    }
-}
\ No newline at end of file
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java
deleted file mode 100644
index e8db74c..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2013 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.bluetoothlegatt;
-
-import java.util.HashMap;
-
-/**
- * This class includes a small subset of standard GATT attributes for demonstration purposes.
- */
-public class SampleGattAttributes {
-    private static HashMap<String, String> attributes = new HashMap();
-    public static String HEART_RATE_MEASUREMENT = "00002a37-0000-1000-8000-00805f9b34fb";
-    public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
-
-    static {
-        // Sample Services.
-        attributes.put("0000180d-0000-1000-8000-00805f9b34fb", "Heart Rate Service");
-        attributes.put("0000180a-0000-1000-8000-00805f9b34fb", "Device Information Service");
-        // Sample Characteristics.
-        attributes.put(HEART_RATE_MEASUREMENT, "Heart Rate Measurement");
-        attributes.put("00002a29-0000-1000-8000-00805f9b34fb", "Manufacturer Name String");
-    }
-
-    public static String lookup(String uuid, String defaultName) {
-        String name = attributes.get(uuid);
-        return name == null ? defaultName : name;
-    }
-}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/values/strings.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/values/strings.xml
deleted file mode 100644
index 19f3dce..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 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.
--->
-<resources>
-    <string name="ble_not_supported">BLE is not supported</string>
-    <string name="label_data">Data:</string>
-    <string name="label_device_address">Device address:</string>
-    <string name="label_state">State:</string>
-    <string name="no_data">No data</string>
-    <string name="connected">Connected</string>
-    <string name="disconnected">Disconnected</string>
-    <string name="title_devices">BLE Device Scan</string>
-    <string name="error_bluetooth_not_supported">Bluetooth not supported.</string>
-
-    <string name="unknown_device">Unknown device</string>
-    <string name="unknown_characteristic">Unknown characteristic</string>
-    <string name="unknown_service">Unknown service</string>
-
-    <!-- Menu items -->
-    <string name="menu_connect">Connect</string>
-    <string name="menu_disconnect">Disconnect</string>
-    <string name="menu_scan">Scan</string>
-    <string name="menu_stop">Stop</string>
-</resources>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/build.gradle b/connectivity/bluetooth/BluetoothLeGatt/build.gradle
index cca9ac3..036abc8 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/build.gradle
+++ b/connectivity/bluetooth/BluetoothLeGatt/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/connectivity/bluetooth/BluetoothLeGatt/buildSrc/build.gradle b/connectivity/bluetooth/BluetoothLeGatt/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties b/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
index 861eddc..5c22dec 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/connectivity/bluetooth/BluetoothLeGatt/settings.gradle b/connectivity/bluetooth/BluetoothLeGatt/settings.gradle
index 05cae43..639c5c8 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/settings.gradle
+++ b/connectivity/bluetooth/BluetoothLeGatt/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BluetoothLeGattSample'
+include ':BluetoothLeGatt'
diff --git a/connectivity/bluetooth/BluetoothLeGatt/template-params.xml b/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
deleted file mode 100644
index 323e1d7..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BluetoothLeGatt</name>
-    <group>Connectivity</group>
-    <package>com.example.android.bluetoothlegatt</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>18</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates how to use the Bluetooth LE Generic Attribute Profile (GATT)
-            to transmit arbitrary data between devices.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/build.gradle b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/AndroidManifest.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/AndroidManifest.xml
new file mode 100755
index 0000000..c0d3e64
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/AndroidManifest.xml
@@ -0,0 +1,44 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.networkbasic"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
+    <application
+        android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample"
+        android:allowBackup="true">
+
+        <activity
+            android:name="com.example.android.networkbasic.MainActivity"
+            android:label="@string/app_name"
+            android:uiOptions="splitActionBarWhenNarrow">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java
new file mode 100644
index 0000000..a2be93f
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2013 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.common;
+
+import android.os.Bundle;
+
+import android.support.v4.app.Fragment;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Simple fragment containing only a TextView. Used by TextPagerAdapter to create
+ * tutorial-style pages for apps.
+ */
+public class SimpleTextFragment extends Fragment {
+
+    // Contains the text that will be displayed by this Fragment
+    String mText;
+
+    // Contains a resource ID for the text that will be displayed by this fragment.
+    int mTextId = -1;
+
+    // Keys which will be used to store/retrieve text passed in via setArguments.
+    public static final String TEXT_KEY = "text";
+    public static final String TEXT_ID_KEY = "text_id";
+
+    // For situations where the app wants to modify text at Runtime, exposing the TextView.
+    private TextView mTextView;
+
+    public SimpleTextFragment() {
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        // Before initializing the textView, check if any arguments were provided via setArguments.
+        processArguments();
+
+        // Create a new TextView and set its text to whatever was provided.
+        mTextView = new TextView(getActivity());
+        mTextView.setGravity(Gravity.CENTER);
+
+        if (mText != null) {
+            mTextView.setText(mText);
+            Log.i("SimpleTextFragment", mText);
+        }
+        return mTextView;
+    }
+
+    public TextView getTextView() {
+        return mTextView;
+    }
+
+    /**
+     * Changes the text for this TextView, according to the resource ID provided.
+     * @param stringId A resource ID representing the text content for this Fragment's TextView.
+     */
+    public void setText(int stringId) {
+        getTextView().setText(getActivity().getString(stringId));
+    }
+
+    /**
+     * Processes the arguments passed into this Fragment via setArguments method.
+     * Currently the method only looks for text or a textID, nothing else.
+     */
+    public void processArguments() {
+        // For most objects we'd handle the multiple possibilities for initialization variables
+        // as multiple constructors.  For Fragments, however, it's customary to use
+        // setArguments / getArguments.
+        if (getArguments() != null) {
+            Bundle args = getArguments();
+            if (args.containsKey(TEXT_KEY)) {
+                mText = args.getString(TEXT_KEY);
+                Log.d("Constructor", "Added Text.");
+            } else if (args.containsKey(TEXT_ID_KEY)) {
+                mTextId = args.getInt(TEXT_ID_KEY);
+                mText = getString(mTextId);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/Log.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/Log.java
new file mode 100644
index 0000000..cf4abb7
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/Log.java
@@ -0,0 +1,236 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+/**
+ * Helper class for a list (or tree) of LoggerNodes.
+ *
+ * <p>When this is set as the head of the list,
+ * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
+ * Most of the methods in this class server only to map a method call in Log to its equivalent
+ * in LogNode.</p>
+ */
+public class Log {
+    // Grabbing the native values from Android's native logging facilities,
+    // to make for easy migration and interop.
+    public static final int NONE = -1;
+    public static final int VERBOSE = android.util.Log.VERBOSE;
+    public static final int DEBUG = android.util.Log.DEBUG;
+    public static final int INFO = android.util.Log.INFO;
+    public static final int WARN = android.util.Log.WARN;
+    public static final int ERROR = android.util.Log.ERROR;
+    public static final int ASSERT = android.util.Log.ASSERT;
+
+    // Stores the beginning of the LogNode topology.
+    private static LogNode mLogNode;
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public static LogNode getLogNode() {
+        return mLogNode;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to.
+     */
+    public static void setLogNode(LogNode node) {
+        mLogNode = node;
+    }
+
+    /**
+     * Instructs the LogNode to print the log data provided. Other LogNodes can
+     * be chained to the end of the LogNode as desired.
+     *
+     * @param priority Log level of the data being logged. Verbose, Error, etc.
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void println(int priority, String tag, String msg, Throwable tr) {
+        if (mLogNode != null) {
+            mLogNode.println(priority, tag, msg, tr);
+        }
+    }
+
+    /**
+     * Instructs the LogNode to print the log data provided. Other LogNodes can
+     * be chained to the end of the LogNode as desired.
+     *
+     * @param priority Log level of the data being logged. Verbose, Error, etc.
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     */
+    public static void println(int priority, String tag, String msg) {
+        println(priority, tag, msg, null);
+    }
+
+   /**
+     * Prints a message at VERBOSE priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void v(String tag, String msg, Throwable tr) {
+        println(VERBOSE, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at VERBOSE priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void v(String tag, String msg) {
+        v(tag, msg, null);
+    }
+
+
+    /**
+     * Prints a message at DEBUG priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void d(String tag, String msg, Throwable tr) {
+        println(DEBUG, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at DEBUG priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void d(String tag, String msg) {
+        d(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at INFO priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void i(String tag, String msg, Throwable tr) {
+        println(INFO, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at INFO priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void i(String tag, String msg) {
+        i(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void w(String tag, String msg, Throwable tr) {
+        println(WARN, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void w(String tag, String msg) {
+        w(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void w(String tag, Throwable tr) {
+        w(tag, null, tr);
+    }
+
+    /**
+     * Prints a message at ERROR priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void e(String tag, String msg, Throwable tr) {
+        println(ERROR, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at ERROR priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void e(String tag, String msg) {
+        e(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void wtf(String tag, String msg, Throwable tr) {
+        println(ASSERT, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void wtf(String tag, String msg) {
+        wtf(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void wtf(String tag, Throwable tr) {
+        wtf(tag, null, tr);
+    }
+}
\ No newline at end of file
diff --git a/common/src/java/com/example/android/common/logger/LogNode.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogNode.java
similarity index 100%
copy from common/src/java/com/example/android/common/logger/LogNode.java
copy to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogNode.java
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogView.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogView.java
new file mode 100644
index 0000000..953b8b1
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogView.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+import android.content.Context;
+import android.util.*;
+import android.widget.TextView;
+
+/** Simple TextView which is used to output log data received through the LogNode interface.
+*/
+public class LogView extends TextView implements LogNode {
+
+    public LogView(Context context) {
+        super(context);
+    }
+
+    public LogView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public LogView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    /**
+     * Formats the log data and prints it out to the LogView.
+     * @param priority Log level of the data being logged.  Verbose, Error, etc.
+     * @param tag Tag for for the log data.  Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        String priorityStr = null;
+
+        // For the purposes of this View, we want to print the priority as readable text.
+        switch(priority) {
+            case android.util.Log.VERBOSE:
+                priorityStr = "VERBOSE";
+                break;
+            case android.util.Log.DEBUG:
+                priorityStr = "DEBUG";
+                break;
+            case android.util.Log.INFO:
+                priorityStr = "INFO";
+                break;
+            case android.util.Log.WARN:
+                priorityStr = "WARN";
+                break;
+            case android.util.Log.ERROR:
+                priorityStr = "ERROR";
+                break;
+            case android.util.Log.ASSERT:
+                priorityStr = "ASSERT";
+                break;
+            default:
+                break;
+        }
+
+        // Handily, the Log class has a facility for converting a stack trace into a usable string.
+        String exceptionStr = null;
+        if (tr != null) {
+            exceptionStr = android.util.Log.getStackTraceString(tr);
+        }
+
+        // Take the priority, tag, message, and exception, and concatenate as necessary
+        // into one usable line of text.
+        StringBuilder outputBuilder = new StringBuilder();
+
+        String delimiter = "\t";
+        appendIfNotNull(outputBuilder, priorityStr, delimiter);
+        appendIfNotNull(outputBuilder, tag, delimiter);
+        appendIfNotNull(outputBuilder, msg, delimiter);
+        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
+
+        // Actually display the text we just generated within the LogView.
+        appendToLog(outputBuilder.toString());
+
+        if (mNext != null) {
+            mNext.println(priority, tag, msg, tr);
+        }
+    }
+
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
+     * the logger takes so many arguments that might be null, this method helps cut out some of the
+     * agonizing tedium of writing the same 3 lines over and over.
+     * @param source StringBuilder containing the text to append to.
+     * @param addStr The String to append
+     * @param delimiter The String to separate the source and appended strings. A tab or comma,
+     *                  for instance.
+     * @return The fully concatenated String as a StringBuilder
+     */
+    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
+        if (addStr != null) {
+            if (addStr.length() == 0) {
+                delimiter = "";
+            }
+
+            return source.append(addStr).append(delimiter);
+        }
+        return source;
+    }
+
+    // The next LogNode in the chain.
+    LogNode mNext;
+
+    /** Outputs the string as a new line of log data in the LogView. */
+    public void appendToLog(String s) {
+        append("\n" + s);
+    }
+}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogWrapper.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogWrapper.java
new file mode 100644
index 0000000..ea8e20e
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogWrapper.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2012 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.common.logger;
+
+import android.util.Log;
+
+/**
+ * Helper class which wraps Android's native Log utility in the Logger interface.  This way
+ * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
+ */
+public class LogWrapper implements LogNode {
+
+    // For piping:  The next node to receive Log data after this one has done its work.
+    private LogNode mNext;
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to..
+     */
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+    /**
+     * Prints data out to the console using Android's native log mechanism.
+     * @param priority Log level of the data being logged.  Verbose, Error, etc.
+     * @param tag Tag for for the log data.  Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        // There actually are log methods that don't take a msg parameter.  For now,
+        // if that's the case, just convert null to the empty string and move on.
+        String useMsg = msg;
+        if (useMsg == null) {
+            useMsg = "";
+        }
+
+        // If an exeption was provided, convert that exception to a usable string and attach
+        // it to the end of the msg method.
+        if (tr != null) {
+            msg += "\n" + Log.getStackTraceString(tr);
+        }
+
+        // This is functionally identical to Log.x(tag, useMsg);
+        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
+        Log.println(priority, tag, useMsg);
+
+        // If this isn't the last node in the chain, move things along.
+        if (mNext != null) {
+            mNext.println(priority, tag, msg, tr);
+        }
+    }
+}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
new file mode 100644
index 0000000..c57a111
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+/**
+ * Simple {@link LogNode} filter, removes everything except the message.
+ * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
+ * just easy-to-read message updates as they're happening.
+ */
+public class MessageOnlyLogFilter implements LogNode {
+
+    LogNode mNext;
+
+    /**
+     * Takes the "next" LogNode as a parameter, to simplify chaining.
+     *
+     * @param next The next LogNode in the pipeline.
+     */
+    public MessageOnlyLogFilter(LogNode next) {
+        mNext = next;
+    }
+
+    public MessageOnlyLogFilter() {
+    }
+
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        if (mNext != null) {
+            getNext().println(Log.NONE, null, msg, null);
+        }
+    }
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to..
+     */
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/LogFragment.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/LogFragment.java
new file mode 100644
index 0000000..ecbe2eb
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/LogFragment.java
@@ -0,0 +1,60 @@
+package com.example.android.networkbasic;
+
+import android.support.v4.app.Fragment;
+
+import com.example.android.networkbasic.R;
+import com.example.android.common.logger.LogView;
+
+import android.os.Bundle;
+
+import android.text.Editable;
+import android.text.TextWatcher;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ScrollView;
+
+/**
+ * Simple fragment that contains a LogView and uses it to output log data it receives
+ * through the LogNode interface.
+ */
+public class LogFragment extends Fragment {
+
+  private LogView mLogView;
+
+  public LogFragment() {}
+
+  @Override
+  public View onCreateView(LayoutInflater inflater, ViewGroup container,
+          Bundle savedInstanceState) {
+
+      View result = inflater.inflate(R.layout.log_fragment, container, false);
+
+      mLogView = (LogView) result.findViewById(R.id.sample_output);
+
+      // Wire up so when the text changes, the view scrolls down.
+      final ScrollView scrollView =
+              ((ScrollView) result.findViewById(R.id.log_scroll));
+
+      mLogView.addTextChangedListener(new TextWatcher() {
+          @Override
+          public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+
+          @Override
+          public void onTextChanged(CharSequence s, int start, int before, int count) {}
+
+          @Override
+          public void afterTextChanged(Editable s) {
+              scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+          }
+      });
+
+      return result;
+  }
+
+  public LogView getLogView() {
+      return mLogView;
+  }
+
+}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/MainActivity.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/MainActivity.java
new file mode 100755
index 0000000..c2a4305
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/MainActivity.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2013 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.networkbasic;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+import android.util.TypedValue;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.example.android.common.SimpleTextFragment;
+import com.example.android.common.logger.Log;
+import com.example.android.common.logger.LogWrapper;
+import com.example.android.common.logger.MessageOnlyLogFilter;
+
+/**
+ * Sample application demonstrating how to test whether a device is connected,
+ * and if so, whether the connection happens to be wifi or mobile (it could be
+ * something else).
+ *
+ * This sample uses the logging framework to display log output in the log
+ * fragment (LogFragment).
+ */
+public class MainActivity extends FragmentActivity {
+
+    public static final String TAG = "Basic Network Demo";
+    // Whether there is a Wi-Fi connection.
+    private static boolean wifiConnected = false;
+    // Whether there is a mobile connection.
+    private static boolean mobileConnected = false;
+
+    // Reference to the fragment showing events, so we can clear it with a button
+    // as necessary.
+    private LogFragment mLogFragment;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        // Initialize text fragment that displays intro text.
+        SimpleTextFragment introFragment = (SimpleTextFragment)
+                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
+        introFragment.setText(R.string.intro_message);
+        introFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
+
+        // Initialize the logging framework.
+        initializeLogging();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            // When the user clicks TEST, display the connection status.
+            case R.id.test_action:
+                checkNetworkConnection();
+                return true;
+            // Clear the log view fragment.
+            case R.id.clear_action:
+                mLogFragment.getLogView().setText("");
+                return true;
+        }
+        return false;
+    }
+
+    /**
+     * Check whether the device is connected, and if so, whether the connection
+     * is wifi or mobile (it could be something else).
+     */
+    private void checkNetworkConnection() {
+      // BEGIN_INCLUDE(connect)
+      ConnectivityManager connMgr =
+          (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
+      NetworkInfo activeInfo = connMgr.getActiveNetworkInfo();
+      if (activeInfo != null && activeInfo.isConnected()) {
+          wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI;
+          mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;
+          if(wifiConnected) {
+              Log.i(TAG, getString(R.string.wifi_connection));
+          } else if (mobileConnected){
+              Log.i(TAG, getString(R.string.mobile_connection));
+          }
+      } else {
+          Log.i(TAG, getString(R.string.no_wifi_or_mobile));
+      }
+      // END_INCLUDE(connect)
+    }
+
+    /** Create a chain of targets that will receive log data */
+    public void initializeLogging() {
+
+        // Using Log, front-end to the logging chain, emulates
+        // android.util.log method signatures.
+
+        // Wraps Android's native log framework
+        LogWrapper logWrapper = new LogWrapper();
+        Log.setLogNode(logWrapper);
+
+        // A filter that strips out everything except the message text.
+        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
+        logWrapper.setNext(msgFilter);
+
+        // On screen logging via a fragment with a TextView.
+        mLogFragment =
+                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
+        msgFilter.setNext(mLogFragment.getLogView());
+    }
+}
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/activity_main.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/activity_main.xml
new file mode 100755
index 0000000..d9be686
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/activity_main.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright 2013 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.
+  -->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+    <fragment
+        android:name="com.example.android.common.SimpleTextFragment"
+        android:id="@+id/intro_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dp"
+        android:background="@android:color/darker_gray"/>
+    <fragment
+        android:name="com.example.android.networkbasic.LogFragment"
+        android:id="@+id/log_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+</LinearLayout>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/log_fragment.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/log_fragment.xml
new file mode 100644
index 0000000..6d79548
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/log_fragment.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/log_scroll"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <com.example.android.common.logger.LogView
+        android:id="@+id/sample_output"
+        style="@style/Log"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:focusable="true"
+        android:text=""
+        android:gravity="bottom" />
+</ScrollView>
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/menu/main.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/menu/main.xml
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/menu/main.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-sw600dp/styles.xml
similarity index 100%
rename from background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-sw600dp/styles.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-v11/styles.xml
similarity index 100%
rename from background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml
rename to connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-v11/styles.xml
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/dimens.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..4f69897
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/dimens.xml
@@ -0,0 +1,24 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+</resources>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/strings.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/strings.xml
new file mode 100755
index 0000000..d8116aa
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/strings.xml
@@ -0,0 +1,29 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Basic Network Demo</string>
+
+    <string name="intro_message">Welcome to Basic Network Demo!
+        Click TEST to find out whether your device has a network connection, and if so, what type it is.
+    </string>
+
+    <string name="test_text">Test</string>
+    <string name="clear_text">Clear</string>
+    <string name="wifi_connection">The active connection is wifi.</string>
+    <string name="mobile_connection">The active connection is mobile.</string>
+    <string name="no_wifi_or_mobile">No wireless or mobile connection.</string>
+</resources>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/styles.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/styles.xml
new file mode 100644
index 0000000..4d9bb98
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/styles.xml
@@ -0,0 +1,40 @@
+<!--
+  Copyright 2013 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 thegi License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleOutput">
+        <item name="android:padding">@dimen/margin_medium</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+    <style name="Log" parent="Widget.SampleOutput">
+        <item name="android:typeface">monospace</item>
+    </style>
+
+
+</resources>
diff --git a/connectivity/network/BasicNetworkDemo/README.txt b/connectivity/network/BasicNetworkDemo/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/build.gradle b/connectivity/network/BasicNetworkDemo/build.gradle
new file mode 100644
index 0000000..036abc8
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/build.gradle
@@ -0,0 +1,8 @@
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
+}
diff --git a/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.jar b/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.jar
rename to connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..055ba6f
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,7 @@
+#
+#Mon Jul 22 11:40:20 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/connectivity/network/BasicNetworking/gradlew b/connectivity/network/BasicNetworkDemo/gradlew
similarity index 100%
rename from connectivity/network/BasicNetworking/gradlew
rename to connectivity/network/BasicNetworkDemo/gradlew
diff --git a/connectivity/network/BasicNetworking/gradlew.bat b/connectivity/network/BasicNetworkDemo/gradlew.bat
similarity index 100%
rename from connectivity/network/BasicNetworking/gradlew.bat
rename to connectivity/network/BasicNetworkDemo/gradlew.bat
diff --git a/connectivity/network/BasicNetworkDemo/settings.gradle b/connectivity/network/BasicNetworkDemo/settings.gradle
new file mode 100644
index 0000000..4981654
--- /dev/null
+++ b/connectivity/network/BasicNetworkDemo/settings.gradle
@@ -0,0 +1 @@
+include ':BasicNetworkDemo'
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/.gitignore b/connectivity/network/BasicNetworking/BasicNetworkingSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/proguard-project.txt b/connectivity/network/BasicNetworking/BasicNetworkingSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/AndroidManifest.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 48bfeac..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<manifest
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicnetworking"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-
-    <application
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/Theme.Sample"
-        android:allowBackup="true">
-
-        <activity
-            android:name="com.example.android.basicnetworking.MainActivity"
-            android:label="@string/app_name"
-            android:uiOptions="splitActionBarWhenNarrow">
-
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/MainActivity.java b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/MainActivity.java
deleted file mode 100755
index 39ed4b1..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/MainActivity.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2013 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.basicnetworking;
-
-import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.util.TypedValue;
-import android.view.Menu;
-import android.view.MenuItem;
-
-import com.example.android.common.logger.Log;
-import com.example.android.common.logger.LogFragment;
-import com.example.android.common.logger.LogWrapper;
-import com.example.android.common.logger.MessageOnlyLogFilter;
-
-/**
- * Sample application demonstrating how to test whether a device is connected,
- * and if so, whether the connection happens to be wifi or mobile (it could be
- * something else).
- *
- * This sample uses the logging framework to display log output in the log
- * fragment (LogFragment).
- */
-public class MainActivity extends FragmentActivity {
-
-    public static final String TAG = "Basic Network Demo";
-    // Whether there is a Wi-Fi connection.
-    private static boolean wifiConnected = false;
-    // Whether there is a mobile connection.
-    private static boolean mobileConnected = false;
-
-    // Reference to the fragment showing events, so we can clear it with a button
-    // as necessary.
-    private LogFragment mLogFragment;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        // Initialize text fragment that displays intro text.
-        SimpleTextFragment introFragment = (SimpleTextFragment)
-                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
-        introFragment.setText(R.string.intro_message);
-        introFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
-
-        // Initialize the logging framework.
-        initializeLogging();
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.main, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            // When the user clicks TEST, display the connection status.
-            case R.id.test_action:
-                checkNetworkConnection();
-                return true;
-            // Clear the log view fragment.
-            case R.id.clear_action:
-                mLogFragment.getLogView().setText("");
-                return true;
-        }
-        return false;
-    }
-
-    /**
-     * Check whether the device is connected, and if so, whether the connection
-     * is wifi or mobile (it could be something else).
-     */
-    private void checkNetworkConnection() {
-      // BEGIN_INCLUDE(connect)
-      ConnectivityManager connMgr =
-          (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
-      NetworkInfo activeInfo = connMgr.getActiveNetworkInfo();
-      if (activeInfo != null && activeInfo.isConnected()) {
-          wifiConnected = activeInfo.getType() == ConnectivityManager.TYPE_WIFI;
-          mobileConnected = activeInfo.getType() == ConnectivityManager.TYPE_MOBILE;
-          if(wifiConnected) {
-              Log.i(TAG, getString(R.string.wifi_connection));
-          } else if (mobileConnected){
-              Log.i(TAG, getString(R.string.mobile_connection));
-          }
-      } else {
-          Log.i(TAG, getString(R.string.no_wifi_or_mobile));
-      }
-      // END_INCLUDE(connect)
-    }
-
-    /** Create a chain of targets that will receive log data */
-    public void initializeLogging() {
-
-        // Using Log, front-end to the logging chain, emulates
-        // android.util.log method signatures.
-
-        // Wraps Android's native log framework
-        LogWrapper logWrapper = new LogWrapper();
-        Log.setLogNode(logWrapper);
-
-        // A filter that strips out everything except the message text.
-        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
-        logWrapper.setNext(msgFilter);
-
-        // On screen logging via a fragment with a TextView.
-        mLogFragment =
-                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
-        msgFilter.setNext(mLogFragment.getLogView());
-    }
-}
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/SimpleTextFragment.java b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/SimpleTextFragment.java
deleted file mode 100644
index c6d409c..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/SimpleTextFragment.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2013 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.basicnetworking;
-
-import android.os.Bundle;
-
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-/**
- * Simple fragment containing only a TextView. Used by TextPagerAdapter to create
- * tutorial-style pages for apps.
- */
-public class SimpleTextFragment extends Fragment {
-
-    // Contains the text that will be displayed by this Fragment
-    String mText;
-
-    // Contains a resource ID for the text that will be displayed by this fragment.
-    int mTextId = -1;
-
-    // Keys which will be used to store/retrieve text passed in via setArguments.
-    public static final String TEXT_KEY = "text";
-    public static final String TEXT_ID_KEY = "text_id";
-
-    // For situations where the app wants to modify text at Runtime, exposing the TextView.
-    private TextView mTextView;
-
-    public SimpleTextFragment() {
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        // Before initializing the textView, check if any arguments were provided via setArguments.
-        processArguments();
-
-        // Create a new TextView and set its text to whatever was provided.
-        mTextView = new TextView(getActivity());
-        mTextView.setGravity(Gravity.CENTER);
-
-        if (mText != null) {
-            mTextView.setText(mText);
-            Log.i("SimpleTextFragment", mText);
-        }
-        return mTextView;
-    }
-
-    public TextView getTextView() {
-        return mTextView;
-    }
-
-    /**
-     * Changes the text for this TextView, according to the resource ID provided.
-     * @param stringId A resource ID representing the text content for this Fragment's TextView.
-     */
-    public void setText(int stringId) {
-        getTextView().setText(getActivity().getString(stringId));
-    }
-
-    /**
-     * Processes the arguments passed into this Fragment via setArguments method.
-     * Currently the method only looks for text or a textID, nothing else.
-     */
-    public void processArguments() {
-        // For most objects we'd handle the multiple possibilities for initialization variables
-        // as multiple constructors.  For Fragments, however, it's customary to use
-        // setArguments / getArguments.
-        if (getArguments() != null) {
-            Bundle args = getArguments();
-            if (args.containsKey(TEXT_KEY)) {
-                mText = args.getString(TEXT_KEY);
-                Log.d("Constructor", "Added Text.");
-            } else if (args.containsKey(TEXT_ID_KEY)) {
-                mTextId = args.getInt(TEXT_ID_KEY);
-                mText = getString(mTextId);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/layout/sample_main.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/layout/sample_main.xml
deleted file mode 100755
index ccbe6ae..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/layout/sample_main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright 2013 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.
-  -->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-    <fragment
-        android:name="com.example.android.basicnetworking.SimpleTextFragment"
-        android:id="@+id/intro_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-    <View
-        android:layout_width="fill_parent"
-        android:layout_height="1dp"
-        android:background="@android:color/darker_gray"/>
-    <fragment
-        android:name="com.example.android.common.logger.LogFragment"
-        android:id="@+id/log_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/strings.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/strings.xml
deleted file mode 100755
index d39460a..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <string name="test_text">Test</string>
-    <string name="clear_text">Clear</string>
-    <string name="wifi_connection">The active connection is wifi.</string>
-    <string name="mobile_connection">The active connection is mobile.</string>
-    <string name="no_wifi_or_mobile">No wireless or mobile connection.</string>
-</resources>
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/styles.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/styles.xml
deleted file mode 100644
index 3450a54..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  Copyright 2013 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 thegi License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<resources>
-
-    <!-- Widget styling -->
-
-    <style name="Widget.SampleOutput">
-        <item name="android:padding">@dimen/margin_medium</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-    <style name="Log" parent="Widget.SampleOutput">
-        <item name="android:typeface">monospace</item>
-    </style>
-
-
-</resources>
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/AndroidManifest.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/AndroidManifest.xml
deleted file mode 100644
index 293c16b..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicnetworking.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicnetworking"
-            android:label="Tests for com.example.android.basicnetworking" />
-
-</manifest>
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/src/com/example/android/basicnetworking/tests/SampleTests.java b/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/src/com/example/android/basicnetworking/tests/SampleTests.java
deleted file mode 100644
index 0cf077e..0000000
--- a/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/src/com/example/android/basicnetworking/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicnetworking.tests;
-
-import com.example.android.basicnetworking.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicNetworking sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicNetworkingFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicNetworkingFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/build.gradle b/connectivity/network/BasicNetworking/build.gradle
deleted file mode 100644
index cca9ac3..0000000
--- a/connectivity/network/BasicNetworking/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/connectivity/network/BasicNetworking/buildSrc/build.gradle b/connectivity/network/BasicNetworking/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/connectivity/network/BasicNetworking/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/connectivity/network/BasicNetworking/settings.gradle b/connectivity/network/BasicNetworking/settings.gradle
deleted file mode 100644
index 453e7cd..0000000
--- a/connectivity/network/BasicNetworking/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-include 'BasicNetworkingSample'
diff --git a/connectivity/network/BasicNetworking/template-params.xml b/connectivity/network/BasicNetworking/template-params.xml
deleted file mode 100644
index 3413740..0000000
--- a/connectivity/network/BasicNetworking/template-params.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicNetworking</name>
-    <group>Connectivity</group>
-    <package>com.example.android.basicnetworking</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                This sample demonstrates how to use the ConnectivityManager to determine if you have
-                a network connection, and if so, what type of connection it is.
-                \n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information
-                on the active connection, and then the connection type is printed to an on-screen console.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/build.gradle b/connectivity/network/NetworkConnect/NetworkConnect/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/AndroidManifest.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/AndroidManifest.xml
new file mode 100755
index 0000000..09fd2ee
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/AndroidManifest.xml
@@ -0,0 +1,44 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.networkconnect"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+
+    <application
+        android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample"
+        android:allowBackup="true">
+
+        <activity
+            android:name="com.example.android.networkconnect.MainActivity"
+            android:label="@string/app_name"
+            android:uiOptions="splitActionBarWhenNarrow">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/SimpleTextFragment.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/SimpleTextFragment.java
new file mode 100644
index 0000000..a2be93f
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/SimpleTextFragment.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2013 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.common;
+
+import android.os.Bundle;
+
+import android.support.v4.app.Fragment;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Simple fragment containing only a TextView. Used by TextPagerAdapter to create
+ * tutorial-style pages for apps.
+ */
+public class SimpleTextFragment extends Fragment {
+
+    // Contains the text that will be displayed by this Fragment
+    String mText;
+
+    // Contains a resource ID for the text that will be displayed by this fragment.
+    int mTextId = -1;
+
+    // Keys which will be used to store/retrieve text passed in via setArguments.
+    public static final String TEXT_KEY = "text";
+    public static final String TEXT_ID_KEY = "text_id";
+
+    // For situations where the app wants to modify text at Runtime, exposing the TextView.
+    private TextView mTextView;
+
+    public SimpleTextFragment() {
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        // Before initializing the textView, check if any arguments were provided via setArguments.
+        processArguments();
+
+        // Create a new TextView and set its text to whatever was provided.
+        mTextView = new TextView(getActivity());
+        mTextView.setGravity(Gravity.CENTER);
+
+        if (mText != null) {
+            mTextView.setText(mText);
+            Log.i("SimpleTextFragment", mText);
+        }
+        return mTextView;
+    }
+
+    public TextView getTextView() {
+        return mTextView;
+    }
+
+    /**
+     * Changes the text for this TextView, according to the resource ID provided.
+     * @param stringId A resource ID representing the text content for this Fragment's TextView.
+     */
+    public void setText(int stringId) {
+        getTextView().setText(getActivity().getString(stringId));
+    }
+
+    /**
+     * Processes the arguments passed into this Fragment via setArguments method.
+     * Currently the method only looks for text or a textID, nothing else.
+     */
+    public void processArguments() {
+        // For most objects we'd handle the multiple possibilities for initialization variables
+        // as multiple constructors.  For Fragments, however, it's customary to use
+        // setArguments / getArguments.
+        if (getArguments() != null) {
+            Bundle args = getArguments();
+            if (args.containsKey(TEXT_KEY)) {
+                mText = args.getString(TEXT_KEY);
+                Log.d("Constructor", "Added Text.");
+            } else if (args.containsKey(TEXT_ID_KEY)) {
+                mTextId = args.getInt(TEXT_ID_KEY);
+                mText = getString(mTextId);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/Log.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/Log.java
new file mode 100644
index 0000000..cf4abb7
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/Log.java
@@ -0,0 +1,236 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+/**
+ * Helper class for a list (or tree) of LoggerNodes.
+ *
+ * <p>When this is set as the head of the list,
+ * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
+ * Most of the methods in this class server only to map a method call in Log to its equivalent
+ * in LogNode.</p>
+ */
+public class Log {
+    // Grabbing the native values from Android's native logging facilities,
+    // to make for easy migration and interop.
+    public static final int NONE = -1;
+    public static final int VERBOSE = android.util.Log.VERBOSE;
+    public static final int DEBUG = android.util.Log.DEBUG;
+    public static final int INFO = android.util.Log.INFO;
+    public static final int WARN = android.util.Log.WARN;
+    public static final int ERROR = android.util.Log.ERROR;
+    public static final int ASSERT = android.util.Log.ASSERT;
+
+    // Stores the beginning of the LogNode topology.
+    private static LogNode mLogNode;
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public static LogNode getLogNode() {
+        return mLogNode;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to.
+     */
+    public static void setLogNode(LogNode node) {
+        mLogNode = node;
+    }
+
+    /**
+     * Instructs the LogNode to print the log data provided. Other LogNodes can
+     * be chained to the end of the LogNode as desired.
+     *
+     * @param priority Log level of the data being logged. Verbose, Error, etc.
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void println(int priority, String tag, String msg, Throwable tr) {
+        if (mLogNode != null) {
+            mLogNode.println(priority, tag, msg, tr);
+        }
+    }
+
+    /**
+     * Instructs the LogNode to print the log data provided. Other LogNodes can
+     * be chained to the end of the LogNode as desired.
+     *
+     * @param priority Log level of the data being logged. Verbose, Error, etc.
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     */
+    public static void println(int priority, String tag, String msg) {
+        println(priority, tag, msg, null);
+    }
+
+   /**
+     * Prints a message at VERBOSE priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void v(String tag, String msg, Throwable tr) {
+        println(VERBOSE, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at VERBOSE priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void v(String tag, String msg) {
+        v(tag, msg, null);
+    }
+
+
+    /**
+     * Prints a message at DEBUG priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void d(String tag, String msg, Throwable tr) {
+        println(DEBUG, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at DEBUG priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void d(String tag, String msg) {
+        d(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at INFO priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void i(String tag, String msg, Throwable tr) {
+        println(INFO, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at INFO priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void i(String tag, String msg) {
+        i(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void w(String tag, String msg, Throwable tr) {
+        println(WARN, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void w(String tag, String msg) {
+        w(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void w(String tag, Throwable tr) {
+        w(tag, null, tr);
+    }
+
+    /**
+     * Prints a message at ERROR priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void e(String tag, String msg, Throwable tr) {
+        println(ERROR, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at ERROR priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void e(String tag, String msg) {
+        e(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void wtf(String tag, String msg, Throwable tr) {
+        println(ASSERT, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void wtf(String tag, String msg) {
+        wtf(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void wtf(String tag, Throwable tr) {
+        wtf(tag, null, tr);
+    }
+}
\ No newline at end of file
diff --git a/common/src/java/com/example/android/common/logger/LogNode.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogNode.java
similarity index 100%
rename from common/src/java/com/example/android/common/logger/LogNode.java
rename to connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogNode.java
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogView.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogView.java
new file mode 100644
index 0000000..953b8b1
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogView.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+import android.content.Context;
+import android.util.*;
+import android.widget.TextView;
+
+/** Simple TextView which is used to output log data received through the LogNode interface.
+*/
+public class LogView extends TextView implements LogNode {
+
+    public LogView(Context context) {
+        super(context);
+    }
+
+    public LogView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public LogView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    /**
+     * Formats the log data and prints it out to the LogView.
+     * @param priority Log level of the data being logged.  Verbose, Error, etc.
+     * @param tag Tag for for the log data.  Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        String priorityStr = null;
+
+        // For the purposes of this View, we want to print the priority as readable text.
+        switch(priority) {
+            case android.util.Log.VERBOSE:
+                priorityStr = "VERBOSE";
+                break;
+            case android.util.Log.DEBUG:
+                priorityStr = "DEBUG";
+                break;
+            case android.util.Log.INFO:
+                priorityStr = "INFO";
+                break;
+            case android.util.Log.WARN:
+                priorityStr = "WARN";
+                break;
+            case android.util.Log.ERROR:
+                priorityStr = "ERROR";
+                break;
+            case android.util.Log.ASSERT:
+                priorityStr = "ASSERT";
+                break;
+            default:
+                break;
+        }
+
+        // Handily, the Log class has a facility for converting a stack trace into a usable string.
+        String exceptionStr = null;
+        if (tr != null) {
+            exceptionStr = android.util.Log.getStackTraceString(tr);
+        }
+
+        // Take the priority, tag, message, and exception, and concatenate as necessary
+        // into one usable line of text.
+        StringBuilder outputBuilder = new StringBuilder();
+
+        String delimiter = "\t";
+        appendIfNotNull(outputBuilder, priorityStr, delimiter);
+        appendIfNotNull(outputBuilder, tag, delimiter);
+        appendIfNotNull(outputBuilder, msg, delimiter);
+        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
+
+        // Actually display the text we just generated within the LogView.
+        appendToLog(outputBuilder.toString());
+
+        if (mNext != null) {
+            mNext.println(priority, tag, msg, tr);
+        }
+    }
+
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
+     * the logger takes so many arguments that might be null, this method helps cut out some of the
+     * agonizing tedium of writing the same 3 lines over and over.
+     * @param source StringBuilder containing the text to append to.
+     * @param addStr The String to append
+     * @param delimiter The String to separate the source and appended strings. A tab or comma,
+     *                  for instance.
+     * @return The fully concatenated String as a StringBuilder
+     */
+    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
+        if (addStr != null) {
+            if (addStr.length() == 0) {
+                delimiter = "";
+            }
+
+            return source.append(addStr).append(delimiter);
+        }
+        return source;
+    }
+
+    // The next LogNode in the chain.
+    LogNode mNext;
+
+    /** Outputs the string as a new line of log data in the LogView. */
+    public void appendToLog(String s) {
+        append("\n" + s);
+    }
+}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogWrapper.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogWrapper.java
new file mode 100644
index 0000000..ea8e20e
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogWrapper.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2012 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.common.logger;
+
+import android.util.Log;
+
+/**
+ * Helper class which wraps Android's native Log utility in the Logger interface.  This way
+ * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
+ */
+public class LogWrapper implements LogNode {
+
+    // For piping:  The next node to receive Log data after this one has done its work.
+    private LogNode mNext;
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to..
+     */
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+    /**
+     * Prints data out to the console using Android's native log mechanism.
+     * @param priority Log level of the data being logged.  Verbose, Error, etc.
+     * @param tag Tag for for the log data.  Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        // There actually are log methods that don't take a msg parameter.  For now,
+        // if that's the case, just convert null to the empty string and move on.
+        String useMsg = msg;
+        if (useMsg == null) {
+            useMsg = "";
+        }
+
+        // If an exeption was provided, convert that exception to a usable string and attach
+        // it to the end of the msg method.
+        if (tr != null) {
+            msg += "\n" + Log.getStackTraceString(tr);
+        }
+
+        // This is functionally identical to Log.x(tag, useMsg);
+        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
+        Log.println(priority, tag, useMsg);
+
+        // If this isn't the last node in the chain, move things along.
+        if (mNext != null) {
+            mNext.println(priority, tag, msg, tr);
+        }
+    }
+}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
new file mode 100644
index 0000000..c57a111
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+/**
+ * Simple {@link LogNode} filter, removes everything except the message.
+ * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
+ * just easy-to-read message updates as they're happening.
+ */
+public class MessageOnlyLogFilter implements LogNode {
+
+    LogNode mNext;
+
+    /**
+     * Takes the "next" LogNode as a parameter, to simplify chaining.
+     *
+     * @param next The next LogNode in the pipeline.
+     */
+    public MessageOnlyLogFilter(LogNode next) {
+        mNext = next;
+    }
+
+    public MessageOnlyLogFilter() {
+    }
+
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        if (mNext != null) {
+            getNext().println(Log.NONE, null, msg, null);
+        }
+    }
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to..
+     */
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/LogFragment.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/LogFragment.java
new file mode 100644
index 0000000..655d428
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/LogFragment.java
@@ -0,0 +1,60 @@
+package com.example.android.networkconnect;
+
+import android.support.v4.app.Fragment;
+
+import com.example.android.networkconnect.R;
+import com.example.android.common.logger.LogView;
+
+import android.os.Bundle;
+
+import android.text.Editable;
+import android.text.TextWatcher;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ScrollView;
+
+/**
+ * Simple fragment that contains a LogView and uses it to output log data it receives
+ * through the LogNode interface.
+ */
+public class LogFragment extends Fragment {
+
+  private LogView mLogView;
+
+  public LogFragment() {}
+
+  @Override
+  public View onCreateView(LayoutInflater inflater, ViewGroup container,
+          Bundle savedInstanceState) {
+
+      View result = inflater.inflate(R.layout.log_fragment, container, false);
+
+      mLogView = (LogView) result.findViewById(R.id.sample_output);
+
+      // Wire up so when the text changes, the view scrolls down.
+      final ScrollView scrollView =
+              ((ScrollView) result.findViewById(R.id.log_scroll));
+
+      mLogView.addTextChangedListener(new TextWatcher() {
+          @Override
+          public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+
+          @Override
+          public void onTextChanged(CharSequence s, int start, int before, int count) {}
+
+          @Override
+          public void afterTextChanged(Editable s) {
+              scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+          }
+      });
+
+      return result;
+  }
+
+  public LogView getLogView() {
+      return mLogView;
+  }
+
+}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/MainActivity.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/MainActivity.java
new file mode 100755
index 0000000..ae1591d
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/MainActivity.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2013 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.networkconnect;
+
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+import android.util.TypedValue;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.example.android.common.SimpleTextFragment;
+import com.example.android.common.logger.Log;
+import com.example.android.common.logger.LogWrapper;
+import com.example.android.common.logger.MessageOnlyLogFilter;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/**
+ * Sample application demonstrating how to connect to the network and fetch raw
+ * HTML. It uses AsyncTask to do the fetch on a background thread. To establish
+ * the network connection, it uses HttpURLConnection.
+ *
+ * This sample uses the logging framework to display log output in the log
+ * fragment (LogFragment).
+ */
+public class MainActivity extends FragmentActivity {
+
+    public static final String TAG = "Network Connect";
+
+    // Reference to the fragment showing events, so we can clear it with a button
+    // as necessary.
+    private LogFragment mLogFragment;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        // Initialize text fragment that displays intro text.
+        SimpleTextFragment introFragment = (SimpleTextFragment)
+                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
+        introFragment.setText(R.string.intro_message);
+        introFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
+
+        // Initialize the logging framework.
+        initializeLogging();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            // When the user clicks FETCH, fetch the first 500 characters of
+            // raw HTML from www.google.com.
+            case R.id.fetch_action:
+                new DownloadTask().execute("http://www.google.com");
+                return true;
+            // Clear the log view fragment.
+            case R.id.clear_action:
+              mLogFragment.getLogView().setText("");
+              return true;
+        }
+        return false;
+    }
+
+    /**
+     * Implementation of AsyncTask, to fetch the data in the background away from
+     * the UI thread.
+     */
+    private class DownloadTask extends AsyncTask<String, Void, String> {
+
+        @Override
+        protected String doInBackground(String... urls) {
+            try {
+                return loadFromNetwork(urls[0]);
+            } catch (IOException e) {
+              return getString(R.string.connection_error);
+            }
+        }
+
+        /**
+         * Uses the logging framework to display the output of the fetch
+         * operation in the log fragment.
+         */
+        @Override
+        protected void onPostExecute(String result) {
+          Log.i(TAG, result);
+        }
+    }
+
+    /** Initiates the fetch operation. */
+    private String loadFromNetwork(String urlString) throws IOException {
+        InputStream stream = null;
+        String str ="";
+
+        try {
+            stream = downloadUrl(urlString);
+            str = readIt(stream, 500);
+       } finally {
+           if (stream != null) {
+               stream.close();
+            }
+        }
+        return str;
+    }
+
+    /**
+     * Given a string representation of a URL, sets up a connection and gets
+     * an input stream.
+     * @param urlString A string representation of a URL.
+     * @return An InputStream retrieved from a successful HttpURLConnection.
+     * @throws IOException
+     */
+    private InputStream downloadUrl(String urlString) throws IOException {
+        // BEGIN_INCLUDE(get_inputstream)
+        URL url = new URL(urlString);
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        conn.setReadTimeout(10000 /* milliseconds */);
+        conn.setConnectTimeout(15000 /* milliseconds */);
+        conn.setRequestMethod("GET");
+        conn.setDoInput(true);
+        // Start the query
+        conn.connect();
+        InputStream stream = conn.getInputStream();
+        return stream;
+        // END_INCLUDE(get_inputstream)
+    }
+
+    /** Reads an InputStream and converts it to a String.
+     * @param stream InputStream containing HTML from targeted site.
+     * @param len Length of string that this method returns.
+     * @return String concatenated according to len parameter.
+     * @throws IOException
+     * @throws UnsupportedEncodingException
+     */
+    private String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
+        Reader reader = null;
+        reader = new InputStreamReader(stream, "UTF-8");
+        char[] buffer = new char[len];
+        reader.read(buffer);
+        return new String(buffer);
+    }
+
+    /** Create a chain of targets that will receive log data */
+    public void initializeLogging() {
+
+        // Using Log, front-end to the logging chain, emulates
+        // android.util.log method signatures.
+
+        // Wraps Android's native log framework
+        LogWrapper logWrapper = new LogWrapper();
+        Log.setLogNode(logWrapper);
+
+        // A filter that strips out everything except the message text.
+        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
+        logWrapper.setNext(msgFilter);
+
+        // On screen logging via a fragment with a TextView.
+        mLogFragment =
+                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
+        msgFilter.setNext(mLogFragment.getLogView());
+    }
+}
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml
new file mode 100755
index 0000000..f21b1ac
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright 2013 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.
+  -->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+    <fragment
+        android:name="com.example.android.common.SimpleTextFragment"
+        android:id="@+id/intro_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dp"
+        android:background="@android:color/darker_gray"/>
+    <fragment
+        android:name="com.example.android.networkconnect.LogFragment"
+        android:id="@+id/log_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+</LinearLayout>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/log_fragment.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/log_fragment.xml
new file mode 100644
index 0000000..6d79548
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/log_fragment.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/log_scroll"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <com.example.android.common.logger.LogView
+        android:id="@+id/sample_output"
+        style="@style/Log"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:focusable="true"
+        android:text=""
+        android:gravity="bottom" />
+</ScrollView>
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/menu/main.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/menu/main.xml
rename to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/menu/main.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-sw600dp/styles.xml
similarity index 100%
copy from background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml
copy to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-sw600dp/styles.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-v11/styles.xml
similarity index 100%
copy from background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml
copy to connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-v11/styles.xml
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/dimens.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..4f69897
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/dimens.xml
@@ -0,0 +1,24 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/strings.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/strings.xml
new file mode 100755
index 0000000..756f4a7
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/strings.xml
@@ -0,0 +1,27 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Network Connect</string>
+
+    <string name="intro_message">Welcome to Network Connect!
+        Click FETCH to fetch the first 500 characters of raw HTML from www.google.com.
+    </string>
+
+    <string name="fetch_text">Fetch</string>
+    <string name="clear_text">Clear</string>
+    <string name="connection_error">Connection error.</string>
+</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/styles.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/styles.xml
new file mode 100644
index 0000000..4d9bb98
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/styles.xml
@@ -0,0 +1,40 @@
+<!--
+  Copyright 2013 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 thegi License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleOutput">
+        <item name="android:padding">@dimen/margin_medium</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+    <style name="Log" parent="Widget.SampleOutput">
+        <item name="android:typeface">monospace</item>
+    </style>
+
+
+</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/.gitignore b/connectivity/network/NetworkConnect/NetworkConnectSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/proguard-project.txt b/connectivity/network/NetworkConnect/NetworkConnectSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/AndroidManifest.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 1ae29df..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.networkconnect"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-
-    <application
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/Theme.Sample"
-        android:allowBackup="true">
-
-        <activity
-            android:name="com.example.android.networkconnect.MainActivity"
-            android:label="@string/app_name"
-            android:uiOptions="splitActionBarWhenNarrow">
-
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/MainActivity.java b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/MainActivity.java
deleted file mode 100755
index 3ad4646..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/MainActivity.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright 2013 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.networkconnect;
-
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.util.TypedValue;
-import android.view.Menu;
-import android.view.MenuItem;
-
-import com.example.android.common.logger.Log;
-import com.example.android.common.logger.LogFragment;
-import com.example.android.common.logger.LogWrapper;
-import com.example.android.common.logger.MessageOnlyLogFilter;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-/**
- * Sample application demonstrating how to connect to the network and fetch raw
- * HTML. It uses AsyncTask to do the fetch on a background thread. To establish
- * the network connection, it uses HttpURLConnection.
- *
- * This sample uses the logging framework to display log output in the log
- * fragment (LogFragment).
- */
-public class MainActivity extends FragmentActivity {
-
-    public static final String TAG = "Network Connect";
-
-    // Reference to the fragment showing events, so we can clear it with a button
-    // as necessary.
-    private LogFragment mLogFragment;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        // Initialize text fragment that displays intro text.
-        SimpleTextFragment introFragment = (SimpleTextFragment)
-                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
-        introFragment.setText(R.string.welcome_message);
-        introFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
-
-        // Initialize the logging framework.
-        initializeLogging();
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.main, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            // When the user clicks FETCH, fetch the first 500 characters of
-            // raw HTML from www.google.com.
-            case R.id.fetch_action:
-                new DownloadTask().execute("http://www.google.com");
-                return true;
-            // Clear the log view fragment.
-            case R.id.clear_action:
-              mLogFragment.getLogView().setText("");
-              return true;
-        }
-        return false;
-    }
-
-    /**
-     * Implementation of AsyncTask, to fetch the data in the background away from
-     * the UI thread.
-     */
-    private class DownloadTask extends AsyncTask<String, Void, String> {
-
-        @Override
-        protected String doInBackground(String... urls) {
-            try {
-                return loadFromNetwork(urls[0]);
-            } catch (IOException e) {
-              return getString(R.string.connection_error);
-            }
-        }
-
-        /**
-         * Uses the logging framework to display the output of the fetch
-         * operation in the log fragment.
-         */
-        @Override
-        protected void onPostExecute(String result) {
-          Log.i(TAG, result);
-        }
-    }
-
-    /** Initiates the fetch operation. */
-    private String loadFromNetwork(String urlString) throws IOException {
-        InputStream stream = null;
-        String str ="";
-
-        try {
-            stream = downloadUrl(urlString);
-            str = readIt(stream, 500);
-       } finally {
-           if (stream != null) {
-               stream.close();
-            }
-        }
-        return str;
-    }
-
-    /**
-     * Given a string representation of a URL, sets up a connection and gets
-     * an input stream.
-     * @param urlString A string representation of a URL.
-     * @return An InputStream retrieved from a successful HttpURLConnection.
-     * @throws java.io.IOException
-     */
-    private InputStream downloadUrl(String urlString) throws IOException {
-        // BEGIN_INCLUDE(get_inputstream)
-        URL url = new URL(urlString);
-        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-        conn.setReadTimeout(10000 /* milliseconds */);
-        conn.setConnectTimeout(15000 /* milliseconds */);
-        conn.setRequestMethod("GET");
-        conn.setDoInput(true);
-        // Start the query
-        conn.connect();
-        InputStream stream = conn.getInputStream();
-        return stream;
-        // END_INCLUDE(get_inputstream)
-    }
-
-    /** Reads an InputStream and converts it to a String.
-     * @param stream InputStream containing HTML from targeted site.
-     * @param len Length of string that this method returns.
-     * @return String concatenated according to len parameter.
-     * @throws java.io.IOException
-     * @throws java.io.UnsupportedEncodingException
-     */
-    private String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
-        Reader reader = null;
-        reader = new InputStreamReader(stream, "UTF-8");
-        char[] buffer = new char[len];
-        reader.read(buffer);
-        return new String(buffer);
-    }
-
-    /** Create a chain of targets that will receive log data */
-    public void initializeLogging() {
-
-        // Using Log, front-end to the logging chain, emulates
-        // android.util.log method signatures.
-
-        // Wraps Android's native log framework
-        LogWrapper logWrapper = new LogWrapper();
-        Log.setLogNode(logWrapper);
-
-        // A filter that strips out everything except the message text.
-        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
-        logWrapper.setNext(msgFilter);
-
-        // On screen logging via a fragment with a TextView.
-        mLogFragment =
-                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
-        msgFilter.setNext(mLogFragment.getLogView());
-    }
-}
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
deleted file mode 100644
index 3202937..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2013 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.networkconnect;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-/**
- * Simple fragment containing only a TextView. Used by TextPagerAdapter to create
- * tutorial-style pages for apps.
- */
-public class SimpleTextFragment extends Fragment {
-
-    // Contains the text that will be displayed by this Fragment
-    String mText;
-
-    // Contains a resource ID for the text that will be displayed by this fragment.
-    int mTextId = -1;
-
-    // Keys which will be used to store/retrieve text passed in via setArguments.
-    public static final String TEXT_KEY = "text";
-    public static final String TEXT_ID_KEY = "text_id";
-
-    // For situations where the app wants to modify text at Runtime, exposing the TextView.
-    private TextView mTextView;
-
-    public SimpleTextFragment() {
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        // Before initializing the textView, check if any arguments were provided via setArguments.
-        processArguments();
-
-        // Create a new TextView and set its text to whatever was provided.
-        mTextView = new TextView(getActivity());
-        mTextView.setGravity(Gravity.CENTER);
-
-        if (mText != null) {
-            mTextView.setText(mText);
-            Log.i("SimpleTextFragment", mText);
-        }
-        return mTextView;
-    }
-
-    public TextView getTextView() {
-        return mTextView;
-    }
-
-    /**
-     * Changes the text for this TextView, according to the resource ID provided.
-     * @param stringId A resource ID representing the text content for this Fragment's TextView.
-     */
-    public void setText(int stringId) {
-        getTextView().setText(getActivity().getString(stringId));
-    }
-
-    /**
-     * Processes the arguments passed into this Fragment via setArguments method.
-     * Currently the method only looks for text or a textID, nothing else.
-     */
-    public void processArguments() {
-        // For most objects we'd handle the multiple possibilities for initialization variables
-        // as multiple constructors.  For Fragments, however, it's customary to use
-        // setArguments / getArguments.
-        if (getArguments() != null) {
-            Bundle args = getArguments();
-            if (args.containsKey(TEXT_KEY)) {
-                mText = args.getString(TEXT_KEY);
-                Log.d("Constructor", "Added Text.");
-            } else if (args.containsKey(TEXT_ID_KEY)) {
-                mTextId = args.getInt(TEXT_ID_KEY);
-                mText = getString(mTextId);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/layout/sample_main.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/layout/sample_main.xml
deleted file mode 100755
index 76fa7d7..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/layout/sample_main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  Copyright 2013 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.
-  -->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-    <fragment
-        android:name="com.example.android.networkconnect.SimpleTextFragment"
-        android:id="@+id/intro_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-    <View
-        android:layout_width="fill_parent"
-        android:layout_height="1dp"
-        android:background="@android:color/darker_gray"/>
-    <fragment
-        android:name="com.example.android.common.logger.LogFragment"
-        android:id="@+id/log_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/values/strings.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/values/strings.xml
deleted file mode 100755
index 1e7915a..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <string name="welcome_message">Welcome to Network Connect!
-        Click FETCH to fetch the first 500 characters of raw HTML from www.google.com.
-    </string>
-
-    <string name="fetch_text">Fetch</string>
-    <string name="clear_text">Clear</string>
-    <string name="connection_error">Connection error.</string>
-</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/tests/AndroidManifest.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/tests/AndroidManifest.xml
deleted file mode 100644
index 80fec80..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.networkconnect.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.networkconnect"
-            android:label="Tests for com.example.android.networkconnect" />
-
-</manifest>
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/tests/src/com/example/android/networkconnect/tests/SampleTests.java b/connectivity/network/NetworkConnect/NetworkConnectSample/tests/src/com/example/android/networkconnect/tests/SampleTests.java
deleted file mode 100644
index a554964..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnectSample/tests/src/com/example/android/networkconnect/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.networkconnect.tests;
-
-import com.example.android.networkconnect.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for NetworkConnect sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private NetworkConnectFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (NetworkConnectFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/README.txt b/connectivity/network/NetworkConnect/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/connectivity/network/NetworkConnect/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/build.gradle b/connectivity/network/NetworkConnect/build.gradle
index cca9ac3..036abc8 100644
--- a/connectivity/network/NetworkConnect/build.gradle
+++ b/connectivity/network/NetworkConnect/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/connectivity/network/NetworkConnect/buildSrc/build.gradle b/connectivity/network/NetworkConnect/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/connectivity/network/NetworkConnect/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/connectivity/network/NetworkConnect/settings.gradle b/connectivity/network/NetworkConnect/settings.gradle
index ebae091..771d665 100644
--- a/connectivity/network/NetworkConnect/settings.gradle
+++ b/connectivity/network/NetworkConnect/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'NetworkConnectSample'
+include ':NetworkConnect'
diff --git a/connectivity/network/NetworkConnect/template-params.xml b/connectivity/network/NetworkConnect/template-params.xml
deleted file mode 100644
index a1d5991..0000000
--- a/connectivity/network/NetworkConnect/template-params.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>NetworkConnect</name>
-    <group>Connectivity</group>
-    <package>com.example.android.networkconnect</package>
-
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>8</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates how to connect to the network and fetch raw HTML using
-            HttpURLConnection. AsyncTask is used to perform the fetch on a background thread.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/build.gradle b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/build.gradle
new file mode 100644
index 0000000..e802f1b
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/build.gradle
@@ -0,0 +1,15 @@
+apply plugin: 'android'
+
+repositories {
+    mavenCentral()
+}
+
+dependencies {
+    compile 'com.google.guava:guava:14.0.+'
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..385b293
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/AndroidManifest.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.network.sync.basicsyncadapter"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <!-- SyncAdapters are available in API 5 and above. We use API 7 as a baseline for samples. -->
+    <uses-sdk
+        android:minSdkVersion="7"
+        android:targetSdkVersion="17" />
+
+    <!-- Required for fetching feed data. -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <!-- Required to register a SyncStatusObserver to display a "syncing..." progress indicator. -->
+    <uses-permission android:name="android.permission.READ_SYNC_STATS"/>
+    <!-- Required to enable our SyncAdapter after it's created. -->
+    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
+    <!-- Required because we're manually creating a new account. -->
+    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
+
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+
+        <!-- Main activity, responsible for showing a list of feed entries. -->
+        <activity
+            android:name="com.example.android.network.sync.basicsyncadapter.EntryListActivity"
+            android:label="@string/app_name" >
+            <!-- This intent filter places this activity in the system's app launcher. -->
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <!-- ContentProvider to store feed data.
+
+        The "authorities" here are defined as part of a ContentProvider interface. It's used here
+        as an attachment point for the SyncAdapter. See res/xml/syncadapter.xml and
+        SyncService.java.
+
+        Since this ContentProvider is not exported, it will not be accessible outside of this app's
+        package. -->
+        <provider
+                android:name=".provider.FeedProvider"
+                android:authorities="com.example.android.network.sync.basicsyncadapter"
+                android:exported="false" />
+
+        <!-- This service implements our SyncAdapter. It needs to be exported, so that the system
+        sync framework can access it. -->
+        <service android:name=".SyncService"
+                 android:exported="true">
+            <!-- This intent filter is required. It allows the system to launch our sync service
+            as needed. -->
+            <intent-filter>
+                <action android:name="android.content.SyncAdapter" />
+            </intent-filter>
+            <!-- This points to a required XML file which describes our SyncAdapter. -->
+            <meta-data android:name="android.content.SyncAdapter"
+                       android:resource="@xml/syncadapter" />
+        </service>
+
+        <!-- This implements the account we'll use as an attachment point for our SyncAdapter. Since
+        our SyncAdapter doesn't need to authenticate the current user (it just fetches a public RSS
+        feed), this account's implementation is largely empty.
+
+        It's also possible to attach a SyncAdapter to an existing account provided by another
+        package. In that case, this element could be omitted here. -->
+        <service android:name="com.example.android.common.accounts.GenericAccountService">
+            <!-- Required filter used by the system to launch our account service. -->
+            <intent-filter>
+                <action android:name="android.accounts.AccountAuthenticator" />
+            </intent-filter>
+            <!-- This points to an XMLf ile which describes our account service. -->
+            <meta-data android:name="android.accounts.AccountAuthenticator"
+                       android:resource="@xml/authenticator" />
+        </service>
+
+</application>
+
+</manifest>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListActivity.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListActivity.java
new file mode 100644
index 0000000..cff0702
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListActivity.java
@@ -0,0 +1,16 @@
+package com.example.android.network.sync.basicsyncadapter;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+
+/**
+ * Activity for holding EntryListFragment.
+ */
+public class EntryListActivity extends FragmentActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_entry_list);
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListFragment.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListFragment.java
new file mode 100644
index 0000000..0efeb40
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListFragment.java
@@ -0,0 +1,356 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter;
+
+import android.accounts.Account;
+import android.annotation.TargetApi;
+import android.app.Activity;
+import android.content.ContentResolver;
+import android.content.Intent;
+import android.content.SyncStatusObserver;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.v4.app.ListFragment;
+import android.support.v4.app.LoaderManager;
+import android.support.v4.content.CursorLoader;
+import android.support.v4.content.Loader;
+import android.support.v4.widget.SimpleCursorAdapter;
+import android.text.format.Time;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.example.android.common.accounts.GenericAccountService;
+import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+
+/**
+ * List fragment containing a list of Atom entry objects (articles) stored in the local database.
+ *
+ * <p>Database access is mediated by a content provider, specified in
+ * {@link com.example.android.network.sync.basicsyncadapter.provider.FeedProvider}. This content
+ * provider is
+ * automatically populated by  {@link SyncService}.
+ *
+ * <p>Selecting an item from the displayed list displays the article in the default browser.
+ *
+ * <p>If the content provider doesn't return any data, then the first sync hasn't run yet. This sync
+ * adapter assumes data exists in the provider once a sync has run. If your app doesn't work like
+ * this, you should add a flag that notes if a sync has run, so you can differentiate between "no
+ * available data" and "no initial sync", and display this in the UI.
+ *
+ * <p>The ActionBar displays a "Refresh" button. When the user clicks "Refresh", the sync adapter
+ * runs immediately. An indeterminate ProgressBar element is displayed, showing that the sync is
+ * occurring.
+ */
+public class EntryListFragment extends ListFragment
+        implements LoaderManager.LoaderCallbacks<Cursor> {
+
+    private static final String TAG = "EntryListFragment";
+
+    /**
+     * Cursor adapter for controlling ListView results.
+     */
+    private SimpleCursorAdapter mAdapter;
+
+    /**
+     * Handle to a SyncObserver. The ProgressBar element is visible until the SyncObserver reports
+     * that the sync is complete.
+     *
+     * <p>This allows us to delete our SyncObserver once the application is no longer in the
+     * foreground.
+     */
+    private Object mSyncObserverHandle;
+
+    /**
+     * Options menu used to populate ActionBar.
+     */
+    private Menu mOptionsMenu;
+
+    /**
+     * Projection for querying the content provider.
+     */
+    private static final String[] PROJECTION = new String[]{
+            FeedContract.Entry._ID,
+            FeedContract.Entry.COLUMN_NAME_TITLE,
+            FeedContract.Entry.COLUMN_NAME_LINK,
+            FeedContract.Entry.COLUMN_NAME_PUBLISHED
+    };
+
+    // Column indexes. The index of a column in the Cursor is the same as its relative position in
+    // the projection.
+    /** Column index for _ID */
+    private static final int COLUMN_ID = 0;
+    /** Column index for title */
+    private static final int COLUMN_TITLE = 1;
+    /** Column index for link */
+    private static final int COLUMN_URL_STRING = 2;
+    /** Column index for published */
+    private static final int COLUMN_PUBLISHED = 3;
+
+    /**
+     * List of Cursor columns to read from when preparing an adapter to populate the ListView.
+     */
+    private static final String[] FROM_COLUMNS = new String[]{
+            FeedContract.Entry.COLUMN_NAME_TITLE,
+            FeedContract.Entry.COLUMN_NAME_PUBLISHED
+    };
+
+    /**
+     * List of Views which will be populated by Cursor data.
+     */
+    private static final int[] TO_FIELDS = new int[]{
+            android.R.id.text1,
+            android.R.id.text2};
+
+    /**
+     * Mandatory empty constructor for the fragment manager to instantiate the
+     * fragment (e.g. upon screen orientation changes).
+     */
+    public EntryListFragment() {}
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
+    /**
+     * Create SyncAccount at launch, if needed.
+     *
+     * <p>This will create a new account with the system for our application, register our
+     * {@link SyncService} with it, and establish a sync schedule.
+     */
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+
+        // Create account, if needed
+        SyncUtils.CreateSyncAccount(activity);
+    }
+
+    @Override
+    public void onViewCreated(View view, Bundle savedInstanceState) {
+        super.onViewCreated(view, savedInstanceState);
+
+        mAdapter = new SimpleCursorAdapter(
+                getActivity(),       // Current context
+                android.R.layout.simple_list_item_activated_2,  // Layout for individual rows
+                null,                // Cursor
+                FROM_COLUMNS,        // Cursor columns to use
+                TO_FIELDS,           // Layout fields to use
+                0                    // No flags
+        );
+        mAdapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
+            @Override
+            public boolean setViewValue(View view, Cursor cursor, int i) {
+                if (i == COLUMN_PUBLISHED) {
+                    // Convert timestamp to human-readable date
+                    Time t = new Time();
+                    t.set(cursor.getLong(i));
+                    ((TextView) view).setText(t.format("%Y-%m-%d %H:%M"));
+                    return true;
+                } else {
+                    // Let SimpleCursorAdapter handle other fields automatically
+                    return false;
+                }
+            }
+        });
+        setListAdapter(mAdapter);
+        setEmptyText(getText(R.string.loading));
+        getLoaderManager().initLoader(0, null, this);
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        mSyncStatusObserver.onStatusChanged(0);
+
+        // Watch for sync state changes
+        final int mask = ContentResolver.SYNC_OBSERVER_TYPE_PENDING |
+                ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE;
+        mSyncObserverHandle = ContentResolver.addStatusChangeListener(mask, mSyncStatusObserver);
+    }
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        if (mSyncObserverHandle != null) {
+            ContentResolver.removeStatusChangeListener(mSyncObserverHandle);
+            mSyncObserverHandle = null;
+        }
+    }
+
+    /**
+     * Query the content provider for data.
+     *
+     * <p>Loaders do queries in a background thread. They also provide a ContentObserver that is
+     * triggered when data in the content provider changes. When the sync adapter updates the
+     * content provider, the ContentObserver responds by resetting the loader and then reloading
+     * it.
+     */
+    @Override
+    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
+        // We only have one loader, so we can ignore the value of i.
+        // (It'll be '0', as set in onCreate().)
+        return new CursorLoader(getActivity(),  // Context
+                FeedContract.Entry.CONTENT_URI, // URI
+                PROJECTION,                // Projection
+                null,                           // Selection
+                null,                           // Selection args
+                FeedContract.Entry.COLUMN_NAME_PUBLISHED + " desc"); // Sort
+    }
+
+    /**
+     * Move the Cursor returned by the query into the ListView adapter. This refreshes the existing
+     * UI with the data in the Cursor.
+     */
+    @Override
+    public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
+        mAdapter.changeCursor(cursor);
+    }
+
+    /**
+     * Called when the ContentObserver defined for the content provider detects that data has
+     * changed. The ContentObserver resets the loader, and then re-runs the loader. In the adapter,
+     * set the Cursor value to null. This removes the reference to the Cursor, allowing it to be
+     * garbage-collected.
+     */
+    @Override
+    public void onLoaderReset(Loader<Cursor> cursorLoader) {
+        mAdapter.changeCursor(null);
+    }
+
+    /**
+     * Create the ActionBar.
+     */
+    @Override
+    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        super.onCreateOptionsMenu(menu, inflater);
+        mOptionsMenu = menu;
+        inflater.inflate(R.menu.main, menu);
+    }
+
+    /**
+     * Respond to user gestures on the ActionBar.
+     */
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            // If the user clicks the "Refresh" button.
+            case R.id.menu_refresh:
+                SyncUtils.TriggerRefresh();
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    /**
+     * Load an article in the default browser when selected by the user.
+     */
+    @Override
+    public void onListItemClick(ListView listView, View view, int position, long id) {
+        super.onListItemClick(listView, view, position, id);
+
+        // Get a URI for the selected item, then start an Activity that displays the URI. Any
+        // Activity that filters for ACTION_VIEW and a URI can accept this. In most cases, this will
+        // be a browser.
+
+        // Get the item at the selected position, in the form of a Cursor.
+        Cursor c = (Cursor) mAdapter.getItem(position);
+        // Get the link to the article represented by the item.
+        String articleUrlString = c.getString(COLUMN_URL_STRING);
+        if (articleUrlString == null) {
+            Log.e(TAG, "Attempt to launch entry with null link");
+            return;
+        }
+
+        Log.i(TAG, "Opening URL: " + articleUrlString);
+        // Get a Uri object for the URL string
+        Uri articleURL = Uri.parse(articleUrlString);
+        Intent i = new Intent(Intent.ACTION_VIEW, articleURL);
+        startActivity(i);
+    }
+
+    /**
+     * Set the state of the Refresh button. If a sync is active, turn on the ProgressBar widget.
+     * Otherwise, turn it off.
+     *
+     * @param refreshing True if an active sync is occuring, false otherwise
+     */
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+    public void setRefreshActionButtonState(boolean refreshing) {
+        if (mOptionsMenu == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
+            return;
+        }
+
+        final MenuItem refreshItem = mOptionsMenu.findItem(R.id.menu_refresh);
+        if (refreshItem != null) {
+            if (refreshing) {
+                refreshItem.setActionView(R.layout.actionbar_indeterminate_progress);
+            } else {
+                refreshItem.setActionView(null);
+            }
+        }
+    }
+
+    /**
+     * Crfate a new anonymous SyncStatusObserver. It's attached to the app's ContentResolver in
+     * onResume(), and removed in onPause(). If status changes, it sets the state of the Refresh
+     * button. If a sync is active or pending, the Refresh button is replaced by an indeterminate
+     * ProgressBar; otherwise, the button itself is displayed.
+     */
+    private SyncStatusObserver mSyncStatusObserver = new SyncStatusObserver() {
+        /** Callback invoked with the sync adapter status changes. */
+        @Override
+        public void onStatusChanged(int which) {
+            getActivity().runOnUiThread(new Runnable() {
+                /**
+                 * The SyncAdapter runs on a background thread. To update the UI, onStatusChanged()
+                 * runs on the UI thread.
+                 */
+                @Override
+                public void run() {
+                    // Create a handle to the account that was created by
+                    // SyncService.CreateSyncAccount(). This will be used to query the system to
+                    // see how the sync status has changed.
+                    Account account = GenericAccountService.GetAccount();
+                    if (account == null) {
+                        // GetAccount() returned an invalid value. This shouldn't happen, but
+                        // we'll set the status to "not refreshing".
+                        setRefreshActionButtonState(false);
+                        return;
+                    }
+
+                    // Test the ContentResolver to see if the sync adapter is active or pending.
+                    // Set the state of the refresh button accordingly.
+                    boolean syncActive = ContentResolver.isSyncActive(
+                            account, FeedContract.CONTENT_AUTHORITY);
+                    boolean syncPending = ContentResolver.isSyncPending(
+                            account, FeedContract.CONTENT_AUTHORITY);
+                    setRefreshActionButtonState(syncActive || syncPending);
+                }
+            });
+        }
+    };
+
+}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncAdapter.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncAdapter.java
new file mode 100644
index 0000000..a759adb
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncAdapter.java
@@ -0,0 +1,303 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter;
+
+import android.accounts.Account;
+import android.content.AbstractThreadedSyncAdapter;
+import android.content.ContentProviderClient;
+import android.content.ContentProviderOperation;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.OperationApplicationException;
+import android.content.SyncResult;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.util.Log;
+
+import com.example.android.network.sync.basicsyncadapter.net.FeedParser;
+import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Define a sync adapter for the app.
+ *
+ * <p>This class is instantiated in {@link SyncService}, which also binds SyncAdapter to the system.
+ * SyncAdapter should only be initialized in SyncService, never anywhere else.
+ *
+ * <p>The system calls onPerformSync() via an RPC call through the IBinder object supplied by
+ * SyncService.
+ */
+class SyncAdapter extends AbstractThreadedSyncAdapter {
+    public static final String TAG = "SyncAdapter";
+
+    /**
+     * URL to fetch content from during a sync.
+     *
+     * <p>This points to the Android Developers Blog. (Side note: We highly recommend reading the
+     * Android Developer Blog to stay up to date on the latest Android platform developments!)
+     */
+    private static final String FEED_URL = "http://android-developers.blogspot.com/atom.xml";
+
+    /**
+     * Network connection timeout, in milliseconds.
+     */
+    private static final int NET_CONNECT_TIMEOUT_MILLIS = 15000;  // 15 seconds
+
+    /**
+     * Network read timeout, in milliseconds.
+     */
+    private static final int NET_READ_TIMEOUT_MILLIS = 10000;  // 10 seconds
+
+    /**
+     * Content resolver, for performing database operations.
+     */
+    private final ContentResolver mContentResolver;
+
+    /**
+     * Project used when querying content provider. Returns all known fields.
+     */
+    private static final String[] PROJECTION = new String[] {
+            FeedContract.Entry._ID,
+            FeedContract.Entry.COLUMN_NAME_ENTRY_ID,
+            FeedContract.Entry.COLUMN_NAME_TITLE,
+            FeedContract.Entry.COLUMN_NAME_LINK,
+            FeedContract.Entry.COLUMN_NAME_PUBLISHED};
+
+    // Constants representing column positions from PROJECTION.
+    public static final int COLUMN_ID = 0;
+    public static final int COLUMN_ENTRY_ID = 1;
+    public static final int COLUMN_TITLE = 2;
+    public static final int COLUMN_LINK = 3;
+    public static final int COLUMN_PUBLISHED = 4;
+
+    /**
+     * Constructor. Obtains handle to content resolver for later use.
+     */
+    public SyncAdapter(Context context, boolean autoInitialize) {
+        super(context, autoInitialize);
+        mContentResolver = context.getContentResolver();
+    }
+
+    /**
+     * Constructor. Obtains handle to content resolver for later use.
+     */
+    public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
+        super(context, autoInitialize, allowParallelSyncs);
+        mContentResolver = context.getContentResolver();
+    }
+
+    /**
+     * Called by the Android system in response to a request to run the sync adapter. The work
+     * required to read data from the network, parse it, and store it in the content provider is
+     * done here. Extending AbstractThreadedSyncAdapter ensures that all methods within SyncAdapter
+     * run on a background thread. For this reason, blocking I/O and other long-running tasks can be
+     * run <em>in situ</em>, and you don't have to set up a separate thread for them.
+     .
+     *
+     * <p>This is where we actually perform any work required to perform a sync.
+     * {@link AbstractThreadedSyncAdapter} guarantees that this will be called on a non-UI thread,
+     * so it is safe to peform blocking I/O here.
+     *
+     * <p>The syncResult argument allows you to pass information back to the method that triggered
+     * the sync.
+     */
+    @Override
+    public void onPerformSync(Account account, Bundle extras, String authority,
+                              ContentProviderClient provider, SyncResult syncResult) {
+        Log.i(TAG, "Beginning network synchronization");
+        try {
+            final URL location = new URL(FEED_URL);
+            InputStream stream = null;
+
+            try {
+                Log.i(TAG, "Streaming data from network: " + location);
+                stream = downloadUrl(location);
+                updateLocalFeedData(stream, syncResult);
+                // Makes sure that the InputStream is closed after the app is
+                // finished using it.
+            } finally {
+                if (stream != null) {
+                    stream.close();
+                }
+            }
+        } catch (MalformedURLException e) {
+            Log.wtf(TAG, "Feed URL is malformed", e);
+            syncResult.stats.numParseExceptions++;
+            return;
+        } catch (IOException e) {
+            Log.e(TAG, "Error reading from network: " + e.toString());
+            syncResult.stats.numIoExceptions++;
+            return;
+        } catch (XmlPullParserException e) {
+            Log.e(TAG, "Error parsing feed: " + e.toString());
+            syncResult.stats.numParseExceptions++;
+            return;
+        } catch (ParseException e) {
+            Log.e(TAG, "Error parsing feed: " + e.toString());
+            syncResult.stats.numParseExceptions++;
+            return;
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error updating database: " + e.toString());
+            syncResult.databaseError = true;
+            return;
+        } catch (OperationApplicationException e) {
+            Log.e(TAG, "Error updating database: " + e.toString());
+            syncResult.databaseError = true;
+            return;
+        }
+        Log.i(TAG, "Network synchronization complete");
+    }
+
+    /**
+     * Read XML from an input stream, storing it into the content provider.
+     *
+     * <p>This is where incoming data is persisted, committing the results of a sync. In order to
+     * minimize (expensive) disk operations, we compare incoming data with what's already in our
+     * database, and compute a merge. Only changes (insert/update/delete) will result in a database
+     * write.
+     *
+     * <p>As an additional optimization, we use a batch operation to perform all database writes at
+     * once.
+     *
+     * <p>Merge strategy:
+     * 1. Get cursor to all items in feed<br/>
+     * 2. For each item, check if it's in the incoming data.<br/>
+     *    a. YES: Remove from "incoming" list. Check if data has mutated, if so, perform
+     *            database UPDATE.<br/>
+     *    b. NO: Schedule DELETE from database.<br/>
+     * (At this point, incoming database only contains missing items.)<br/>
+     * 3. For any items remaining in incoming list, ADD to database.
+     */
+    public void updateLocalFeedData(final InputStream stream, final SyncResult syncResult)
+            throws IOException, XmlPullParserException, RemoteException,
+            OperationApplicationException, ParseException {
+        final FeedParser feedParser = new FeedParser();
+        final ContentResolver contentResolver = getContext().getContentResolver();
+
+        Log.i(TAG, "Parsing stream as Atom feed");
+        final List<FeedParser.Entry> entries = feedParser.parse(stream);
+        Log.i(TAG, "Parsing complete. Found " + entries.size() + " entries");
+
+
+        ArrayList<ContentProviderOperation> batch = new ArrayList<ContentProviderOperation>();
+
+        // Build hash table of incoming entries
+        HashMap<String, FeedParser.Entry> entryMap = new HashMap<String, FeedParser.Entry>();
+        for (FeedParser.Entry e : entries) {
+            entryMap.put(e.id, e);
+        }
+
+        // Get list of all items
+        Log.i(TAG, "Fetching local entries for merge");
+        Uri uri = FeedContract.Entry.CONTENT_URI; // Get all entries
+        Cursor c = contentResolver.query(uri, PROJECTION, null, null, null);
+        assert c != null;
+        Log.i(TAG, "Found " + c.getCount() + " local entries. Computing merge solution...");
+
+        // Find stale data
+        int id;
+        String entryId;
+        String title;
+        String link;
+        long published;
+        while (c.moveToNext()) {
+            syncResult.stats.numEntries++;
+            id = c.getInt(COLUMN_ID);
+            entryId = c.getString(COLUMN_ENTRY_ID);
+            title = c.getString(COLUMN_TITLE);
+            link = c.getString(COLUMN_LINK);
+            published = c.getLong(COLUMN_PUBLISHED);
+            FeedParser.Entry match = entryMap.get(entryId);
+            if (match != null) {
+                // Entry exists. Remove from entry map to prevent insert later.
+                entryMap.remove(entryId);
+                // Check to see if the entry needs to be updated
+                Uri existingUri = FeedContract.Entry.CONTENT_URI.buildUpon()
+                        .appendPath(Integer.toString(id)).build();
+                if ((match.title != null && !match.title.equals(title)) ||
+                        (match.link != null && !match.link.equals(link)) ||
+                        (match.published != published)) {
+                    // Update existing record
+                    Log.i(TAG, "Scheduling update: " + existingUri);
+                    batch.add(ContentProviderOperation.newUpdate(existingUri)
+                            .withValue(FeedContract.Entry.COLUMN_NAME_TITLE, title)
+                            .withValue(FeedContract.Entry.COLUMN_NAME_LINK, link)
+                            .withValue(FeedContract.Entry.COLUMN_NAME_PUBLISHED, published)
+                            .build());
+                    syncResult.stats.numUpdates++;
+                } else {
+                    Log.i(TAG, "No action: " + existingUri);
+                }
+            } else {
+                // Entry doesn't exist. Remove it from the database.
+                Uri deleteUri = FeedContract.Entry.CONTENT_URI.buildUpon()
+                        .appendPath(Integer.toString(id)).build();
+                Log.i(TAG, "Scheduling delete: " + deleteUri);
+                batch.add(ContentProviderOperation.newDelete(deleteUri).build());
+                syncResult.stats.numDeletes++;
+            }
+        }
+        c.close();
+
+        // Add new items
+        for (FeedParser.Entry e : entryMap.values()) {
+            Log.i(TAG, "Scheduling insert: entry_id=" + e.id);
+            batch.add(ContentProviderOperation.newInsert(FeedContract.Entry.CONTENT_URI)
+                    .withValue(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, e.id)
+                    .withValue(FeedContract.Entry.COLUMN_NAME_TITLE, e.title)
+                    .withValue(FeedContract.Entry.COLUMN_NAME_LINK, e.link)
+                    .withValue(FeedContract.Entry.COLUMN_NAME_PUBLISHED, e.published)
+                    .build());
+            syncResult.stats.numInserts++;
+        }
+        Log.i(TAG, "Merge solution ready. Applying batch update");
+        mContentResolver.applyBatch(FeedContract.CONTENT_AUTHORITY, batch);
+        mContentResolver.notifyChange(
+                FeedContract.Entry.CONTENT_URI, // URI where data was modified
+                null,                           // No local observer
+                false);                         // IMPORTANT: Do not sync to network
+        // This sample doesn't support uploads, but if *your* code does, make sure you set
+        // syncToNetwork=false in the line above to prevent duplicate syncs.
+    }
+
+    /**
+     * Given a string representation of a URL, sets up a connection and gets an input stream.
+     */
+    private InputStream downloadUrl(final URL url) throws IOException {
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        conn.setReadTimeout(NET_READ_TIMEOUT_MILLIS /* milliseconds */);
+        conn.setConnectTimeout(NET_CONNECT_TIMEOUT_MILLIS /* milliseconds */);
+        conn.setRequestMethod("GET");
+        conn.setDoInput(true);
+        // Starts the query
+        conn.connect();
+        return conn.getInputStream();
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncService.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncService.java
new file mode 100644
index 0000000..bd92f37
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncService.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+import android.util.Log;
+
+/** Service to handle sync requests.
+ *
+ * <p>This service is invoked in response to Intents with action android.content.SyncAdapter, and
+ * returns a Binder connection to SyncAdapter.
+ *
+ * <p>For performance, only one sync adapter will be initialized within this application's context.
+ *
+ * <p>Note: The SyncService itself is not notified when a new sync occurs. It's role is to
+ * manage the lifecycle of our {@link SyncAdapter} and provide a handle to said SyncAdapter to the
+ * OS on request.
+ */
+public class SyncService extends Service {
+    private static final String TAG = "SyncService";
+
+    private static final Object sSyncAdapterLock = new Object();
+    private static SyncAdapter sSyncAdapter = null;
+
+    /**
+     * Thread-safe constructor, creates static {@link SyncAdapter} instance.
+     */
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        Log.i(TAG, "Service created");
+        synchronized (sSyncAdapterLock) {
+            if (sSyncAdapter == null) {
+                sSyncAdapter = new SyncAdapter(getApplicationContext(), true);
+            }
+        }
+    }
+
+    @Override
+    /**
+     * Logging-only destructor.
+     */
+    public void onDestroy() {
+        super.onDestroy();
+        Log.i(TAG, "Service destroyed");
+    }
+
+    /**
+     * Return Binder handle for IPC communication with {@link SyncAdapter}.
+     *
+     * <p>New sync requests will be sent directly to the SyncAdapter using this channel.
+     *
+     * @param intent Calling intent
+     * @return Binder handle for {@link SyncAdapter}
+     */
+    @Override
+    public IBinder onBind(Intent intent) {
+        return sSyncAdapter.getSyncAdapterBinder();
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncUtils.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncUtils.java
new file mode 100644
index 0000000..c6552da
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncUtils.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.os.Bundle;
+import android.preference.PreferenceManager;
+
+import com.example.android.common.accounts.GenericAccountService;
+import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+
+/**
+ * Static helper methods for working with the sync framework.
+ */
+public class SyncUtils {
+    private static final long SYNC_FREQUENCY = 60 * 60;  // 1 hour (in seconds)
+    private static final String CONTENT_AUTHORITY = FeedContract.CONTENT_AUTHORITY;
+    private static final String PREF_SETUP_COMPLETE = "setup_complete";
+
+    /**
+     * Create an entry for this application in the system account list, if it isn't already there.
+     *
+     * @param context Context
+     */
+    public static void CreateSyncAccount(Context context) {
+        boolean newAccount = false;
+        boolean setupComplete = PreferenceManager
+                .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);
+
+        // Create account, if it's missing. (Either first run, or user has deleted account.)
+        Account account = GenericAccountService.GetAccount();
+        AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
+        if (accountManager.addAccountExplicitly(account, null, null)) {
+            // Inform the system that this account supports sync
+            ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);
+            // Inform the system that this account is eligible for auto sync when the network is up
+            ContentResolver.setSyncAutomatically(account, CONTENT_AUTHORITY, true);
+            // Recommend a schedule for automatic synchronization. The system may modify this based
+            // on other scheduled syncs and network utilization.
+            ContentResolver.addPeriodicSync(
+                    account, CONTENT_AUTHORITY, new Bundle(),SYNC_FREQUENCY);
+            newAccount = true;
+        }
+
+        // Schedule an initial sync if we detect problems with either our account or our local
+        // data has been deleted. (Note that it's possible to clear app data WITHOUT affecting
+        // the account list, so wee need to check both.)
+        if (newAccount || !setupComplete) {
+            TriggerRefresh();
+            PreferenceManager.getDefaultSharedPreferences(context).edit()
+                    .putBoolean(PREF_SETUP_COMPLETE, true).commit();
+        }
+    }
+
+    /**
+     * Helper method to trigger an immediate sync ("refresh").
+     *
+     * <p>This should only be used when we need to preempt the normal sync schedule. Typically, this
+     * means the user has pressed the "refresh" button.
+     *
+     * Note that SYNC_EXTRAS_MANUAL will cause an immediate sync, without any optimization to
+     * preserve battery life. If you know new data is available (perhaps via a GCM notification),
+     * but the user is not actively waiting for that data, you should omit this flag; this will give
+     * the OS additional freedom in scheduling your sync request.
+     */
+    public static void TriggerRefresh() {
+        Bundle b = new Bundle();
+        // Disable sync backoff and ignore sync preferences. In other words...perform sync NOW!
+        b.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
+        b.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
+        ContentResolver.requestSync(
+                GenericAccountService.GetAccount(),      // Sync account
+                FeedContract.CONTENT_AUTHORITY, // Content authority
+                b);                                      // Extras
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/net/FeedParser.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/net/FeedParser.java
new file mode 100644
index 0000000..2bcbc0f
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/net/FeedParser.java
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter.net;
+
+import android.text.format.Time;
+import android.util.Xml;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class parses generic Atom feeds.
+ *
+ * <p>Given an InputStream representation of a feed, it returns a List of entries,
+ * where each list element represents a single entry (post) in the XML feed.
+ *
+ * <p>An example of an Atom feed can be found at:
+ * http://en.wikipedia.org/w/index.php?title=Atom_(standard)&oldid=560239173#Example_of_an_Atom_1.0_feed
+ */
+public class FeedParser {
+
+    // Constants indicting XML element names that we're interested in
+    private static final int TAG_ID = 1;
+    private static final int TAG_TITLE = 2;
+    private static final int TAG_PUBLISHED = 3;
+    private static final int TAG_LINK = 4;
+
+    // We don't use XML namespaces
+    private static final String ns = null;
+
+    /** Parse an Atom feed, returning a collection of Entry objects.
+     *
+     * @param in Atom feed, as a stream.
+     * @return List of {@link Entry} objects.
+     * @throws XmlPullParserException on error parsing feed.
+     * @throws IOException on I/O error.
+     */
+    public List<Entry> parse(InputStream in)
+            throws XmlPullParserException, IOException, ParseException {
+        try {
+            XmlPullParser parser = Xml.newPullParser();
+            parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
+            parser.setInput(in, null);
+            parser.nextTag();
+            return readFeed(parser);
+        } finally {
+            in.close();
+        }
+    }
+
+    /**
+     * Decode a feed attached to an XmlPullParser.
+     *
+     * @param parser Incoming XMl
+     * @return List of {@link Entry} objects.
+     * @throws XmlPullParserException on error parsing feed.
+     * @throws IOException on I/O error.
+     */
+    private List<Entry> readFeed(XmlPullParser parser)
+            throws XmlPullParserException, IOException, ParseException {
+        List<Entry> entries = new ArrayList<Entry>();
+
+        // Search for <feed> tags. These wrap the beginning/end of an Atom document.
+        //
+        // Example:
+        // <?xml version="1.0" encoding="utf-8"?>
+        // <feed xmlns="http://www.w3.org/2005/Atom">
+        // ...
+        // </feed>
+        parser.require(XmlPullParser.START_TAG, ns, "feed");
+        while (parser.next() != XmlPullParser.END_TAG) {
+            if (parser.getEventType() != XmlPullParser.START_TAG) {
+                continue;
+            }
+            String name = parser.getName();
+            // Starts by looking for the <entry> tag. This tag repeates inside of <feed> for each
+            // article in the feed.
+            //
+            // Example:
+            // <entry>
+            //   <title>Article title</title>
+            //   <link rel="alternate" type="text/html" href="http://example.com/article/1234"/>
+            //   <link rel="edit" href="http://example.com/admin/article/1234"/>
+            //   <id>urn:uuid:218AC159-7F68-4CC6-873F-22AE6017390D</id>
+            //   <published>2003-06-27T12:00:00Z</published>
+            //   <updated>2003-06-28T12:00:00Z</updated>
+            //   <summary>Article summary goes here.</summary>
+            //   <author>
+            //     <name>Rick Deckard</name>
+            //     <email>deckard@example.com</email>
+            //   </author>
+            // </entry>
+            if (name.equals("entry")) {
+                entries.add(readEntry(parser));
+            } else {
+                skip(parser);
+            }
+        }
+        return entries;
+    }
+
+    /**
+     * Parses the contents of an entry. If it encounters a title, summary, or link tag, hands them
+     * off to their respective "read" methods for processing. Otherwise, skips the tag.
+     */
+    private Entry readEntry(XmlPullParser parser)
+            throws XmlPullParserException, IOException, ParseException {
+        parser.require(XmlPullParser.START_TAG, ns, "entry");
+        String id = null;
+        String title = null;
+        String link = null;
+        long publishedOn = 0;
+
+        while (parser.next() != XmlPullParser.END_TAG) {
+            if (parser.getEventType() != XmlPullParser.START_TAG) {
+                continue;
+            }
+            String name = parser.getName();
+            if (name.equals("id")){
+                // Example: <id>urn:uuid:218AC159-7F68-4CC6-873F-22AE6017390D</id>
+                id = readTag(parser, TAG_ID);
+            } else if (name.equals("title")) {
+                // Example: <title>Article title</title>
+                title = readTag(parser, TAG_TITLE);
+            } else if (name.equals("link")) {
+                // Example: <link rel="alternate" type="text/html" href="http://example.com/article/1234"/>
+                //
+                // Multiple link types can be included. readAlternateLink() will only return
+                // non-null when reading an "alternate"-type link. Ignore other responses.
+                String tempLink = readTag(parser, TAG_LINK);
+                if (tempLink != null) {
+                    link = tempLink;
+                }
+            } else if (name.equals("published")) {
+                // Example: <published>2003-06-27T12:00:00Z</published>
+                Time t = new Time();
+                t.parse3339(readTag(parser, TAG_PUBLISHED));
+                publishedOn = t.toMillis(false);
+            } else {
+                skip(parser);
+            }
+        }
+        return new Entry(id, title, link, publishedOn);
+    }
+
+    /**
+     * Process an incoming tag and read the selected value from it.
+     */
+    private String readTag(XmlPullParser parser, int tagType)
+            throws IOException, XmlPullParserException {
+        String tag = null;
+        String endTag = null;
+
+        switch (tagType) {
+            case TAG_ID:
+                return readBasicTag(parser, "id");
+            case TAG_TITLE:
+                return readBasicTag(parser, "title");
+            case TAG_PUBLISHED:
+                return readBasicTag(parser, "published");
+            case TAG_LINK:
+                return readAlternateLink(parser);
+            default:
+                throw new IllegalArgumentException("Unknown tag type: " + tagType);
+        }
+    }
+
+    /**
+     * Reads the body of a basic XML tag, which is guaranteed not to contain any nested elements.
+     *
+     * <p>You probably want to call readTag().
+     *
+     * @param parser Current parser object
+     * @param tag XML element tag name to parse
+     * @return Body of the specified tag
+     * @throws IOException
+     * @throws XmlPullParserException
+     */
+    private String readBasicTag(XmlPullParser parser, String tag)
+            throws IOException, XmlPullParserException {
+        parser.require(XmlPullParser.START_TAG, ns, tag);
+        String result = readText(parser);
+        parser.require(XmlPullParser.END_TAG, ns, tag);
+        return result;
+    }
+
+    /**
+     * Processes link tags in the feed.
+     */
+    private String readAlternateLink(XmlPullParser parser)
+            throws IOException, XmlPullParserException {
+        String link = null;
+        parser.require(XmlPullParser.START_TAG, ns, "link");
+        String tag = parser.getName();
+        String relType = parser.getAttributeValue(null, "rel");
+        if (relType.equals("alternate")) {
+            link = parser.getAttributeValue(null, "href");
+        }
+        while (true) {
+            if (parser.nextTag() == XmlPullParser.END_TAG) break;
+            // Intentionally break; consumes any remaining sub-tags.
+        }
+        return link;
+    }
+
+    /**
+     * For the tags title and summary, extracts their text values.
+     */
+    private String readText(XmlPullParser parser) throws IOException, XmlPullParserException {
+        String result = null;
+        if (parser.next() == XmlPullParser.TEXT) {
+            result = parser.getText();
+            parser.nextTag();
+        }
+        return result;
+    }
+
+    /**
+     * Skips tags the parser isn't interested in. Uses depth to handle nested tags. i.e.,
+     * if the next tag after a START_TAG isn't a matching END_TAG, it keeps going until it
+     * finds the matching END_TAG (as indicated by the value of "depth" being 0).
+     */
+    private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {
+        if (parser.getEventType() != XmlPullParser.START_TAG) {
+            throw new IllegalStateException();
+        }
+        int depth = 1;
+        while (depth != 0) {
+            switch (parser.next()) {
+                case XmlPullParser.END_TAG:
+                    depth--;
+                    break;
+                case XmlPullParser.START_TAG:
+                    depth++;
+                    break;
+            }
+        }
+    }
+
+    /**
+     * This class represents a single entry (post) in the XML feed.
+     *
+     * <p>It includes the data members "title," "link," and "summary."
+     */
+    public static class Entry {
+        public final String id;
+        public final String title;
+        public final String link;
+        public final long published;
+
+        Entry(String id, String title, String link, long published) {
+            this.id = id;
+            this.title = title;
+            this.link = link;
+            this.published = published;
+        }
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedContract.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedContract.java
new file mode 100644
index 0000000..7bfcf7f
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedContract.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter.provider;
+
+import android.content.ContentResolver;
+import android.net.Uri;
+import android.provider.BaseColumns;
+
+/**
+ * Field and table name constants for
+ * {@link com.example.android.network.sync.basicsyncadapter.provider.FeedProvider}.
+ */
+public class FeedContract {
+    private FeedContract() {
+    }
+
+    /**
+     * Content provider authority.
+     */
+    public static final String CONTENT_AUTHORITY = "com.example.android.network.sync.basicsyncadapter";
+
+    /**
+     * Base URI. (content://com.example.android.network.sync.basicsyncadapter)
+     */
+    public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);
+
+    /**
+     * Path component for "entry"-type resources..
+     */
+    private static final String PATH_ENTRIES = "entries";
+
+    /**
+     * Columns supported by "entries" records.
+     */
+    public static class Entry implements BaseColumns {
+        /**
+         * MIME type for lists of entries.
+         */
+        public static final String CONTENT_TYPE =
+                ContentResolver.CURSOR_DIR_BASE_TYPE + "/vnd.basicsyncadapter.entries";
+        /**
+         * MIME type for individual entries.
+         */
+        public static final String CONTENT_ITEM_TYPE =
+                ContentResolver.CURSOR_ITEM_BASE_TYPE + "/vnd.basicsyncadapter.entry";
+
+        /**
+         * Fully qualified URI for "entry" resources.
+         */
+        public static final Uri CONTENT_URI =
+                BASE_CONTENT_URI.buildUpon().appendPath(PATH_ENTRIES).build();
+
+        /**
+         * Table name where records are stored for "entry" resources.
+         */
+        public static final String TABLE_NAME = "entry";
+        /**
+         * Atom ID. (Note: Not to be confused with the database primary key, which is _ID.
+         */
+        public static final String COLUMN_NAME_ENTRY_ID = "entry_id";
+        /**
+         * Article title
+         */
+        public static final String COLUMN_NAME_TITLE = "title";
+        /**
+         * Article hyperlink. Corresponds to the rel="alternate" link in the
+         * Atom spec.
+         */
+        public static final String COLUMN_NAME_LINK = "link";
+        /**
+         * Date article was published.
+         */
+        public static final String COLUMN_NAME_PUBLISHED = "published";
+    }
+}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedProvider.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedProvider.java
new file mode 100644
index 0000000..358e324
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedProvider.java
@@ -0,0 +1,252 @@
+/*
+ * Copyright 2013 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.network.sync.basicsyncadapter.provider;
+
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.content.Context;
+import android.content.UriMatcher;
+import android.database.Cursor;
+import android.database.sqlite.SQLiteDatabase;
+import android.database.sqlite.SQLiteOpenHelper;
+import android.net.Uri;
+
+import com.example.android.common.db.SelectionBuilder;
+
+public class FeedProvider extends ContentProvider {
+    FeedDatabase mDatabaseHelper;
+
+    /**
+     * Content authority for this provider.
+     */
+    private static final String AUTHORITY = FeedContract.CONTENT_AUTHORITY;
+
+    // The constants below represent individual URI routes, as IDs. Every URI pattern recognized by
+    // this ContentProvider is defined using sUriMatcher.addURI(), and associated with one of these
+    // IDs.
+    //
+    // When a incoming URI is run through sUriMatcher, it will be tested against the defined
+    // URI patterns, and the corresponding route ID will be returned.
+    /**
+     * URI ID for route: /entries
+     */
+    public static final int ROUTE_ENTRIES = 1;
+
+    /**
+     * URI ID for route: /entries/{ID}
+     */
+    public static final int ROUTE_ENTRIES_ID = 2;
+
+    /**
+     * UriMatcher, used to decode incoming URIs.
+     */
+    private static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
+    static {
+        sUriMatcher.addURI(AUTHORITY, "entries", ROUTE_ENTRIES);
+        sUriMatcher.addURI(AUTHORITY, "entries/*", ROUTE_ENTRIES_ID);
+    }
+
+    @Override
+    public boolean onCreate() {
+        mDatabaseHelper = new FeedDatabase(getContext());
+        return true;
+    }
+
+    /**
+     * Determine the mime type for entries returned by a given URI.
+     */
+    @Override
+    public String getType(Uri uri) {
+        final int match = sUriMatcher.match(uri);
+        switch (match) {
+            case ROUTE_ENTRIES:
+                return FeedContract.Entry.CONTENT_TYPE;
+            case ROUTE_ENTRIES_ID:
+                return FeedContract.Entry.CONTENT_ITEM_TYPE;
+            default:
+                throw new UnsupportedOperationException("Unknown uri: " + uri);
+        }
+    }
+
+    /**
+     * Perform a database query by URI.
+     *
+     * <p>Currently supports returning all entries (/entries) and individual entries by ID
+     * (/entries/{ID}).
+     */
+    @Override
+    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
+                        String sortOrder) {
+        SQLiteDatabase db = mDatabaseHelper.getReadableDatabase();
+        SelectionBuilder builder = new SelectionBuilder();
+        int uriMatch = sUriMatcher.match(uri);
+        switch (uriMatch) {
+            case ROUTE_ENTRIES_ID:
+                // Return a single entry, by ID.
+                String id = uri.getLastPathSegment();
+                builder.where(FeedContract.Entry._ID + "=?", id);
+            case ROUTE_ENTRIES:
+                // Return all known entries.
+                builder.table(FeedContract.Entry.TABLE_NAME)
+                       .where(selection, selectionArgs);
+                Cursor c = builder.query(db, projection, sortOrder);
+                // Note: Notification URI must be manually set here for loaders to correctly
+                // register ContentObservers.
+                Context ctx = getContext();
+                assert ctx != null;
+                c.setNotificationUri(ctx.getContentResolver(), uri);
+                return c;
+            default:
+                throw new UnsupportedOperationException("Unknown uri: " + uri);
+        }
+    }
+
+    /**
+     * Insert a new entry into the database.
+     */
+    @Override
+    public Uri insert(Uri uri, ContentValues values) {
+        final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
+        assert db != null;
+        final int match = sUriMatcher.match(uri);
+        Uri result;
+        switch (match) {
+            case ROUTE_ENTRIES:
+                long id = db.insertOrThrow(FeedContract.Entry.TABLE_NAME, null, values);
+                result = Uri.parse(FeedContract.Entry.CONTENT_URI + "/" + id);
+                break;
+            case ROUTE_ENTRIES_ID:
+                throw new UnsupportedOperationException("Insert not supported on URI: " + uri);
+            default:
+                throw new UnsupportedOperationException("Unknown uri: " + uri);
+        }
+        // Send broadcast to registered ContentObservers, to refresh UI.
+        Context ctx = getContext();
+        assert ctx != null;
+        ctx.getContentResolver().notifyChange(uri, null, false);
+        return result;
+    }
+
+    /**
+     * Delete an entry by database by URI.
+     */
+    @Override
+    public int delete(Uri uri, String selection, String[] selectionArgs) {
+        SelectionBuilder builder = new SelectionBuilder();
+        final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
+        final int match = sUriMatcher.match(uri);
+        int count;
+        switch (match) {
+            case ROUTE_ENTRIES:
+                count = builder.table(FeedContract.Entry.TABLE_NAME)
+                        .where(selection, selectionArgs)
+                        .delete(db);
+                break;
+            case ROUTE_ENTRIES_ID:
+                String id = uri.getLastPathSegment();
+                count = builder.table(FeedContract.Entry.TABLE_NAME)
+                       .where(FeedContract.Entry._ID + "=?", id)
+                       .where(selection, selectionArgs)
+                       .delete(db);
+                break;
+            default:
+                throw new UnsupportedOperationException("Unknown uri: " + uri);
+        }
+        // Send broadcast to registered ContentObservers, to refresh UI.
+        Context ctx = getContext();
+        assert ctx != null;
+        ctx.getContentResolver().notifyChange(uri, null, false);
+        return count;
+    }
+
+    /**
+     * Update an etry in the database by URI.
+     */
+    @Override
+    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+        SelectionBuilder builder = new SelectionBuilder();
+        final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
+        final int match = sUriMatcher.match(uri);
+        int count;
+        switch (match) {
+            case ROUTE_ENTRIES:
+                count = builder.table(FeedContract.Entry.TABLE_NAME)
+                        .where(selection, selectionArgs)
+                        .update(db, values);
+                break;
+            case ROUTE_ENTRIES_ID:
+                String id = uri.getLastPathSegment();
+                count = builder.table(FeedContract.Entry.TABLE_NAME)
+                        .where(FeedContract.Entry._ID + "=?", id)
+                        .where(selection, selectionArgs)
+                        .update(db, values);
+                break;
+            default:
+                throw new UnsupportedOperationException("Unknown uri: " + uri);
+        }
+        Context ctx = getContext();
+        assert ctx != null;
+        ctx.getContentResolver().notifyChange(uri, null, false);
+        return count;
+    }
+
+    /**
+     * SQLite backend for @{link FeedProvider}.
+     *
+     * Provides access to an disk-backed, SQLite datastore which is utilized by FeedProvider. This
+     * database should never be accessed by other parts of the application directly.
+     */
+    static class FeedDatabase extends SQLiteOpenHelper {
+        /** Schema version. */
+        public static final int DATABASE_VERSION = 1;
+        /** Filename for SQLite file. */
+        public static final String DATABASE_NAME = "feed.db";
+
+        private static final String TYPE_TEXT = " TEXT";
+        private static final String TYPE_INTEGER = " INTEGER";
+        private static final String COMMA_SEP = ",";
+        /** SQL statement to create "entry" table. */
+        private static final String SQL_CREATE_ENTRIES =
+                "CREATE TABLE " + FeedContract.Entry.TABLE_NAME + " (" +
+                        FeedContract.Entry._ID + " INTEGER PRIMARY KEY," +
+                        FeedContract.Entry.COLUMN_NAME_ENTRY_ID + TYPE_TEXT + COMMA_SEP +
+                        FeedContract.Entry.COLUMN_NAME_TITLE    + TYPE_TEXT + COMMA_SEP +
+                        FeedContract.Entry.COLUMN_NAME_LINK + TYPE_TEXT + COMMA_SEP +
+                        FeedContract.Entry.COLUMN_NAME_PUBLISHED + TYPE_INTEGER + ")";
+
+        /** SQL statement to drop "entry" table. */
+        private static final String SQL_DELETE_ENTRIES =
+                "DROP TABLE IF EXISTS " + FeedContract.Entry.TABLE_NAME;
+
+        public FeedDatabase(Context context) {
+            super(context, DATABASE_NAME, null, DATABASE_VERSION);
+        }
+
+        @Override
+        public void onCreate(SQLiteDatabase db) {
+            db.execSQL(SQL_CREATE_ENTRIES);
+        }
+
+        @Override
+        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+            // This database is only a cache for online data, so its upgrade policy is
+            // to simply to discard the data and start over
+            db.execSQL(SQL_DELETE_ENTRIES);
+            onCreate(db);
+        }
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_action_refresh.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_action_refresh.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/actionbar_indeterminate_progress.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/actionbar_indeterminate_progress.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/actionbar_indeterminate_progress.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/actionbar_indeterminate_progress.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/activity_entry_list.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/activity_entry_list.xml
new file mode 100644
index 0000000..6e3e2fd
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/activity_entry_list.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<fragment xmlns:android="http://schemas.android.com/apk/res/android"
+          xmlns:tools="http://schemas.android.com/tools"
+          android:id="@+id/entry_list"
+          android:name="com.example.android.network.sync.basicsyncadapter.EntryListFragment"
+          android:layout_width="match_parent"
+          android:layout_height="match_parent"
+          android:layout_marginLeft="16dp"
+          android:layout_marginRight="16dp"
+          tools:context=".EntryListActivity"
+          tools:layout="@android:layout/list_content" />
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/menu/main.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/menu/main.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/menu/main.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v11/styles.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..ff65301
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v11/styles.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v14/styles.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..a4a443a
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v14/styles.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/attrs.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/attrs.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/attrs.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/attrs.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/dimen.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/dimen.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/dimen.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/dimen.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/strings.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/strings.xml
new file mode 100644
index 0000000..0271850
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+
+<resources>
+    <string name="app_name">FeedSync Sample</string>
+    <string name="account_name">FeedSync Service</string>
+    <string name="title_entry_detail">Entry Detail</string>
+    <string name="loading">Waiting for sync...</string>
+    <string name="description_refresh">Refresh</string>
+</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/styles.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/styles.xml
new file mode 100644
index 0000000..43a8f2b
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/styles.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/authenticator.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/authenticator.xml
new file mode 100644
index 0000000..cb69a66
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/authenticator.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+
+<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
+                       android:accountType="com.example.android.network.sync.basicsyncadapter"
+                       android:icon="@drawable/ic_launcher"
+                       android:smallIcon="@drawable/ic_launcher"
+                       android:label="@string/app_name"
+        />
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/syncadapter.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/syncadapter.xml
new file mode 100644
index 0000000..0fcd6e3
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/syncadapter.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+
+<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
+              android:contentAuthority="com.example.android.network.sync.basicsyncadapter"
+              android:accountType="com.example.android.network.sync.basicsyncadapter"
+              android:userVisible="false"
+              android:supportsUploading="false"
+              android:allowParallelSyncs="false"
+              android:isAlwaysSyncable="true"
+        />
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/.gitignore b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/proguard-project.txt b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/AndroidManifest.xml
deleted file mode 100644
index dd59b06..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicsyncadapter"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!-- SyncAdapters are available in API 5 and above. We use API 7 as a baseline for samples. -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <!-- Required for fetching feed data. -->
-    <uses-permission android:name="android.permission.INTERNET"/>
-    <!-- Required to register a SyncStatusObserver to display a "syncing..." progress indicator. -->
-    <uses-permission android:name="android.permission.READ_SYNC_STATS"/>
-    <!-- Required to enable our SyncAdapter after it's created. -->
-    <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
-    <!-- Required because we're manually creating a new account. -->
-    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
-
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-
-        <!-- Main activity, responsible for showing a list of feed entries. -->
-        <activity
-            android:name=".EntryListActivity"
-            android:label="@string/app_name" >
-            <!-- This intent filter places this activity in the system's app launcher. -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-        <!-- ContentProvider to store feed data.
-
-        The "authorities" here are defined as part of a ContentProvider interface. It's used here
-        as an attachment point for the SyncAdapter. See res/xml/syncadapter.xml and
-        SyncService.java.
-
-        Since this ContentProvider is not exported, it will not be accessible outside of this app's
-        package. -->
-        <provider
-            android:name=".provider.FeedProvider"
-            android:authorities="com.example.android.basicsyncadapter"
-            android:exported="false" />
-
-        <!-- This service implements our SyncAdapter. It needs to be exported, so that the system
-        sync framework can access it. -->
-        <service android:name=".SyncService"
-            android:exported="true">
-            <!-- This intent filter is required. It allows the system to launch our sync service
-            as needed. -->
-            <intent-filter>
-                <action android:name="android.content.SyncAdapter" />
-            </intent-filter>
-            <!-- This points to a required XML file which describes our SyncAdapter. -->
-            <meta-data android:name="android.content.SyncAdapter"
-                android:resource="@xml/syncadapter" />
-        </service>
-
-        <!-- This implements the account we'll use as an attachment point for our SyncAdapter. Since
-        our SyncAdapter doesn't need to authenticate the current user (it just fetches a public RSS
-        feed), this account's implementation is largely empty.
-
-        It's also possible to attach a SyncAdapter to an existing account provided by another
-        package. In that case, this element could be omitted here. -->
-        <service android:name="com.example.android.common.accounts.GenericAccountService">
-            <!-- Required filter used by the system to launch our account service. -->
-            <intent-filter>
-                <action android:name="android.accounts.AccountAuthenticator" />
-            </intent-filter>
-            <!-- This points to an XMLf ile which describes our account service. -->
-            <meta-data android:name="android.accounts.AccountAuthenticator"
-                android:resource="@xml/authenticator" />
-        </service>
-
-    </application>
-
-</manifest>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListActivity.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListActivity.java
deleted file mode 100644
index 9d8cb77..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListActivity.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.example.android.basicsyncadapter;
-
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-
-/**
- * Activity for holding EntryListFragment.
- */
-public class EntryListActivity extends FragmentActivity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_entry_list);
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListFragment.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListFragment.java
deleted file mode 100644
index 83e240a..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListFragment.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter;
-
-import android.accounts.Account;
-import android.annotation.TargetApi;
-import android.app.Activity;
-import android.content.ContentResolver;
-import android.content.Intent;
-import android.content.SyncStatusObserver;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Bundle;
-import android.support.v4.app.ListFragment;
-import android.support.v4.app.LoaderManager;
-import android.support.v4.content.CursorLoader;
-import android.support.v4.content.Loader;
-import android.support.v4.widget.SimpleCursorAdapter;
-import android.text.format.Time;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.ListView;
-import android.widget.TextView;
-
-import com.example.android.common.accounts.GenericAccountService;
-import com.example.android.basicsyncadapter.provider.FeedContract;
-
-/**
- * List fragment containing a list of Atom entry objects (articles) stored in the local database.
- *
- * <p>Database access is mediated by a content provider, specified in
- * {@link com.example.android.basicsyncadapter.provider.FeedProvider}. This content
- * provider is
- * automatically populated by  {@link SyncService}.
- *
- * <p>Selecting an item from the displayed list displays the article in the default browser.
- *
- * <p>If the content provider doesn't return any data, then the first sync hasn't run yet. This sync
- * adapter assumes data exists in the provider once a sync has run. If your app doesn't work like
- * this, you should add a flag that notes if a sync has run, so you can differentiate between "no
- * available data" and "no initial sync", and display this in the UI.
- *
- * <p>The ActionBar displays a "Refresh" button. When the user clicks "Refresh", the sync adapter
- * runs immediately. An indeterminate ProgressBar element is displayed, showing that the sync is
- * occurring.
- */
-public class EntryListFragment extends ListFragment
-        implements LoaderManager.LoaderCallbacks<Cursor> {
-
-    private static final String TAG = "EntryListFragment";
-
-    /**
-     * Cursor adapter for controlling ListView results.
-     */
-    private SimpleCursorAdapter mAdapter;
-
-    /**
-     * Handle to a SyncObserver. The ProgressBar element is visible until the SyncObserver reports
-     * that the sync is complete.
-     *
-     * <p>This allows us to delete our SyncObserver once the application is no longer in the
-     * foreground.
-     */
-    private Object mSyncObserverHandle;
-
-    /**
-     * Options menu used to populate ActionBar.
-     */
-    private Menu mOptionsMenu;
-
-    /**
-     * Projection for querying the content provider.
-     */
-    private static final String[] PROJECTION = new String[]{
-            FeedContract.Entry._ID,
-            FeedContract.Entry.COLUMN_NAME_TITLE,
-            FeedContract.Entry.COLUMN_NAME_LINK,
-            FeedContract.Entry.COLUMN_NAME_PUBLISHED
-    };
-
-    // Column indexes. The index of a column in the Cursor is the same as its relative position in
-    // the projection.
-    /** Column index for _ID */
-    private static final int COLUMN_ID = 0;
-    /** Column index for title */
-    private static final int COLUMN_TITLE = 1;
-    /** Column index for link */
-    private static final int COLUMN_URL_STRING = 2;
-    /** Column index for published */
-    private static final int COLUMN_PUBLISHED = 3;
-
-    /**
-     * List of Cursor columns to read from when preparing an adapter to populate the ListView.
-     */
-    private static final String[] FROM_COLUMNS = new String[]{
-            FeedContract.Entry.COLUMN_NAME_TITLE,
-            FeedContract.Entry.COLUMN_NAME_PUBLISHED
-    };
-
-    /**
-     * List of Views which will be populated by Cursor data.
-     */
-    private static final int[] TO_FIELDS = new int[]{
-            android.R.id.text1,
-            android.R.id.text2};
-
-    /**
-     * Mandatory empty constructor for the fragment manager to instantiate the
-     * fragment (e.g. upon screen orientation changes).
-     */
-    public EntryListFragment() {}
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    /**
-     * Create SyncAccount at launch, if needed.
-     *
-     * <p>This will create a new account with the system for our application, register our
-     * {@link SyncService} with it, and establish a sync schedule.
-     */
-    @Override
-    public void onAttach(Activity activity) {
-        super.onAttach(activity);
-
-        // Create account, if needed
-        SyncUtils.CreateSyncAccount(activity);
-    }
-
-    @Override
-    public void onViewCreated(View view, Bundle savedInstanceState) {
-        super.onViewCreated(view, savedInstanceState);
-
-        mAdapter = new SimpleCursorAdapter(
-                getActivity(),       // Current context
-                android.R.layout.simple_list_item_activated_2,  // Layout for individual rows
-                null,                // Cursor
-                FROM_COLUMNS,        // Cursor columns to use
-                TO_FIELDS,           // Layout fields to use
-                0                    // No flags
-        );
-        mAdapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
-            @Override
-            public boolean setViewValue(View view, Cursor cursor, int i) {
-                if (i == COLUMN_PUBLISHED) {
-                    // Convert timestamp to human-readable date
-                    Time t = new Time();
-                    t.set(cursor.getLong(i));
-                    ((TextView) view).setText(t.format("%Y-%m-%d %H:%M"));
-                    return true;
-                } else {
-                    // Let SimpleCursorAdapter handle other fields automatically
-                    return false;
-                }
-            }
-        });
-        setListAdapter(mAdapter);
-        setEmptyText(getText(R.string.loading));
-        getLoaderManager().initLoader(0, null, this);
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        mSyncStatusObserver.onStatusChanged(0);
-
-        // Watch for sync state changes
-        final int mask = ContentResolver.SYNC_OBSERVER_TYPE_PENDING |
-                ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE;
-        mSyncObserverHandle = ContentResolver.addStatusChangeListener(mask, mSyncStatusObserver);
-    }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        if (mSyncObserverHandle != null) {
-            ContentResolver.removeStatusChangeListener(mSyncObserverHandle);
-            mSyncObserverHandle = null;
-        }
-    }
-
-    /**
-     * Query the content provider for data.
-     *
-     * <p>Loaders do queries in a background thread. They also provide a ContentObserver that is
-     * triggered when data in the content provider changes. When the sync adapter updates the
-     * content provider, the ContentObserver responds by resetting the loader and then reloading
-     * it.
-     */
-    @Override
-    public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
-        // We only have one loader, so we can ignore the value of i.
-        // (It'll be '0', as set in onCreate().)
-        return new CursorLoader(getActivity(),  // Context
-                FeedContract.Entry.CONTENT_URI, // URI
-                PROJECTION,                // Projection
-                null,                           // Selection
-                null,                           // Selection args
-                FeedContract.Entry.COLUMN_NAME_PUBLISHED + " desc"); // Sort
-    }
-
-    /**
-     * Move the Cursor returned by the query into the ListView adapter. This refreshes the existing
-     * UI with the data in the Cursor.
-     */
-    @Override
-    public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
-        mAdapter.changeCursor(cursor);
-    }
-
-    /**
-     * Called when the ContentObserver defined for the content provider detects that data has
-     * changed. The ContentObserver resets the loader, and then re-runs the loader. In the adapter,
-     * set the Cursor value to null. This removes the reference to the Cursor, allowing it to be
-     * garbage-collected.
-     */
-    @Override
-    public void onLoaderReset(Loader<Cursor> cursorLoader) {
-        mAdapter.changeCursor(null);
-    }
-
-    /**
-     * Create the ActionBar.
-     */
-    @Override
-    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-        super.onCreateOptionsMenu(menu, inflater);
-        mOptionsMenu = menu;
-        inflater.inflate(R.menu.main, menu);
-    }
-
-    /**
-     * Respond to user gestures on the ActionBar.
-     */
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            // If the user clicks the "Refresh" button.
-            case R.id.menu_refresh:
-                SyncUtils.TriggerRefresh();
-                return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-
-    /**
-     * Load an article in the default browser when selected by the user.
-     */
-    @Override
-    public void onListItemClick(ListView listView, View view, int position, long id) {
-        super.onListItemClick(listView, view, position, id);
-
-        // Get a URI for the selected item, then start an Activity that displays the URI. Any
-        // Activity that filters for ACTION_VIEW and a URI can accept this. In most cases, this will
-        // be a browser.
-
-        // Get the item at the selected position, in the form of a Cursor.
-        Cursor c = (Cursor) mAdapter.getItem(position);
-        // Get the link to the article represented by the item.
-        String articleUrlString = c.getString(COLUMN_URL_STRING);
-        if (articleUrlString == null) {
-            Log.e(TAG, "Attempt to launch entry with null link");
-            return;
-        }
-
-        Log.i(TAG, "Opening URL: " + articleUrlString);
-        // Get a Uri object for the URL string
-        Uri articleURL = Uri.parse(articleUrlString);
-        Intent i = new Intent(Intent.ACTION_VIEW, articleURL);
-        startActivity(i);
-    }
-
-    /**
-     * Set the state of the Refresh button. If a sync is active, turn on the ProgressBar widget.
-     * Otherwise, turn it off.
-     *
-     * @param refreshing True if an active sync is occuring, false otherwise
-     */
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    public void setRefreshActionButtonState(boolean refreshing) {
-        if (mOptionsMenu == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
-            return;
-        }
-
-        final MenuItem refreshItem = mOptionsMenu.findItem(R.id.menu_refresh);
-        if (refreshItem != null) {
-            if (refreshing) {
-                refreshItem.setActionView(R.layout.actionbar_indeterminate_progress);
-            } else {
-                refreshItem.setActionView(null);
-            }
-        }
-    }
-
-    /**
-     * Crfate a new anonymous SyncStatusObserver. It's attached to the app's ContentResolver in
-     * onResume(), and removed in onPause(). If status changes, it sets the state of the Refresh
-     * button. If a sync is active or pending, the Refresh button is replaced by an indeterminate
-     * ProgressBar; otherwise, the button itself is displayed.
-     */
-    private SyncStatusObserver mSyncStatusObserver = new SyncStatusObserver() {
-        /** Callback invoked with the sync adapter status changes. */
-        @Override
-        public void onStatusChanged(int which) {
-            getActivity().runOnUiThread(new Runnable() {
-                /**
-                 * The SyncAdapter runs on a background thread. To update the UI, onStatusChanged()
-                 * runs on the UI thread.
-                 */
-                @Override
-                public void run() {
-                    // Create a handle to the account that was created by
-                    // SyncService.CreateSyncAccount(). This will be used to query the system to
-                    // see how the sync status has changed.
-                    Account account = GenericAccountService.GetAccount(SyncUtils.ACCOUNT_TYPE);
-                    if (account == null) {
-                        // GetAccount() returned an invalid value. This shouldn't happen, but
-                        // we'll set the status to "not refreshing".
-                        setRefreshActionButtonState(false);
-                        return;
-                    }
-
-                    // Test the ContentResolver to see if the sync adapter is active or pending.
-                    // Set the state of the refresh button accordingly.
-                    boolean syncActive = ContentResolver.isSyncActive(
-                            account, FeedContract.CONTENT_AUTHORITY);
-                    boolean syncPending = ContentResolver.isSyncPending(
-                            account, FeedContract.CONTENT_AUTHORITY);
-                    setRefreshActionButtonState(syncActive || syncPending);
-                }
-            });
-        }
-    };
-
-}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncAdapter.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncAdapter.java
deleted file mode 100644
index da67107..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncAdapter.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter;
-
-import android.accounts.Account;
-import android.annotation.TargetApi;
-import android.content.AbstractThreadedSyncAdapter;
-import android.content.ContentProviderClient;
-import android.content.ContentProviderOperation;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.OperationApplicationException;
-import android.content.SyncResult;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.RemoteException;
-import android.util.Log;
-
-import com.example.android.basicsyncadapter.net.FeedParser;
-import com.example.android.basicsyncadapter.provider.FeedContract;
-
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * Define a sync adapter for the app.
- *
- * <p>This class is instantiated in {@link SyncService}, which also binds SyncAdapter to the system.
- * SyncAdapter should only be initialized in SyncService, never anywhere else.
- *
- * <p>The system calls onPerformSync() via an RPC call through the IBinder object supplied by
- * SyncService.
- */
-class SyncAdapter extends AbstractThreadedSyncAdapter {
-    public static final String TAG = "SyncAdapter";
-
-    /**
-     * URL to fetch content from during a sync.
-     *
-     * <p>This points to the Android Developers Blog. (Side note: We highly recommend reading the
-     * Android Developer Blog to stay up to date on the latest Android platform developments!)
-     */
-    private static final String FEED_URL = "http://android-developers.blogspot.com/atom.xml";
-
-    /**
-     * Network connection timeout, in milliseconds.
-     */
-    private static final int NET_CONNECT_TIMEOUT_MILLIS = 15000;  // 15 seconds
-
-    /**
-     * Network read timeout, in milliseconds.
-     */
-    private static final int NET_READ_TIMEOUT_MILLIS = 10000;  // 10 seconds
-
-    /**
-     * Content resolver, for performing database operations.
-     */
-    private final ContentResolver mContentResolver;
-
-    /**
-     * Project used when querying content provider. Returns all known fields.
-     */
-    private static final String[] PROJECTION = new String[] {
-            FeedContract.Entry._ID,
-            FeedContract.Entry.COLUMN_NAME_ENTRY_ID,
-            FeedContract.Entry.COLUMN_NAME_TITLE,
-            FeedContract.Entry.COLUMN_NAME_LINK,
-            FeedContract.Entry.COLUMN_NAME_PUBLISHED};
-
-    // Constants representing column positions from PROJECTION.
-    public static final int COLUMN_ID = 0;
-    public static final int COLUMN_ENTRY_ID = 1;
-    public static final int COLUMN_TITLE = 2;
-    public static final int COLUMN_LINK = 3;
-    public static final int COLUMN_PUBLISHED = 4;
-
-    /**
-     * Constructor. Obtains handle to content resolver for later use.
-     */
-    public SyncAdapter(Context context, boolean autoInitialize) {
-        super(context, autoInitialize);
-        mContentResolver = context.getContentResolver();
-    }
-
-    /**
-     * Constructor. Obtains handle to content resolver for later use.
-     */
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
-        super(context, autoInitialize, allowParallelSyncs);
-        mContentResolver = context.getContentResolver();
-    }
-
-    /**
-     * Called by the Android system in response to a request to run the sync adapter. The work
-     * required to read data from the network, parse it, and store it in the content provider is
-     * done here. Extending AbstractThreadedSyncAdapter ensures that all methods within SyncAdapter
-     * run on a background thread. For this reason, blocking I/O and other long-running tasks can be
-     * run <em>in situ</em>, and you don't have to set up a separate thread for them.
-     .
-     *
-     * <p>This is where we actually perform any work required to perform a sync.
-     * {@link android.content.AbstractThreadedSyncAdapter} guarantees that this will be called on a non-UI thread,
-     * so it is safe to peform blocking I/O here.
-     *
-     * <p>The syncResult argument allows you to pass information back to the method that triggered
-     * the sync.
-     */
-    @Override
-    public void onPerformSync(Account account, Bundle extras, String authority,
-                              ContentProviderClient provider, SyncResult syncResult) {
-        Log.i(TAG, "Beginning network synchronization");
-        try {
-            final URL location = new URL(FEED_URL);
-            InputStream stream = null;
-
-            try {
-                Log.i(TAG, "Streaming data from network: " + location);
-                stream = downloadUrl(location);
-                updateLocalFeedData(stream, syncResult);
-                // Makes sure that the InputStream is closed after the app is
-                // finished using it.
-            } finally {
-                if (stream != null) {
-                    stream.close();
-                }
-            }
-        } catch (MalformedURLException e) {
-            Log.e(TAG, "Feed URL is malformed", e);
-            syncResult.stats.numParseExceptions++;
-            return;
-        } catch (IOException e) {
-            Log.e(TAG, "Error reading from network: " + e.toString());
-            syncResult.stats.numIoExceptions++;
-            return;
-        } catch (XmlPullParserException e) {
-            Log.e(TAG, "Error parsing feed: " + e.toString());
-            syncResult.stats.numParseExceptions++;
-            return;
-        } catch (ParseException e) {
-            Log.e(TAG, "Error parsing feed: " + e.toString());
-            syncResult.stats.numParseExceptions++;
-            return;
-        } catch (RemoteException e) {
-            Log.e(TAG, "Error updating database: " + e.toString());
-            syncResult.databaseError = true;
-            return;
-        } catch (OperationApplicationException e) {
-            Log.e(TAG, "Error updating database: " + e.toString());
-            syncResult.databaseError = true;
-            return;
-        }
-        Log.i(TAG, "Network synchronization complete");
-    }
-
-    /**
-     * Read XML from an input stream, storing it into the content provider.
-     *
-     * <p>This is where incoming data is persisted, committing the results of a sync. In order to
-     * minimize (expensive) disk operations, we compare incoming data with what's already in our
-     * database, and compute a merge. Only changes (insert/update/delete) will result in a database
-     * write.
-     *
-     * <p>As an additional optimization, we use a batch operation to perform all database writes at
-     * once.
-     *
-     * <p>Merge strategy:
-     * 1. Get cursor to all items in feed<br/>
-     * 2. For each item, check if it's in the incoming data.<br/>
-     *    a. YES: Remove from "incoming" list. Check if data has mutated, if so, perform
-     *            database UPDATE.<br/>
-     *    b. NO: Schedule DELETE from database.<br/>
-     * (At this point, incoming database only contains missing items.)<br/>
-     * 3. For any items remaining in incoming list, ADD to database.
-     */
-    public void updateLocalFeedData(final InputStream stream, final SyncResult syncResult)
-            throws IOException, XmlPullParserException, RemoteException,
-            OperationApplicationException, ParseException {
-        final FeedParser feedParser = new FeedParser();
-        final ContentResolver contentResolver = getContext().getContentResolver();
-
-        Log.i(TAG, "Parsing stream as Atom feed");
-        final List<FeedParser.Entry> entries = feedParser.parse(stream);
-        Log.i(TAG, "Parsing complete. Found " + entries.size() + " entries");
-
-
-        ArrayList<ContentProviderOperation> batch = new ArrayList<ContentProviderOperation>();
-
-        // Build hash table of incoming entries
-        HashMap<String, FeedParser.Entry> entryMap = new HashMap<String, FeedParser.Entry>();
-        for (FeedParser.Entry e : entries) {
-            entryMap.put(e.id, e);
-        }
-
-        // Get list of all items
-        Log.i(TAG, "Fetching local entries for merge");
-        Uri uri = FeedContract.Entry.CONTENT_URI; // Get all entries
-        Cursor c = contentResolver.query(uri, PROJECTION, null, null, null);
-        assert c != null;
-        Log.i(TAG, "Found " + c.getCount() + " local entries. Computing merge solution...");
-
-        // Find stale data
-        int id;
-        String entryId;
-        String title;
-        String link;
-        long published;
-        while (c.moveToNext()) {
-            syncResult.stats.numEntries++;
-            id = c.getInt(COLUMN_ID);
-            entryId = c.getString(COLUMN_ENTRY_ID);
-            title = c.getString(COLUMN_TITLE);
-            link = c.getString(COLUMN_LINK);
-            published = c.getLong(COLUMN_PUBLISHED);
-            FeedParser.Entry match = entryMap.get(entryId);
-            if (match != null) {
-                // Entry exists. Remove from entry map to prevent insert later.
-                entryMap.remove(entryId);
-                // Check to see if the entry needs to be updated
-                Uri existingUri = FeedContract.Entry.CONTENT_URI.buildUpon()
-                        .appendPath(Integer.toString(id)).build();
-                if ((match.title != null && !match.title.equals(title)) ||
-                        (match.link != null && !match.link.equals(link)) ||
-                        (match.published != published)) {
-                    // Update existing record
-                    Log.i(TAG, "Scheduling update: " + existingUri);
-                    batch.add(ContentProviderOperation.newUpdate(existingUri)
-                            .withValue(FeedContract.Entry.COLUMN_NAME_TITLE, title)
-                            .withValue(FeedContract.Entry.COLUMN_NAME_LINK, link)
-                            .withValue(FeedContract.Entry.COLUMN_NAME_PUBLISHED, published)
-                            .build());
-                    syncResult.stats.numUpdates++;
-                } else {
-                    Log.i(TAG, "No action: " + existingUri);
-                }
-            } else {
-                // Entry doesn't exist. Remove it from the database.
-                Uri deleteUri = FeedContract.Entry.CONTENT_URI.buildUpon()
-                        .appendPath(Integer.toString(id)).build();
-                Log.i(TAG, "Scheduling delete: " + deleteUri);
-                batch.add(ContentProviderOperation.newDelete(deleteUri).build());
-                syncResult.stats.numDeletes++;
-            }
-        }
-        c.close();
-
-        // Add new items
-        for (FeedParser.Entry e : entryMap.values()) {
-            Log.i(TAG, "Scheduling insert: entry_id=" + e.id);
-            batch.add(ContentProviderOperation.newInsert(FeedContract.Entry.CONTENT_URI)
-                    .withValue(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, e.id)
-                    .withValue(FeedContract.Entry.COLUMN_NAME_TITLE, e.title)
-                    .withValue(FeedContract.Entry.COLUMN_NAME_LINK, e.link)
-                    .withValue(FeedContract.Entry.COLUMN_NAME_PUBLISHED, e.published)
-                    .build());
-            syncResult.stats.numInserts++;
-        }
-        Log.i(TAG, "Merge solution ready. Applying batch update");
-        mContentResolver.applyBatch(FeedContract.CONTENT_AUTHORITY, batch);
-        mContentResolver.notifyChange(
-                FeedContract.Entry.CONTENT_URI, // URI where data was modified
-                null,                           // No local observer
-                false);                         // IMPORTANT: Do not sync to network
-        // This sample doesn't support uploads, but if *your* code does, make sure you set
-        // syncToNetwork=false in the line above to prevent duplicate syncs.
-    }
-
-    /**
-     * Given a string representation of a URL, sets up a connection and gets an input stream.
-     */
-    private InputStream downloadUrl(final URL url) throws IOException {
-        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
-        conn.setReadTimeout(NET_READ_TIMEOUT_MILLIS /* milliseconds */);
-        conn.setConnectTimeout(NET_CONNECT_TIMEOUT_MILLIS /* milliseconds */);
-        conn.setRequestMethod("GET");
-        conn.setDoInput(true);
-        // Starts the query
-        conn.connect();
-        return conn.getInputStream();
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncService.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncService.java
deleted file mode 100644
index 41e9c03..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncService.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter;
-
-import android.app.Service;
-import android.content.Intent;
-import android.os.IBinder;
-import android.util.Log;
-
-/** Service to handle sync requests.
- *
- * <p>This service is invoked in response to Intents with action android.content.SyncAdapter, and
- * returns a Binder connection to SyncAdapter.
- *
- * <p>For performance, only one sync adapter will be initialized within this application's context.
- *
- * <p>Note: The SyncService itself is not notified when a new sync occurs. It's role is to
- * manage the lifecycle of our {@link SyncAdapter} and provide a handle to said SyncAdapter to the
- * OS on request.
- */
-public class SyncService extends Service {
-    private static final String TAG = "SyncService";
-
-    private static final Object sSyncAdapterLock = new Object();
-    private static SyncAdapter sSyncAdapter = null;
-
-    /**
-     * Thread-safe constructor, creates static {@link SyncAdapter} instance.
-     */
-    @Override
-    public void onCreate() {
-        super.onCreate();
-        Log.i(TAG, "Service created");
-        synchronized (sSyncAdapterLock) {
-            if (sSyncAdapter == null) {
-                sSyncAdapter = new SyncAdapter(getApplicationContext(), true);
-            }
-        }
-    }
-
-    @Override
-    /**
-     * Logging-only destructor.
-     */
-    public void onDestroy() {
-        super.onDestroy();
-        Log.i(TAG, "Service destroyed");
-    }
-
-    /**
-     * Return Binder handle for IPC communication with {@link SyncAdapter}.
-     *
-     * <p>New sync requests will be sent directly to the SyncAdapter using this channel.
-     *
-     * @param intent Calling intent
-     * @return Binder handle for {@link SyncAdapter}
-     */
-    @Override
-    public IBinder onBind(Intent intent) {
-        return sSyncAdapter.getSyncAdapterBinder();
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncUtils.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncUtils.java
deleted file mode 100644
index b327c72..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncUtils.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.annotation.TargetApi;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.os.Build;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-
-import com.example.android.common.accounts.GenericAccountService;
-import com.example.android.basicsyncadapter.provider.FeedContract;
-
-/**
- * Static helper methods for working with the sync framework.
- */
-public class SyncUtils {
-    private static final long SYNC_FREQUENCY = 60 * 60;  // 1 hour (in seconds)
-    private static final String CONTENT_AUTHORITY = FeedContract.CONTENT_AUTHORITY;
-    private static final String PREF_SETUP_COMPLETE = "setup_complete";
-    // Value below must match the account type specified in res/xml/syncadapter.xml
-    public static final String ACCOUNT_TYPE = "com.example.android.basicsyncadapter.account";
-
-    /**
-     * Create an entry for this application in the system account list, if it isn't already there.
-     *
-     * @param context Context
-     */
-    @TargetApi(Build.VERSION_CODES.FROYO)
-    public static void CreateSyncAccount(Context context) {
-        boolean newAccount = false;
-        boolean setupComplete = PreferenceManager
-                .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);
-
-        // Create account, if it's missing. (Either first run, or user has deleted account.)
-        Account account = GenericAccountService.GetAccount(ACCOUNT_TYPE);
-        AccountManager accountManager =
-                (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
-        if (accountManager.addAccountExplicitly(account, null, null)) {
-            // Inform the system that this account supports sync
-            ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);
-            // Inform the system that this account is eligible for auto sync when the network is up
-            ContentResolver.setSyncAutomatically(account, CONTENT_AUTHORITY, true);
-            // Recommend a schedule for automatic synchronization. The system may modify this based
-            // on other scheduled syncs and network utilization.
-            ContentResolver.addPeriodicSync(
-                    account, CONTENT_AUTHORITY, new Bundle(),SYNC_FREQUENCY);
-            newAccount = true;
-        }
-
-        // Schedule an initial sync if we detect problems with either our account or our local
-        // data has been deleted. (Note that it's possible to clear app data WITHOUT affecting
-        // the account list, so wee need to check both.)
-        if (newAccount || !setupComplete) {
-            TriggerRefresh();
-            PreferenceManager.getDefaultSharedPreferences(context).edit()
-                    .putBoolean(PREF_SETUP_COMPLETE, true).commit();
-        }
-    }
-
-    /**
-     * Helper method to trigger an immediate sync ("refresh").
-     *
-     * <p>This should only be used when we need to preempt the normal sync schedule. Typically, this
-     * means the user has pressed the "refresh" button.
-     *
-     * Note that SYNC_EXTRAS_MANUAL will cause an immediate sync, without any optimization to
-     * preserve battery life. If you know new data is available (perhaps via a GCM notification),
-     * but the user is not actively waiting for that data, you should omit this flag; this will give
-     * the OS additional freedom in scheduling your sync request.
-     */
-    public static void TriggerRefresh() {
-        Bundle b = new Bundle();
-        // Disable sync backoff and ignore sync preferences. In other words...perform sync NOW!
-        b.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
-        b.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
-        ContentResolver.requestSync(
-                GenericAccountService.GetAccount(ACCOUNT_TYPE), // Sync account
-                FeedContract.CONTENT_AUTHORITY,                 // Content authority
-                b);                                             // Extras
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/net/FeedParser.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/net/FeedParser.java
deleted file mode 100644
index a778390..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/net/FeedParser.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter.net;
-
-import android.text.format.Time;
-import android.util.Xml;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This class parses generic Atom feeds.
- *
- * <p>Given an InputStream representation of a feed, it returns a List of entries,
- * where each list element represents a single entry (post) in the XML feed.
- *
- * <p>An example of an Atom feed can be found at:
- * http://en.wikipedia.org/w/index.php?title=Atom_(standard)&oldid=560239173#Example_of_an_Atom_1.0_feed
- */
-public class FeedParser {
-
-    // Constants indicting XML element names that we're interested in
-    private static final int TAG_ID = 1;
-    private static final int TAG_TITLE = 2;
-    private static final int TAG_PUBLISHED = 3;
-    private static final int TAG_LINK = 4;
-
-    // We don't use XML namespaces
-    private static final String ns = null;
-
-    /** Parse an Atom feed, returning a collection of Entry objects.
-     *
-     * @param in Atom feed, as a stream.
-     * @return List of {@link com.example.android.basicsyncadapter.net.FeedParser.Entry} objects.
-     * @throws org.xmlpull.v1.XmlPullParserException on error parsing feed.
-     * @throws java.io.IOException on I/O error.
-     */
-    public List<Entry> parse(InputStream in)
-            throws XmlPullParserException, IOException, ParseException {
-        try {
-            XmlPullParser parser = Xml.newPullParser();
-            parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, false);
-            parser.setInput(in, null);
-            parser.nextTag();
-            return readFeed(parser);
-        } finally {
-            in.close();
-        }
-    }
-
-    /**
-     * Decode a feed attached to an XmlPullParser.
-     *
-     * @param parser Incoming XMl
-     * @return List of {@link com.example.android.basicsyncadapter.net.FeedParser.Entry} objects.
-     * @throws org.xmlpull.v1.XmlPullParserException on error parsing feed.
-     * @throws java.io.IOException on I/O error.
-     */
-    private List<Entry> readFeed(XmlPullParser parser)
-            throws XmlPullParserException, IOException, ParseException {
-        List<Entry> entries = new ArrayList<Entry>();
-
-        // Search for <feed> tags. These wrap the beginning/end of an Atom document.
-        //
-        // Example:
-        // <?xml version="1.0" encoding="utf-8"?>
-        // <feed xmlns="http://www.w3.org/2005/Atom">
-        // ...
-        // </feed>
-        parser.require(XmlPullParser.START_TAG, ns, "feed");
-        while (parser.next() != XmlPullParser.END_TAG) {
-            if (parser.getEventType() != XmlPullParser.START_TAG) {
-                continue;
-            }
-            String name = parser.getName();
-            // Starts by looking for the <entry> tag. This tag repeates inside of <feed> for each
-            // article in the feed.
-            //
-            // Example:
-            // <entry>
-            //   <title>Article title</title>
-            //   <link rel="alternate" type="text/html" href="http://example.com/article/1234"/>
-            //   <link rel="edit" href="http://example.com/admin/article/1234"/>
-            //   <id>urn:uuid:218AC159-7F68-4CC6-873F-22AE6017390D</id>
-            //   <published>2003-06-27T12:00:00Z</published>
-            //   <updated>2003-06-28T12:00:00Z</updated>
-            //   <summary>Article summary goes here.</summary>
-            //   <author>
-            //     <name>Rick Deckard</name>
-            //     <email>deckard@example.com</email>
-            //   </author>
-            // </entry>
-            if (name.equals("entry")) {
-                entries.add(readEntry(parser));
-            } else {
-                skip(parser);
-            }
-        }
-        return entries;
-    }
-
-    /**
-     * Parses the contents of an entry. If it encounters a title, summary, or link tag, hands them
-     * off to their respective "read" methods for processing. Otherwise, skips the tag.
-     */
-    private Entry readEntry(XmlPullParser parser)
-            throws XmlPullParserException, IOException, ParseException {
-        parser.require(XmlPullParser.START_TAG, ns, "entry");
-        String id = null;
-        String title = null;
-        String link = null;
-        long publishedOn = 0;
-
-        while (parser.next() != XmlPullParser.END_TAG) {
-            if (parser.getEventType() != XmlPullParser.START_TAG) {
-                continue;
-            }
-            String name = parser.getName();
-            if (name.equals("id")){
-                // Example: <id>urn:uuid:218AC159-7F68-4CC6-873F-22AE6017390D</id>
-                id = readTag(parser, TAG_ID);
-            } else if (name.equals("title")) {
-                // Example: <title>Article title</title>
-                title = readTag(parser, TAG_TITLE);
-            } else if (name.equals("link")) {
-                // Example: <link rel="alternate" type="text/html" href="http://example.com/article/1234"/>
-                //
-                // Multiple link types can be included. readAlternateLink() will only return
-                // non-null when reading an "alternate"-type link. Ignore other responses.
-                String tempLink = readTag(parser, TAG_LINK);
-                if (tempLink != null) {
-                    link = tempLink;
-                }
-            } else if (name.equals("published")) {
-                // Example: <published>2003-06-27T12:00:00Z</published>
-                Time t = new Time();
-                t.parse3339(readTag(parser, TAG_PUBLISHED));
-                publishedOn = t.toMillis(false);
-            } else {
-                skip(parser);
-            }
-        }
-        return new Entry(id, title, link, publishedOn);
-    }
-
-    /**
-     * Process an incoming tag and read the selected value from it.
-     */
-    private String readTag(XmlPullParser parser, int tagType)
-            throws IOException, XmlPullParserException {
-        String tag = null;
-        String endTag = null;
-
-        switch (tagType) {
-            case TAG_ID:
-                return readBasicTag(parser, "id");
-            case TAG_TITLE:
-                return readBasicTag(parser, "title");
-            case TAG_PUBLISHED:
-                return readBasicTag(parser, "published");
-            case TAG_LINK:
-                return readAlternateLink(parser);
-            default:
-                throw new IllegalArgumentException("Unknown tag type: " + tagType);
-        }
-    }
-
-    /**
-     * Reads the body of a basic XML tag, which is guaranteed not to contain any nested elements.
-     *
-     * <p>You probably want to call readTag().
-     *
-     * @param parser Current parser object
-     * @param tag XML element tag name to parse
-     * @return Body of the specified tag
-     * @throws java.io.IOException
-     * @throws org.xmlpull.v1.XmlPullParserException
-     */
-    private String readBasicTag(XmlPullParser parser, String tag)
-            throws IOException, XmlPullParserException {
-        parser.require(XmlPullParser.START_TAG, ns, tag);
-        String result = readText(parser);
-        parser.require(XmlPullParser.END_TAG, ns, tag);
-        return result;
-    }
-
-    /**
-     * Processes link tags in the feed.
-     */
-    private String readAlternateLink(XmlPullParser parser)
-            throws IOException, XmlPullParserException {
-        String link = null;
-        parser.require(XmlPullParser.START_TAG, ns, "link");
-        String tag = parser.getName();
-        String relType = parser.getAttributeValue(null, "rel");
-        if (relType.equals("alternate")) {
-            link = parser.getAttributeValue(null, "href");
-        }
-        while (true) {
-            if (parser.nextTag() == XmlPullParser.END_TAG) break;
-            // Intentionally break; consumes any remaining sub-tags.
-        }
-        return link;
-    }
-
-    /**
-     * For the tags title and summary, extracts their text values.
-     */
-    private String readText(XmlPullParser parser) throws IOException, XmlPullParserException {
-        String result = null;
-        if (parser.next() == XmlPullParser.TEXT) {
-            result = parser.getText();
-            parser.nextTag();
-        }
-        return result;
-    }
-
-    /**
-     * Skips tags the parser isn't interested in. Uses depth to handle nested tags. i.e.,
-     * if the next tag after a START_TAG isn't a matching END_TAG, it keeps going until it
-     * finds the matching END_TAG (as indicated by the value of "depth" being 0).
-     */
-    private void skip(XmlPullParser parser) throws XmlPullParserException, IOException {
-        if (parser.getEventType() != XmlPullParser.START_TAG) {
-            throw new IllegalStateException();
-        }
-        int depth = 1;
-        while (depth != 0) {
-            switch (parser.next()) {
-                case XmlPullParser.END_TAG:
-                    depth--;
-                    break;
-                case XmlPullParser.START_TAG:
-                    depth++;
-                    break;
-            }
-        }
-    }
-
-    /**
-     * This class represents a single entry (post) in the XML feed.
-     *
-     * <p>It includes the data members "title," "link," and "summary."
-     */
-    public static class Entry {
-        public final String id;
-        public final String title;
-        public final String link;
-        public final long published;
-
-        Entry(String id, String title, String link, long published) {
-            this.id = id;
-            this.title = title;
-            this.link = link;
-            this.published = published;
-        }
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedContract.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedContract.java
deleted file mode 100644
index e29ec48..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedContract.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter.provider;
-
-import android.content.ContentResolver;
-import android.net.Uri;
-import android.provider.BaseColumns;
-
-/**
- * Field and table name constants for
- * {@link com.example.android.basicsyncadapter.provider.FeedProvider}.
- */
-public class FeedContract {
-    private FeedContract() {
-    }
-
-    /**
-     * Content provider authority.
-     */
-    public static final String CONTENT_AUTHORITY = "com.example.android.basicsyncadapter";
-
-    /**
-     * Base URI. (content://com.example.android.basicsyncadapter)
-     */
-    public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);
-
-    /**
-     * Path component for "entry"-type resources..
-     */
-    private static final String PATH_ENTRIES = "entries";
-
-    /**
-     * Columns supported by "entries" records.
-     */
-    public static class Entry implements BaseColumns {
-        /**
-         * MIME type for lists of entries.
-         */
-        public static final String CONTENT_TYPE =
-                ContentResolver.CURSOR_DIR_BASE_TYPE + "/vnd.basicsyncadapter.entries";
-        /**
-         * MIME type for individual entries.
-         */
-        public static final String CONTENT_ITEM_TYPE =
-                ContentResolver.CURSOR_ITEM_BASE_TYPE + "/vnd.basicsyncadapter.entry";
-
-        /**
-         * Fully qualified URI for "entry" resources.
-         */
-        public static final Uri CONTENT_URI =
-                BASE_CONTENT_URI.buildUpon().appendPath(PATH_ENTRIES).build();
-
-        /**
-         * Table name where records are stored for "entry" resources.
-         */
-        public static final String TABLE_NAME = "entry";
-        /**
-         * Atom ID. (Note: Not to be confused with the database primary key, which is _ID.
-         */
-        public static final String COLUMN_NAME_ENTRY_ID = "entry_id";
-        /**
-         * Article title
-         */
-        public static final String COLUMN_NAME_TITLE = "title";
-        /**
-         * Article hyperlink. Corresponds to the rel="alternate" link in the
-         * Atom spec.
-         */
-        public static final String COLUMN_NAME_LINK = "link";
-        /**
-         * Date article was published.
-         */
-        public static final String COLUMN_NAME_PUBLISHED = "published";
-    }
-}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedProvider.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedProvider.java
deleted file mode 100644
index 80bf1d3..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedProvider.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright 2013 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.basicsyncadapter.provider;
-
-import android.content.ContentProvider;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.UriMatcher;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteDatabase;
-import android.database.sqlite.SQLiteOpenHelper;
-import android.net.Uri;
-
-import com.example.android.common.db.SelectionBuilder;
-
-public class FeedProvider extends ContentProvider {
-    FeedDatabase mDatabaseHelper;
-
-    /**
-     * Content authority for this provider.
-     */
-    private static final String AUTHORITY = FeedContract.CONTENT_AUTHORITY;
-
-    // The constants below represent individual URI routes, as IDs. Every URI pattern recognized by
-    // this ContentProvider is defined using sUriMatcher.addURI(), and associated with one of these
-    // IDs.
-    //
-    // When a incoming URI is run through sUriMatcher, it will be tested against the defined
-    // URI patterns, and the corresponding route ID will be returned.
-    /**
-     * URI ID for route: /entries
-     */
-    public static final int ROUTE_ENTRIES = 1;
-
-    /**
-     * URI ID for route: /entries/{ID}
-     */
-    public static final int ROUTE_ENTRIES_ID = 2;
-
-    /**
-     * UriMatcher, used to decode incoming URIs.
-     */
-    private static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
-    static {
-        sUriMatcher.addURI(AUTHORITY, "entries", ROUTE_ENTRIES);
-        sUriMatcher.addURI(AUTHORITY, "entries/*", ROUTE_ENTRIES_ID);
-    }
-
-    @Override
-    public boolean onCreate() {
-        mDatabaseHelper = new FeedDatabase(getContext());
-        return true;
-    }
-
-    /**
-     * Determine the mime type for entries returned by a given URI.
-     */
-    @Override
-    public String getType(Uri uri) {
-        final int match = sUriMatcher.match(uri);
-        switch (match) {
-            case ROUTE_ENTRIES:
-                return FeedContract.Entry.CONTENT_TYPE;
-            case ROUTE_ENTRIES_ID:
-                return FeedContract.Entry.CONTENT_ITEM_TYPE;
-            default:
-                throw new UnsupportedOperationException("Unknown uri: " + uri);
-        }
-    }
-
-    /**
-     * Perform a database query by URI.
-     *
-     * <p>Currently supports returning all entries (/entries) and individual entries by ID
-     * (/entries/{ID}).
-     */
-    @Override
-    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
-                        String sortOrder) {
-        SQLiteDatabase db = mDatabaseHelper.getReadableDatabase();
-        SelectionBuilder builder = new SelectionBuilder();
-        int uriMatch = sUriMatcher.match(uri);
-        switch (uriMatch) {
-            case ROUTE_ENTRIES_ID:
-                // Return a single entry, by ID.
-                String id = uri.getLastPathSegment();
-                builder.where(FeedContract.Entry._ID + "=?", id);
-            case ROUTE_ENTRIES:
-                // Return all known entries.
-                builder.table(FeedContract.Entry.TABLE_NAME)
-                       .where(selection, selectionArgs);
-                Cursor c = builder.query(db, projection, sortOrder);
-                // Note: Notification URI must be manually set here for loaders to correctly
-                // register ContentObservers.
-                Context ctx = getContext();
-                assert ctx != null;
-                c.setNotificationUri(ctx.getContentResolver(), uri);
-                return c;
-            default:
-                throw new UnsupportedOperationException("Unknown uri: " + uri);
-        }
-    }
-
-    /**
-     * Insert a new entry into the database.
-     */
-    @Override
-    public Uri insert(Uri uri, ContentValues values) {
-        final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
-        assert db != null;
-        final int match = sUriMatcher.match(uri);
-        Uri result;
-        switch (match) {
-            case ROUTE_ENTRIES:
-                long id = db.insertOrThrow(FeedContract.Entry.TABLE_NAME, null, values);
-                result = Uri.parse(FeedContract.Entry.CONTENT_URI + "/" + id);
-                break;
-            case ROUTE_ENTRIES_ID:
-                throw new UnsupportedOperationException("Insert not supported on URI: " + uri);
-            default:
-                throw new UnsupportedOperationException("Unknown uri: " + uri);
-        }
-        // Send broadcast to registered ContentObservers, to refresh UI.
-        Context ctx = getContext();
-        assert ctx != null;
-        ctx.getContentResolver().notifyChange(uri, null, false);
-        return result;
-    }
-
-    /**
-     * Delete an entry by database by URI.
-     */
-    @Override
-    public int delete(Uri uri, String selection, String[] selectionArgs) {
-        SelectionBuilder builder = new SelectionBuilder();
-        final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
-        final int match = sUriMatcher.match(uri);
-        int count;
-        switch (match) {
-            case ROUTE_ENTRIES:
-                count = builder.table(FeedContract.Entry.TABLE_NAME)
-                        .where(selection, selectionArgs)
-                        .delete(db);
-                break;
-            case ROUTE_ENTRIES_ID:
-                String id = uri.getLastPathSegment();
-                count = builder.table(FeedContract.Entry.TABLE_NAME)
-                       .where(FeedContract.Entry._ID + "=?", id)
-                       .where(selection, selectionArgs)
-                       .delete(db);
-                break;
-            default:
-                throw new UnsupportedOperationException("Unknown uri: " + uri);
-        }
-        // Send broadcast to registered ContentObservers, to refresh UI.
-        Context ctx = getContext();
-        assert ctx != null;
-        ctx.getContentResolver().notifyChange(uri, null, false);
-        return count;
-    }
-
-    /**
-     * Update an etry in the database by URI.
-     */
-    @Override
-    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
-        SelectionBuilder builder = new SelectionBuilder();
-        final SQLiteDatabase db = mDatabaseHelper.getWritableDatabase();
-        final int match = sUriMatcher.match(uri);
-        int count;
-        switch (match) {
-            case ROUTE_ENTRIES:
-                count = builder.table(FeedContract.Entry.TABLE_NAME)
-                        .where(selection, selectionArgs)
-                        .update(db, values);
-                break;
-            case ROUTE_ENTRIES_ID:
-                String id = uri.getLastPathSegment();
-                count = builder.table(FeedContract.Entry.TABLE_NAME)
-                        .where(FeedContract.Entry._ID + "=?", id)
-                        .where(selection, selectionArgs)
-                        .update(db, values);
-                break;
-            default:
-                throw new UnsupportedOperationException("Unknown uri: " + uri);
-        }
-        Context ctx = getContext();
-        assert ctx != null;
-        ctx.getContentResolver().notifyChange(uri, null, false);
-        return count;
-    }
-
-    /**
-     * SQLite backend for @{link FeedProvider}.
-     *
-     * Provides access to an disk-backed, SQLite datastore which is utilized by FeedProvider. This
-     * database should never be accessed by other parts of the application directly.
-     */
-    static class FeedDatabase extends SQLiteOpenHelper {
-        /** Schema version. */
-        public static final int DATABASE_VERSION = 1;
-        /** Filename for SQLite file. */
-        public static final String DATABASE_NAME = "feed.db";
-
-        private static final String TYPE_TEXT = " TEXT";
-        private static final String TYPE_INTEGER = " INTEGER";
-        private static final String COMMA_SEP = ",";
-        /** SQL statement to create "entry" table. */
-        private static final String SQL_CREATE_ENTRIES =
-                "CREATE TABLE " + FeedContract.Entry.TABLE_NAME + " (" +
-                        FeedContract.Entry._ID + " INTEGER PRIMARY KEY," +
-                        FeedContract.Entry.COLUMN_NAME_ENTRY_ID + TYPE_TEXT + COMMA_SEP +
-                        FeedContract.Entry.COLUMN_NAME_TITLE    + TYPE_TEXT + COMMA_SEP +
-                        FeedContract.Entry.COLUMN_NAME_LINK + TYPE_TEXT + COMMA_SEP +
-                        FeedContract.Entry.COLUMN_NAME_PUBLISHED + TYPE_INTEGER + ")";
-
-        /** SQL statement to drop "entry" table. */
-        private static final String SQL_DELETE_ENTRIES =
-                "DROP TABLE IF EXISTS " + FeedContract.Entry.TABLE_NAME;
-
-        public FeedDatabase(Context context) {
-            super(context, DATABASE_NAME, null, DATABASE_VERSION);
-        }
-
-        @Override
-        public void onCreate(SQLiteDatabase db) {
-            db.execSQL(SQL_CREATE_ENTRIES);
-        }
-
-        @Override
-        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
-            // This database is only a cache for online data, so its upgrade policy is
-            // to simply to discard the data and start over
-            db.execSQL(SQL_DELETE_ENTRIES);
-            onCreate(db);
-        }
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/activity_entry_list.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/activity_entry_list.xml
deleted file mode 100644
index 3c8c901..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/activity_entry_list.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<fragment xmlns:android="http://schemas.android.com/apk/res/android"
-          xmlns:tools="http://schemas.android.com/tools"
-          android:id="@+id/entry_list"
-          android:name="com.example.android.basicsyncadapter.EntryListFragment"
-          android:layout_width="match_parent"
-          android:layout_height="match_parent"
-          android:layout_marginLeft="16dp"
-          android:layout_marginRight="16dp"
-          tools:context=".EntryListActivity"
-          tools:layout="@android:layout/list_content" />
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/strings.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/strings.xml
deleted file mode 100644
index f4cade9..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright 2013 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.
--->
-
-<resources>
-    <string name="account_name">FeedSync Service</string>
-    <string name="title_entry_detail">Entry Detail</string>
-    <string name="loading">Waiting for sync...</string>
-    <string name="description_refresh">Refresh</string>
-</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/authenticator.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/authenticator.xml
deleted file mode 100644
index 8b96907..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/authenticator.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright 2013 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.
--->
-
-<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
-                       android:accountType="com.example.android.basicsyncadapter.account"
-                       android:icon="@drawable/ic_launcher"
-                       android:smallIcon="@drawable/ic_launcher"
-                       android:label="@string/app_name"
-        />
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/syncadapter.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/syncadapter.xml
deleted file mode 100644
index 6e12882..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/syncadapter.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright 2013 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.
--->
-
-<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
-              android:contentAuthority="com.example.android.basicsyncadapter"
-              android:accountType="com.example.android.basicsyncadapter.account"
-              android:userVisible="false"
-              android:supportsUploading="false"
-              android:allowParallelSyncs="false"
-              android:isAlwaysSyncable="true"
-        />
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/AndroidManifest.xml
deleted file mode 100644
index 44c910a..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicsyncadapter.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicsyncadapter"
-            android:label="Tests for com.example.android.basicsyncadapter" />
-
-</manifest>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/src/com/example/android/basicsyncadapter/tests/SampleTests.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/src/com/example/android/basicsyncadapter/tests/SampleTests.java
deleted file mode 100644
index 08798ba..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/src/com/example/android/basicsyncadapter/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicsyncadapter.tests;
-
-import com.example.android.basicsyncadapter.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicSyncAdapter sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicSyncAdapterFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicSyncAdapterFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/AndroidManifest.xml
new file mode 100644
index 0000000..91c9861
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.example.android.network.sync.basicsyncadapter.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+    <uses-sdk
+            android:minSdkVersion="11"
+            android:targetSdkVersion="17" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner"/>
+    </application>
+    <!--
+    This declares that this application uses the instrumentation test runner targeting
+    the package of com.android.example.FeedSyncSampleTo run the tests use the command:
+    "adb shell am instrument -w com.android.example.FeedSyncSamplests/android.test.InstrumentationTestRunner"
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="com.example.android.network.sync.basicsyncadapter"
+            android:label="Tests for com.example.android.network.sync.BasicSyncAdapter"/>
+</manifest>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/proguard-project.txt b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/SyncAdapterTest.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/SyncAdapterTest.java
new file mode 100644
index 0000000..820882d
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/SyncAdapterTest.java
@@ -0,0 +1,73 @@
+package com.example.android.network.sync.basicsyncadapter;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.OperationApplicationException;
+import android.content.SyncResult;
+import android.database.Cursor;
+import android.os.RemoteException;
+import android.test.ServiceTestCase;
+
+import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+
+public class SyncAdapterTest extends ServiceTestCase<SyncService> {
+    public SyncAdapterTest() {
+        super(SyncService.class);
+    }
+
+    public void testIncomingFeedParsed()
+            throws IOException, XmlPullParserException, RemoteException,
+            OperationApplicationException, ParseException {
+        String sampleFeed = "<?xml version=\"1.0\"?>\n" +
+                "<feed xmlns=\"http://www.w3.org/2005/Atom\">\n" +
+                " \n" +
+                "  <title>Sample Blog</title>\n" +
+                "  <link href=\"http://example.com/\"/>\n" +
+                "  <link type=\"application/atom+xml\" rel=\"self\" href=\"http://example.xom/feed.xml\"/>\n" +
+                "  <updated>2013-05-16T16:53:23-07:00</updated>\n" +
+                "  <id>http://example.com/</id>\n" +
+                "  <author>\n" +
+                "    <name>Rick Deckard</name>\n" +
+                "    <email>deckard@example.com</email>\n" +
+                "  </author>\n" +
+                "\n" +
+                "  <entry>\n" +
+                "    <id>http://example.com/2012/10/20/test-post</id>\n" +
+                "    <link type=\"text/html\" rel=\"alternate\" href=\"http://example.com/2012/10/20/test-post.html\"/>\n" +
+                "    <title>Test Post #1</title>\n" +
+                "    <published>2012-10-20T00:00:00-07:00</published>\n" +
+                "    <updated>2012-10-20T00:00:00-07:00</updated>\n" +
+                "    <author>\n" +
+                "      <name>Rick Deckard</name>\n" +
+                "      <uri>http://example.com/</uri>\n" +
+                "    </author>\n" +
+                "    <summary>This is a sample summary.</summary>\n" +
+                "    <content type=\"html\">Here's some <em>sample</em> content.</content>\n" +
+                "  </entry>\n" +
+                "</feed>\n";
+        InputStream stream = new ByteArrayInputStream(sampleFeed.getBytes());
+        SyncAdapter adapter = new SyncAdapter(getContext(), false);
+        adapter.updateLocalFeedData(stream, new SyncResult());
+
+        Context ctx = getContext();
+        assert ctx != null;
+        ContentResolver cr = ctx.getContentResolver();
+        final String[] projection = {FeedContract.Entry.COLUMN_NAME_ENTRY_ID,
+                FeedContract.Entry.COLUMN_NAME_TITLE,
+                FeedContract.Entry.COLUMN_NAME_LINK};
+        Cursor c = cr.query(FeedContract.Entry.CONTENT_URI, projection, null, null, null);
+        assert c != null;
+        assertEquals(1, c.getCount());
+        c.moveToFirst();
+        assertEquals("http://example.com/2012/10/20/test-post", c.getString(0));
+        assertEquals("Test Post #1", c.getString(1));
+        assertEquals("http://example.com/2012/10/20/test-post.html", c.getString(2));
+    }
+}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/net/FeedParserTest.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/net/FeedParserTest.java
new file mode 100644
index 0000000..0c66871
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/net/FeedParserTest.java
@@ -0,0 +1,21 @@
+package com.example.android.network.sync.basicsyncadapter.net;
+
+import junit.framework.TestCase;
+
+public class FeedParserTest extends TestCase {
+    public FeedParserTest() {
+        super();
+    }
+
+//    public void testEntriesEqualById() {
+//        FeedParser.Entry e1 = new FeedParser.Entry("alpha", "Aardvark", "Bear", "Cat");
+//        FeedParser.Entry e2 = new FeedParser.Entry("alpha", "Dog", "Elephant", "Faun");
+//        assertEquals(e1, e2);
+//    }
+//
+//    public void testEntriesHashById() {
+//        FeedParser.Entry e1 = new FeedParser.Entry("alpha", "Aardvark", "Bear", "Cat");
+//        FeedParser.Entry e2 = new FeedParser.Entry("alpha", "Dog", "Elephant", "Faun");
+//        assertEquals(e1.hashCode(), e2.hashCode());
+//    }
+}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/provider/FeedProviderTest.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/provider/FeedProviderTest.java
new file mode 100644
index 0000000..a80b5ca
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/provider/FeedProviderTest.java
@@ -0,0 +1,119 @@
+package com.example.android.network.sync.basicsyncadapter.provider;
+
+import android.content.ContentValues;
+import android.database.Cursor;
+import android.net.Uri;
+import android.test.ProviderTestCase2;
+
+public class FeedProviderTest extends ProviderTestCase2<FeedProvider>  {
+    public FeedProviderTest() {
+        super(FeedProvider.class, FeedContract.CONTENT_AUTHORITY);
+    }
+
+    public void testEntryContentUriIsSane() {
+        assertEquals(Uri.parse("content://com.example.android.network.sync.basicsyncadapter/entries"),
+                FeedContract.Entry.CONTENT_URI);
+    }
+
+    public void testCreateAndRetrieve() {
+        // Create
+        ContentValues newValues = new ContentValues();
+        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "MyTitle");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://example.com");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "MyEntryID");
+        Uri newUri = getMockContentResolver().insert(
+                FeedContract.Entry.CONTENT_URI,
+                newValues);
+
+        // Retrieve
+        String[] projection = {
+                FeedContract.Entry.COLUMN_NAME_TITLE,      // 0
+                FeedContract.Entry.COLUMN_NAME_LINK,       // 1
+                FeedContract.Entry.COLUMN_NAME_ENTRY_ID};  // 2
+        Cursor c = getMockContentResolver().query(newUri, projection, null, null, null);
+        assertEquals(1, c.getCount());
+        c.moveToFirst();
+        assertEquals("MyTitle", c.getString(0));
+        assertEquals("http://example.com", c.getString(1));
+        assertEquals("MyEntryID", c.getString(2));
+    }
+
+    public void testCreateAndQuery() {
+        // Create
+        ContentValues newValues = new ContentValues();
+        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Alpha-MyTitle");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://alpha.example.com");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Alpha-MyEntryID");
+        getMockContentResolver().insert(
+                FeedContract.Entry.CONTENT_URI,
+                newValues);
+
+        newValues = new ContentValues();
+        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Beta-MyTitle");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://beta.example.com");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Beta-MyEntryID");
+        getMockContentResolver().insert(
+                FeedContract.Entry.CONTENT_URI,
+                newValues);
+
+        // Retrieve
+        String[] projection = {
+                FeedContract.Entry.COLUMN_NAME_TITLE,      // 0
+                FeedContract.Entry.COLUMN_NAME_LINK,       // 1
+                FeedContract.Entry.COLUMN_NAME_ENTRY_ID};  // 2
+        String where = FeedContract.Entry.COLUMN_NAME_TITLE + " LIKE ?";
+        Cursor c = getMockContentResolver().query(FeedContract.Entry.CONTENT_URI, projection,
+                where, new String[] {"Alpha%"}, null);
+        assertEquals(1, c.getCount());
+        c.moveToFirst();
+        assertEquals("Alpha-MyTitle", c.getString(0));
+        assertEquals("http://alpha.example.com", c.getString(1));
+        assertEquals("Alpha-MyEntryID", c.getString(2));
+    }
+
+    public void testUpdate() {
+        // Create
+        ContentValues newValues = new ContentValues();
+        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Alpha-MyTitle");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://alpha.example.com");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Alpha-MyEntryID");
+        Uri alpha = getMockContentResolver().insert(
+                FeedContract.Entry.CONTENT_URI,
+                newValues);
+
+        newValues = new ContentValues();
+        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Beta-MyTitle");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://beta.example.com");
+        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Beta-MyEntryID");
+        Uri beta = getMockContentResolver().insert(
+                FeedContract.Entry.CONTENT_URI,
+                newValues);
+
+        // Update
+        newValues = new ContentValues();
+        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://replaced.example.com");
+        getMockContentResolver().update(alpha, newValues, null, null);
+
+        // Retrieve
+        String[] projection = {
+                FeedContract.Entry.COLUMN_NAME_TITLE,      // 0
+                FeedContract.Entry.COLUMN_NAME_LINK,       // 1
+                FeedContract.Entry.COLUMN_NAME_ENTRY_ID};  // 2
+        // Check that alpha was updated
+        Cursor c = getMockContentResolver().query(alpha, projection, null, null, null);
+        assertEquals(1, c.getCount());
+        c.moveToFirst();
+        assertEquals("Alpha-MyTitle", c.getString(0));
+        assertEquals("http://replaced.example.com", c.getString(1));
+        assertEquals("Alpha-MyEntryID", c.getString(2));
+
+        // ...and that beta was not
+        c = getMockContentResolver().query(beta, projection, null, null, null);
+        assertEquals(1, c.getCount());
+        c.moveToFirst();
+        assertEquals("Beta-MyTitle", c.getString(0));
+        assertEquals("http://beta.example.com", c.getString(1));
+        assertEquals("Beta-MyEntryID", c.getString(2));
+    }
+
+}
diff --git a/connectivity/sync/BasicSyncAdapter/README.txt b/connectivity/sync/BasicSyncAdapter/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/build.gradle b/connectivity/sync/BasicSyncAdapter/build.gradle
index cca9ac3..495c503 100644
--- a/connectivity/sync/BasicSyncAdapter/build.gradle
+++ b/connectivity/sync/BasicSyncAdapter/build.gradle
@@ -1,10 +1 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
diff --git a/connectivity/sync/BasicSyncAdapter/buildSrc/build.gradle b/connectivity/sync/BasicSyncAdapter/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/connectivity/sync/BasicSyncAdapter/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties b/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..055ba6f 100644
--- a/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,5 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/connectivity/sync/BasicSyncAdapter/settings.gradle b/connectivity/sync/BasicSyncAdapter/settings.gradle
index a691e9e..5f2be67 100644
--- a/connectivity/sync/BasicSyncAdapter/settings.gradle
+++ b/connectivity/sync/BasicSyncAdapter/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicSyncAdapterSample'
+include ':BasicSyncAdapter'
diff --git a/connectivity/sync/BasicSyncAdapter/template-params.xml b/connectivity/sync/BasicSyncAdapter/template-params.xml
deleted file mode 100644
index 7fba138..0000000
--- a/connectivity/sync/BasicSyncAdapter/template-params.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicSyncAdapter</name>
-    <group>Connectivity</group>
-    <package>com.example.android.basicsyncadapter</package>
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>7</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates using SyncAdapter to fetch background data for an app that
-            doesn\'t require a user-visible account type or 2-way synchronization.
-
-            \n\nThis sample periodically downloads the feed from the Android Developer Blog and
-            caches the data in a content provider. At runtime, the cached feed data is displayed
-            inside a ListView.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="accounts"/>
-    <common src="db"/>
-    <common src="logger"/>
-</sample>
diff --git a/content/LoaderCursor/loadercursor.jd b/content/LoaderCursor/loadercursor.jd
new file mode 100644
index 0000000..dba0a0f
--- /dev/null
+++ b/content/LoaderCursor/loadercursor.jd
@@ -0,0 +1,14 @@
+page.title=LoaderCursor Sample
+@jd:body
+
+<p>This sample demonstrates the use of the 
+<pre><a href="http://developer.android.com/reference/android/app/LoaderManager.html">LoaderManager
+</a></pre> to retrieve data from a 
+<pre><a href="http://developer.android.com/reference/android/database/Cursor.html">Cursor</a></pre>
+.</p>
+
+<p>Here, a list of contacts is displayed in a 
+<pre><a href="http://developer.android.com/reference/android/app/ListFragment.html">ListFragment
+</a></pre> and filtered using a 
+<pre><a href="http://developer.android.com/reference/android/widget/SearchView.html">SearchView
+</a></pre> ActionBar item.</p>
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/BasicContactables/build.gradle b/content/contacts/BasicContactables/BasicContactables/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/AndroidManifest.xml b/content/contacts/BasicContactables/BasicContactables/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..b008e84
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/AndroidManifest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.basiccontactables"
+    android:versionCode="1"
+    android:versionName="1.0" >
+    
+    <!-- BEGIN_INCLUDE(contacts_permission) -->
+    <uses-permission android:name="android.permission.READ_CONTACTS"/>
+    <!-- END_INCLUDE(contacts_permission) -->
+    <uses-sdk
+        android:minSdkVersion="18"
+        android:targetSdkVersion="18" />
+    <permission android:name="android"></permission>
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/Theme.Sample" >
+        <activity
+            android:name="com.example.android.basiccontactables.MainActivity"
+            android:label="@string/app_name"
+            android:launchMode="singleTop">
+            <meta-data 
+                android:name="android.app.searchable"
+                android:resource="@xml/searchable" />
+            <intent-filter>
+                <action android:name="android.intent.action.SEARCH" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java b/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
new file mode 100644
index 0000000..c583dac
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2012 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.basiccontactables;
+
+import android.app.Activity;
+import android.app.LoaderManager;
+import android.content.Context;
+import android.content.CursorLoader;
+import android.content.Loader;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract;
+import android.provider.ContactsContract.CommonDataKinds;
+import android.util.Log;
+import android.widget.TextView;
+
+/**
+ * Helper class to handle all the callbacks that occur when interacting with loaders.  Most of the
+ * interesting code in this sample app will be in this file.
+ */
+public class ContactablesLoaderCallbacks implements LoaderManager.LoaderCallbacks<Cursor> {
+
+    Context mContext;
+
+    public static final String QUERY_KEY = "query";
+
+    public static final String TAG = "ContactablesLoaderCallbacks";
+
+    public ContactablesLoaderCallbacks(Context context) {
+        mContext = context;
+    }
+
+    @Override
+    public Loader<Cursor> onCreateLoader(int loaderIndex, Bundle args) {
+        // Where the Contactables table excels is matching text queries,
+        // not just data dumps from Contacts db.  One search term is used to query
+        // display name, email address and phone number.  In this case, the query was extracted
+        // from an incoming intent in the handleIntent() method, via the
+        // intent.getStringExtra() method.
+
+        // BEGIN_INCLUDE(uri_with_query)
+        String query = args.getString(QUERY_KEY);
+        Uri uri = Uri.withAppendedPath(
+                ContactsContract.CommonDataKinds.Contactables.CONTENT_FILTER_URI, query);
+        // END_INCLUDE(uri_with_query)
+
+
+        // BEGIN_INCLUDE(cursor_loader)
+        // Easy way to limit the query to contacts with phone numbers.
+        String selection =
+                ContactsContract.CommonDataKinds.Contactables.HAS_PHONE_NUMBER + " = " + 1;
+
+        // Sort results such that rows for the same contact stay together.
+        String sortBy = ContactsContract.CommonDataKinds.Contactables.LOOKUP_KEY;
+
+        return new CursorLoader(
+                mContext,  // Context
+                uri,       // URI representing the table/resource to be queried
+                null,      // projection - the list of columns to return.  Null means "all"
+                selection, // selection - Which rows to return (condition rows must match)
+                null,      // selection args - can be provided separately and subbed into selection.
+                sortBy);   // string specifying sort order
+        // END_INCLUDE(cursor_loader)
+    }
+
+    @Override
+    public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) {
+        TextView tv  = (TextView) ((Activity)mContext).findViewById(R.id.sample_output);
+
+        // Reset text in case of a previous query
+        tv.setText(mContext.getText(R.string.intro_message) + "\n\n");
+
+        if (cursor.getCount() == 0) {
+            return;
+        }
+
+        // Pulling the relevant value from the cursor requires knowing the column index to pull
+        // it from.
+        // BEGIN_INCLUDE(get_columns)
+        int phoneColumnIndex = cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER);
+        int emailColumnIndex = cursor.getColumnIndex(CommonDataKinds.Email.ADDRESS);
+        int nameColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.DISPLAY_NAME);
+        int lookupColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.LOOKUP_KEY);
+        int typeColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.MIMETYPE);
+        // END_INCLUDE(get_columns)
+
+        cursor.moveToFirst();
+        // Lookup key is the easiest way to verify a row of data is for the same
+        // contact as the previous row.
+        String lookupKey = "";
+        do {
+            // BEGIN_INCLUDE(lookup_key)
+            String currentLookupKey = cursor.getString(lookupColumnIndex);
+            if (!lookupKey.equals(currentLookupKey)) {
+                String displayName = cursor.getString(nameColumnIndex);
+                tv.append(displayName + "\n");
+                lookupKey = currentLookupKey;
+            }
+            // END_INCLUDE(lookup_key)
+
+            // BEGIN_INCLUDE(retrieve_data)
+            // The data type can be determined using the mime type column.
+            String mimeType = cursor.getString(typeColumnIndex);
+            if (mimeType.equals(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
+                tv.append("\tPhone Number: " + cursor.getString(phoneColumnIndex) + "\n");
+            } else if (mimeType.equals(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {
+                tv.append("\tEmail Address: " + cursor.getString(emailColumnIndex) + "\n");
+            }
+            // END_INCLUDE(retrieve_data)
+
+            // Look at DDMS to see all the columns returned by a query to Contactables.
+            // Behold, the firehose!
+            for(String column : cursor.getColumnNames()) {
+                Log.d(TAG, column + column + ": " +
+                        cursor.getString(cursor.getColumnIndex(column)) + "\n");
+            }
+        } while (cursor.moveToNext());
+    }
+
+    @Override
+    public void onLoaderReset(Loader<Cursor> cursorLoader) {
+    }
+}
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/MainActivity.java b/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/MainActivity.java
new file mode 100644
index 0000000..9448ada
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/MainActivity.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2012 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.basiccontactables;
+
+import android.app.Activity;
+import android.app.SearchManager;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.Menu;
+import android.widget.SearchView;
+
+/**
+ * Simple one-activity app that takes a search term via the Action Bar
+ * and uses it as a query to search the contacts database via the Contactables
+ * table.
+ */
+public class MainActivity extends Activity {
+
+    public static final int CONTACT_QUERY_LOADER = 0;
+    public static final String QUERY_KEY = "query";
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        if (getIntent() != null) {
+            handleIntent(getIntent());
+        }
+    }
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        handleIntent(intent);
+    }
+
+    /**
+     * Assuming this activity was started with a new intent, process the incoming information and
+     * react accordingly.
+     * @param intent
+     */
+    private void handleIntent(Intent intent) {
+        // Special processing of the incoming intent only occurs if the if the action specified
+        // by the intent is ACTION_SEARCH.
+        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
+            // SearchManager.QUERY is the key that a SearchManager will use to send a query string
+            // to an Activity.
+            String query = intent.getStringExtra(SearchManager.QUERY);
+
+            // We need to create a bundle containing the query string to send along to the
+            // LoaderManager, which will be handling querying the database and returning results.
+            Bundle bundle = new Bundle();
+            bundle.putString(QUERY_KEY, query);
+
+            ContactablesLoaderCallbacks loaderCallbacks = new ContactablesLoaderCallbacks(this);
+
+            // Start the loader with the new query, and an object that will handle all callbacks.
+            getLoaderManager().restartLoader(CONTACT_QUERY_LOADER, bundle, loaderCallbacks);
+        }
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.main, menu);
+
+        // Associate searchable configuration with the SearchView
+        SearchManager searchManager =
+                (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+        SearchView searchView =
+                (SearchView) menu.findItem(R.id.search).getActionView();
+        searchView.setSearchableInfo(
+                searchManager.getSearchableInfo(getComponentName()));
+
+        return true;
+    }
+}
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-hdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_search_api_holo_light.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_search_api_holo_light.png
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_search_api_holo_light.png
rename to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-mdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_search_api_holo_light.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_search_api_holo_light.png
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_search_api_holo_light.png
rename to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png
rename to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/layout/sample_main.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/layout/activity_main.xml
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactablesSample/src/main/res/layout/sample_main.xml
rename to content/contacts/BasicContactables/BasicContactables/src/main/res/layout/activity_main.xml
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/menu/main.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/menu/main.xml
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactablesSample/src/main/res/menu/main.xml
rename to content/contacts/BasicContactables/BasicContactables/src/main/res/menu/main.xml
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/dimens.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..886b05f
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,4 @@
+<resources>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/styles.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..2bbb45f
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/styles.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <style name="Widget.SampleOutput">
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/margin_huge</item>
+        <item name="android:paddingRight">@dimen/margin_huge</item>
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
+    </style>
+
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml
copy to content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-v11/styles.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..2ba754c
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-v11/styles.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+</resources>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/dimens.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..a83b995
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/dimens.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_tiny">4dp</dimen>
+    <dimen name="margin_small">8dp</dimen>
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_large">32dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+</resources>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/strings.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/strings.xml
new file mode 100755
index 0000000..31ceceb
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/strings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Basic Contactables Query</string>
+    <string name="intro_message">Welcome to <b>Basic Contactables Query</b>!\n\n
+        Use the search box to enter a term, and find matching contacts in
+        Android\'s contact database!
+    </string>
+    <string name="sample_action">Sample action</string>
+    <string name="search_title">Search Contacts</string>
+</resources>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/styles.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/styles.xml
new file mode 100644
index 0000000..1c0e5aa
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/styles.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleOutput">
+        <item name="android:padding">@dimen/margin_medium</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+</resources>
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/xml/searchable.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/xml/searchable.xml
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactablesSample/src/main/res/xml/searchable.xml
rename to content/contacts/BasicContactables/BasicContactables/src/main/res/xml/searchable.xml
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/.gitignore b/content/contacts/BasicContactables/BasicContactablesSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/proguard-project.txt b/content/contacts/BasicContactables/BasicContactablesSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/AndroidManifest.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 62b9812..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basiccontactables"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <!-- BEGIN_INCLUDE(contacts_permission) -->
-    <uses-permission android:name="android.permission.READ_CONTACTS"/>
-    <!-- END_INCLUDE(contacts_permission) -->
-    <uses-sdk
-        android:minSdkVersion="18"
-        android:targetSdkVersion="18" />
-    <permission android:name="android"></permission>
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.Sample" >
-        <activity
-            android:name="com.example.android.basiccontactables.MainActivity"
-            android:label="@string/app_name"
-            android:launchMode="singleTop">
-            <meta-data
-                android:name="android.app.searchable"
-                android:resource="@xml/searchable" />
-            <intent-filter>
-                <action android:name="android.intent.action.SEARCH" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java b/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
deleted file mode 100644
index 4fc4da7..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2012 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.basiccontactables;
-
-import android.app.Activity;
-import android.app.LoaderManager;
-import android.content.Context;
-import android.content.CursorLoader;
-import android.content.Loader;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.ContactsContract.CommonDataKinds;
-import android.util.Log;
-import android.widget.TextView;
-
-/**
- * Helper class to handle all the callbacks that occur when interacting with loaders.  Most of the
- * interesting code in this sample app will be in this file.
- */
-public class ContactablesLoaderCallbacks implements LoaderManager.LoaderCallbacks<Cursor> {
-
-    Context mContext;
-
-    public static final String QUERY_KEY = "query";
-
-    public static final String TAG = "ContactablesLoaderCallbacks";
-
-    public ContactablesLoaderCallbacks(Context context) {
-        mContext = context;
-    }
-
-    @Override
-    public Loader<Cursor> onCreateLoader(int loaderIndex, Bundle args) {
-        // Where the Contactables table excels is matching text queries,
-        // not just data dumps from Contacts db.  One search term is used to query
-        // display name, email address and phone number.  In this case, the query was extracted
-        // from an incoming intent in the handleIntent() method, via the
-        // intent.getStringExtra() method.
-
-        // BEGIN_INCLUDE(uri_with_query)
-        String query = args.getString(QUERY_KEY);
-        Uri uri = Uri.withAppendedPath(
-                CommonDataKinds.Contactables.CONTENT_FILTER_URI, query);
-        // END_INCLUDE(uri_with_query)
-
-
-        // BEGIN_INCLUDE(cursor_loader)
-        // Easy way to limit the query to contacts with phone numbers.
-        String selection =
-                CommonDataKinds.Contactables.HAS_PHONE_NUMBER + " = " + 1;
-
-        // Sort results such that rows for the same contact stay together.
-        String sortBy = CommonDataKinds.Contactables.LOOKUP_KEY;
-
-        return new CursorLoader(
-                mContext,  // Context
-                uri,       // URI representing the table/resource to be queried
-                null,      // projection - the list of columns to return.  Null means "all"
-                selection, // selection - Which rows to return (condition rows must match)
-                null,      // selection args - can be provided separately and subbed into selection.
-                sortBy);   // string specifying sort order
-        // END_INCLUDE(cursor_loader)
-    }
-
-    @Override
-    public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) {
-        TextView tv  = (TextView) ((Activity)mContext).findViewById(R.id.sample_output);
-        if(tv == null) {
-            Log.e(TAG, "TextView is null?!");
-        } else if (mContext == null) {
-            Log.e(TAG, "Context is null?");
-        } else {
-            Log.e(TAG, "Nothing is null?!");
-        }
-
-        // Reset text in case of a previous query
-        tv.setText(mContext.getText(R.string.intro_message) + "\n\n");
-
-        if (cursor.getCount() == 0) {
-            return;
-        }
-
-        // Pulling the relevant value from the cursor requires knowing the column index to pull
-        // it from.
-        // BEGIN_INCLUDE(get_columns)
-        int phoneColumnIndex = cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER);
-        int emailColumnIndex = cursor.getColumnIndex(CommonDataKinds.Email.ADDRESS);
-        int nameColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.DISPLAY_NAME);
-        int lookupColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.LOOKUP_KEY);
-        int typeColumnIndex = cursor.getColumnIndex(CommonDataKinds.Contactables.MIMETYPE);
-        // END_INCLUDE(get_columns)
-
-        cursor.moveToFirst();
-        // Lookup key is the easiest way to verify a row of data is for the same
-        // contact as the previous row.
-        String lookupKey = "";
-        do {
-            // BEGIN_INCLUDE(lookup_key)
-            String currentLookupKey = cursor.getString(lookupColumnIndex);
-            if (!lookupKey.equals(currentLookupKey)) {
-                String displayName = cursor.getString(nameColumnIndex);
-                tv.append(displayName + "\n");
-                lookupKey = currentLookupKey;
-            }
-            // END_INCLUDE(lookup_key)
-
-            // BEGIN_INCLUDE(retrieve_data)
-            // The data type can be determined using the mime type column.
-            String mimeType = cursor.getString(typeColumnIndex);
-            if (mimeType.equals(CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
-                tv.append("\tPhone Number: " + cursor.getString(phoneColumnIndex) + "\n");
-            } else if (mimeType.equals(CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {
-                tv.append("\tEmail Address: " + cursor.getString(emailColumnIndex) + "\n");
-            }
-            // END_INCLUDE(retrieve_data)
-
-            // Look at DDMS to see all the columns returned by a query to Contactables.
-            // Behold, the firehose!
-            for(String column : cursor.getColumnNames()) {
-                Log.d(TAG, column + column + ": " +
-                        cursor.getString(cursor.getColumnIndex(column)) + "\n");
-            }
-        } while (cursor.moveToNext());
-    }
-
-    @Override
-    public void onLoaderReset(Loader<Cursor> cursorLoader) {
-    }
-}
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/MainActivity.java b/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/MainActivity.java
deleted file mode 100644
index b8b074e..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/MainActivity.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2012 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.basiccontactables;
-
-import android.app.Activity;
-import android.app.SearchManager;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.Menu;
-import android.widget.SearchView;
-
-/**
- * Simple one-activity app that takes a search term via the Action Bar
- * and uses it as a query to search the contacts database via the Contactables
- * table.
- */
-public class MainActivity extends Activity {
-
-    public static final int CONTACT_QUERY_LOADER = 0;
-    public static final String QUERY_KEY = "query";
-
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        if (getIntent() != null) {
-            handleIntent(getIntent());
-        }
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        handleIntent(intent);
-    }
-
-    /**
-     * Assuming this activity was started with a new intent, process the incoming information and
-     * react accordingly.
-     * @param intent
-     */
-    private void handleIntent(Intent intent) {
-        // Special processing of the incoming intent only occurs if the if the action specified
-        // by the intent is ACTION_SEARCH.
-        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
-            // SearchManager.QUERY is the key that a SearchManager will use to send a query string
-            // to an Activity.
-            String query = intent.getStringExtra(SearchManager.QUERY);
-
-            // We need to create a bundle containing the query string to send along to the
-            // LoaderManager, which will be handling querying the database and returning results.
-            Bundle bundle = new Bundle();
-            bundle.putString(QUERY_KEY, query);
-
-            ContactablesLoaderCallbacks loaderCallbacks = new ContactablesLoaderCallbacks(this);
-
-            // Start the loader with the new query, and an object that will handle all callbacks.
-            getLoaderManager().restartLoader(CONTACT_QUERY_LOADER, bundle, loaderCallbacks);
-        }
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.main, menu);
-
-        // Associate searchable configuration with the SearchView
-        SearchManager searchManager =
-                (SearchManager) getSystemService(Context.SEARCH_SERVICE);
-        SearchView searchView =
-                (SearchView) menu.findItem(R.id.search).getActionView();
-        searchView.setSearchableInfo(
-                searchManager.getSearchableInfo(getComponentName()));
-
-        return true;
-    }
-}
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/strings.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/strings.xml
deleted file mode 100755
index a499fd2..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <string name="sample_action">Sample action</string>
-    <string name="search_title">Search Contacts</string>
-</resources>
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/styles.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/styles.xml
deleted file mode 100644
index c3a400d..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <!-- Widget styling -->
-
-    <style name="Widget.SampleOutput">
-        <item name="android:padding">@dimen/margin_medium</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-</resources>
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/tests/AndroidManifest.xml b/content/contacts/BasicContactables/BasicContactablesSample/tests/AndroidManifest.xml
deleted file mode 100644
index 8c4af25..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basiccontactables.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basiccontactables"
-            android:label="Tests for com.example.android.basiccontactables" />
-
-</manifest>
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/tests/src/com/example/android/basiccontactables/tests/SampleTests.java b/content/contacts/BasicContactables/BasicContactablesSample/tests/src/com/example/android/basiccontactables/tests/SampleTests.java
deleted file mode 100644
index dd48bf2..0000000
--- a/content/contacts/BasicContactables/BasicContactablesSample/tests/src/com/example/android/basiccontactables/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basiccontactables.tests;
-
-import com.example.android.basiccontactables.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicContactables sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicContactablesFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicContactablesFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/README.txt b/content/contacts/BasicContactables/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/content/contacts/BasicContactables/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/build.gradle b/content/contacts/BasicContactables/build.gradle
index cca9ac3..036abc8 100644
--- a/content/contacts/BasicContactables/build.gradle
+++ b/content/contacts/BasicContactables/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/content/contacts/BasicContactables/buildSrc/build.gradle b/content/contacts/BasicContactables/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/content/contacts/BasicContactables/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties b/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
+++ b/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/content/contacts/BasicContactables/settings.gradle b/content/contacts/BasicContactables/settings.gradle
index 5fec49c..111067c 100644
--- a/content/contacts/BasicContactables/settings.gradle
+++ b/content/contacts/BasicContactables/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicContactablesSample'
+include ':BasicContactables'
diff --git a/content/contacts/BasicContactables/template-params.xml b/content/contacts/BasicContactables/template-params.xml
deleted file mode 100644
index ee2ba11..0000000
--- a/content/contacts/BasicContactables/template-params.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicContactables</name>
-    <group>Content</group>
-    <package>com.example.android.basiccontactables</package>
-
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>18</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates how to use the Contactables table to search for contacts.
-            \n\nQuery strings sent to the Contactables table will match both contact names and phone numbers,
-            reducing the number of queries your application needs to use when searching the contacts database!
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/content/documentsUi/StorageClient/StorageClientSample/.gitignore b/content/documentsUi/StorageClient/StorageClientSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/content/documentsUi/StorageClient/StorageClientSample/README-singleview.txt b/content/documentsUi/StorageClient/StorageClientSample/README-singleview.txt
deleted file mode 100644
index 0cacd46..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/README-singleview.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-        Copyright 2013 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.
--->
-
-Steps to implement SingleView template:
--in template-params.xml.ftl:
-    -add the following line to common imports
-        <common src="activities"/>
-
-    -add a string for the action button's text using the element name "sample_action".
-    This element should be a child of <strings>:
-        <strings>
-        ...
-        <sample_action>ButtonText</sample_action>
-        ...
-        </strings>
-
-
-
--Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
- called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
- folder instead of "common" or "templates".
-   For instance, if your package name is com.example.foo, create the file
-   src/main/java/com/example/foo/FooFragment.java
-
-
--Within this fragment, make sure that the onCreate method has the line
- "setHasOptionsMenu(true);", to enable the fragment to handle menu events.
-
--In order to override menu events, override onOptionsItemSelected.
-
--refer to sampleSamples/singleViewSample for a reference implementation of a
-project built on this template.
-
-
diff --git a/content/documentsUi/StorageClient/StorageClientSample/proguard-project.txt b/content/documentsUi/StorageClient/StorageClientSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/AndroidManifest.xml b/content/documentsUi/StorageClient/StorageClientSample/src/main/AndroidManifest.xml
deleted file mode 100644
index d35a4ec..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.storageclient"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-
-</manifest>
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/java/com/example/android/storageclient/StorageClientFragment.java b/content/documentsUi/StorageClient/StorageClientSample/src/main/java/com/example/android/storageclient/StorageClientFragment.java
deleted file mode 100644
index 7f9f73e..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/src/main/java/com/example/android/storageclient/StorageClientFragment.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-* Copyright (C) 2012 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.storageclient;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.content.Intent;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.os.ParcelFileDescriptor;
-import android.provider.OpenableColumns;
-import android.support.v4.app.DialogFragment;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.view.MenuItem;
-import android.view.Window;
-import android.widget.ImageView;
-
-import com.example.android.common.logger.Log;
-
-import java.io.FileDescriptor;
-import java.io.IOException;
-
-public class StorageClientFragment extends Fragment {
-
-    // A request code's purpose is to match the result of a "startActivityForResult" with
-    // the type of the original request.  Choose any value.
-    private static final int READ_REQUEST_CODE = 1337;
-
-    public static final String TAG = "StorageClientFragment";
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.sample_action) {
-            performFileSearch();
-        }
-        return true;
-    }
-
-    /**
-     * Fires an intent to spin up the "file chooser" UI and select an image.
-     */
-    public void performFileSearch() {
-
-        // BEGIN_INCLUDE (use_open_document_intent)
-        // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.
-        Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
-
-        // Filter to only show results that can be "opened", such as a file (as opposed to a list
-        // of contacts or timezones)
-        intent.addCategory(Intent.CATEGORY_OPENABLE);
-
-        // Filter to show only images, using the image MIME data type.
-        // If one wanted to search for ogg vorbis files, the type would be "audio/ogg".
-        // To search for all documents available via installed storage providers, it would be
-        // "*/*".
-        intent.setType("image/*");
-
-        startActivityForResult(intent, READ_REQUEST_CODE);
-        // END_INCLUDE (use_open_document_intent)
-    }
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent resultData) {
-        Log.i(TAG, "Received an \"Activity Result\"");
-        // BEGIN_INCLUDE (parse_open_document_response)
-        // The ACTION_OPEN_DOCUMENT intent was sent with the request code READ_REQUEST_CODE.
-        // If the request code seen here doesn't match, it's the response to some other intent,
-        // and the below code shouldn't run at all.
-
-        if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
-            // The document selected by the user won't be returned in the intent.
-            // Instead, a URI to that document will be contained in the return intent
-            // provided to this method as a parameter.  Pull that uri using "resultData.getData()"
-            Uri uri = null;
-            if (resultData != null) {
-                uri = resultData.getData();
-                Log.i(TAG, "Uri: " + uri.toString());
-                showImage(uri);
-            }
-            // END_INCLUDE (parse_open_document_response)
-        }
-    }
-
-    /**
-     * Given the URI of an image, shows it on the screen using a DialogFragment.
-     *
-     * @param uri the Uri of the image to display.
-     */
-    public void showImage(Uri uri) {
-        // BEGIN_INCLUDE (create_show_image_dialog)
-        if (uri != null) {
-            // Since the URI is to an image, create and show a DialogFragment to display the
-            // image to the user.
-            FragmentManager fm = getActivity().getSupportFragmentManager();
-            ImageDialogFragment imageDialog = new ImageDialogFragment(uri);
-            imageDialog.show(fm, "image_dialog");
-        }
-        // END_INCLUDE (create_show_image_dialog)
-    }
-
-    /**
-     * Grabs metadata for a document specified by URI, logs it to the screen.
-     *
-     * @param uri The uri for the document whose metadata should be printed.
-     */
-    public void dumpImageMetaData(Uri uri) {
-        // BEGIN_INCLUDE (dump_metadata)
-
-        // The query, since it only applies to a single document, will only return one row.
-        // no need to filter, sort, or select fields, since we want all fields for one
-        // document.
-        Cursor cursor = getActivity().getContentResolver()
-                .query(uri, null, null, null, null, null);
-
-        try {
-        // moveToFirst() returns false if the cursor has 0 rows.  Very handy for
-        // "if there's anything to look at, look at it" conditionals.
-            if (cursor != null && cursor.moveToFirst()) {
-
-                // Note it's called "Display Name".  This is provider-specific, and
-                // might not necessarily be the file name.
-                String displayName = cursor.getString(
-                        cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
-                Log.i(TAG, "Display Name: " + displayName);
-
-                int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE);
-                // If the size is unknown, the value stored is null.  But since an int can't be
-                // null in java, the behavior is implementation-specific, which is just a fancy
-                // term for "unpredictable".  So as a rule, check if it's null before assigning
-                // to an int.  This will happen often:  The storage API allows for remote
-                // files, whose size might not be locally known.
-                String size = null;
-                if (!cursor.isNull(sizeIndex)) {
-                    // Technically the column stores an int, but cursor.getString will do the
-                    // conversion automatically.
-                    size = cursor.getString(sizeIndex);
-                } else {
-                    size = "Unknown";
-                }
-                Log.i(TAG, "Size: " + size);
-            }
-        } finally {
-            cursor.close();
-        }
-        // END_INCLUDE (dump_metadata)
-    }
-
-    /**
-     * DialogFragment which displays an image, given a URI.
-     */
-    private class ImageDialogFragment extends DialogFragment {
-        private Dialog mDialog;
-        private Uri mUri;
-
-        public ImageDialogFragment(Uri uri) {
-            super();
-            mUri = uri;
-        }
-
-        /** Create a Bitmap from the URI for that image and return it.
-         *
-         * @param uri the Uri for the image to return.
-         */
-        private Bitmap getBitmapFromUri(Uri uri) {
-            ParcelFileDescriptor parcelFileDescriptor = null;
-            try {
-                parcelFileDescriptor =
-                        getActivity().getContentResolver().openFileDescriptor(uri, "r");
-                FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor();
-                Bitmap image = BitmapFactory.decodeFileDescriptor(fileDescriptor);
-                parcelFileDescriptor.close();
-                return image;
-            } catch (Exception e) {
-                Log.e(TAG, "Failed to load image.", e);
-                return null;
-            } finally {
-                try {
-                    if (parcelFileDescriptor != null) {
-                        parcelFileDescriptor.close();
-                    }
-                } catch (IOException e) {
-                    e.printStackTrace();
-                    Log.e(TAG, "Error closing ParcelFile Descriptor");
-                }
-            }
-        }
-
-        @Override
-        public Dialog onCreateDialog(Bundle savedInstanceState) {
-            mDialog = super.onCreateDialog(savedInstanceState);
-            // To optimize for the "lightbox" style layout.  Since we're not actually displaying a
-            // title, remove the bar along the top of the fragment where a dialog title would
-            // normally go.
-            mDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
-            final ImageView imageView = new ImageView(getActivity());
-            mDialog.setContentView(imageView);
-
-            // BEGIN_INCLUDE (show_image)
-            // Loading the image is going to require some sort of I/O, which must occur off the UI
-            // thread.  Changing the ImageView to display the image must occur ON the UI thread.
-            // The easiest way to divide up this labor is with an AsyncTask.  The doInBackground
-            // method will run in a separate thread, but onPostExecute will run in the main
-            // UI thread.
-            AsyncTask<Uri, Void, Bitmap> imageLoadAsyncTask = new AsyncTask<Uri, Void, Bitmap>() {
-                @Override
-                protected Bitmap doInBackground(Uri... uris) {
-                    dumpImageMetaData(uris[0]);
-                    return getBitmapFromUri(uris[0]);
-                }
-
-                @Override
-                protected void onPostExecute(Bitmap bitmap) {
-                    imageView.setImageBitmap(bitmap);
-                }
-            };
-            imageLoadAsyncTask.execute(mUri);
-            // END_INCLUDE (show_image)
-
-            return mDialog;
-        }
-
-        @Override
-        public void onStop() {
-            super.onStop();
-            if (getDialog() != null) {
-                getDialog().dismiss();
-            }
-        }
-    }
-}
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-hdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-mdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xhdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/documentsUi/StorageClient/StorageClientSample/tests/AndroidManifest.xml b/content/documentsUi/StorageClient/StorageClientSample/tests/AndroidManifest.xml
deleted file mode 100644
index 3f0a38f..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.storageclient.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="19"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.storageclient"
-            android:label="Tests for com.example.android.storageclient" />
-
-</manifest>
\ No newline at end of file
diff --git a/content/documentsUi/StorageClient/StorageClientSample/tests/src/com/example/android/storageclient/tests/SampleTests.java b/content/documentsUi/StorageClient/StorageClientSample/tests/src/com/example/android/storageclient/tests/SampleTests.java
deleted file mode 100644
index 5ed779a..0000000
--- a/content/documentsUi/StorageClient/StorageClientSample/tests/src/com/example/android/storageclient/tests/SampleTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-/*
-* Copyright (C) 2013 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.storageclient.tests;
-
-import com.example.android.storageclient.*;
-
-import android.net.Uri;
-import android.support.v4.app.FragmentManager;
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for StorageClient sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private StorageClientFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (StorageClientFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-     * Test if the metadata dump handles an invalid URI without blowing up.
-     */
-    public void testDumpMetadataInvalidUri() {
-        Uri uri = Uri.parse("content://HAHADOESNTEXIST");
-        mTestFragment.dumpImageMetaData(uri);
-    }
-}
\ No newline at end of file
diff --git a/content/documentsUi/StorageClient/build.gradle b/content/documentsUi/StorageClient/build.gradle
deleted file mode 100644
index cca9ac3..0000000
--- a/content/documentsUi/StorageClient/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/content/documentsUi/StorageClient/buildSrc/build.gradle b/content/documentsUi/StorageClient/buildSrc/build.gradle
deleted file mode 100644
index 7cebf71..0000000
--- a/content/documentsUi/StorageClient/buildSrc/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.jar b/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties b/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/content/documentsUi/StorageClient/gradlew b/content/documentsUi/StorageClient/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/content/documentsUi/StorageClient/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/content/documentsUi/StorageClient/gradlew.bat b/content/documentsUi/StorageClient/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/content/documentsUi/StorageClient/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/content/documentsUi/StorageClient/settings.gradle b/content/documentsUi/StorageClient/settings.gradle
deleted file mode 100644
index 73cfad8..0000000
--- a/content/documentsUi/StorageClient/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include 'StorageClientSample'
diff --git a/content/documentsUi/StorageClient/template-params.xml b/content/documentsUi/StorageClient/template-params.xml
deleted file mode 100644
index f6843e7..0000000
--- a/content/documentsUi/StorageClient/template-params.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>StorageClient</name>
-    <group>Content</group>
-    <package>com.example.android.storageclient</package>
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-    <compileSdkVersion>19</compileSdkVersion>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            Using the OPEN_DOCUMENT intent, a client app can access a list of Document Providers
-            on the device, and choose a file from any of them.
-            \n\nTo demonstrate this, click the button below to open up the Storage Access Framework
-            interface, and choose an image on your device.  It will be displayed in this app.
-            ]]>
-        </intro>
-        <sample_action>Show Me The Image</sample_action>
-    </strings>
-
-    <template src="base"/>
-    <template src="SingleView"/>
-    <common src="logger"/>
-    <common src="activities"/>
-
-</sample>
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/build.gradle b/content/multiuser/AppRestrictions/AppRestrictions/build.gradle
new file mode 100644
index 0000000..945e1f5
--- /dev/null
+++ b/content/multiuser/AppRestrictions/AppRestrictions/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/AndroidManifest.xml b/content/multiuser/AppRestrictions/AppRestrictions/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..dd9fc09
--- /dev/null
+++ b/content/multiuser/AppRestrictions/AppRestrictions/src/main/AndroidManifest.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          android:versionCode="1"
+          android:versionName="1"
+          package="com.example.android.apprestrictions">
+
+    <uses-sdk android:minSdkVersion="18" />
+
+    <application android:label="@string/app_name"
+                 android:icon="@drawable/ic_launcher">
+
+        <activity android:name="MainActivity"
+                  android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name="CustomRestrictionsActivity"
+                  android:label="@string/restrictions_activity_label" />
+
+        <receiver android:name="GetRestrictionsReceiver">
+            <intent-filter>
+                <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES" />
+            </intent-filter>
+        </receiver>
+    </application>
+</manifest>
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java b/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java b/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java b/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/MainActivity.java b/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/MainActivity.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/MainActivity.java
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/MainActivity.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-hdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-mdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xhdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/layout/main.xml b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/layout/main.xml
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/layout/main.xml
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/res/layout/main.xml
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/values/strings.xml b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/values/strings.xml
new file mode 100644
index 0000000..2dac3b1
--- /dev/null
+++ b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/values/strings.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name">App Restrictions Demo</string>
+    <string name="restrictions_activity_label">Custom app restrictions</string>
+    <string name="boolean_entry_title">Test boolean type</string>
+    <string name="choice_entry_title">Test choice type</string>
+    <string name="multi_entry_title">Test multi-select type</string>
+    <string name="custom_description">If checked, use a custom app restriction Activity.  Otherwise,
+        use standard restriction types.
+    </string>
+    <string name="sample_app_description">Note: This sample app requires the restricted profile
+        feature.\n\n
+        1. If this is the primary user, go to Settings &gt; Users.\n\n
+        2. Create a restricted profile, if one doesn\'t exist already.\n\n
+        3. Open the profile settings, locate the sample app, and tap the app restriction settings
+        icon. Configure app restrictions for the app.\n\n
+        4. In the lock screen, switch to the user\'s restricted profile, launch this sample app,
+        and see the configured app restrictions displayed.\n
+    </string>
+    <string name="settings_button_label">Go to Settings</string>
+    <string name="current_app_limits_label">Current app restriction settings:</string>
+    <string name="na">N/A</string>
+    <string name="current_app_limits_description">Your app can restrict its content based on these
+        settings, which can be configured through the primary user\'s Users Settings.
+    </string>
+
+    <string-array name="multi_entry_entries">
+        <item>Ice Cream</item>
+        <item>Jelly Bean</item>
+        <item>More Jelly Bean</item>
+    </string-array>
+
+    <string-array name="multi_entry_values" translateable="false">
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+    </string-array>
+
+    <string-array name="choice_entry_entries">
+        <item>Ice Cream</item>
+        <item>Jelly Bean</item>
+        <item>More Jelly Bean</item>
+    </string-array>
+
+    <string-array name="choice_entry_values" translateable="false">
+        <item>1</item>
+        <item>2</item>
+        <item>3</item>
+    </string-array>
+
+</resources>
\ No newline at end of file
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/xml/custom_prefs.xml b/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/xml/custom_prefs.xml
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/xml/custom_prefs.xml
rename to content/multiuser/AppRestrictions/AppRestrictions/src/main/res/xml/custom_prefs.xml
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/.gitignore b/content/multiuser/AppRestrictions/AppRestrictionsSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/content/multiuser/AppRestrictions/AppRestrictionsSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/proguard-project.txt b/content/multiuser/AppRestrictions/AppRestrictionsSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/content/multiuser/AppRestrictions/AppRestrictionsSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/AndroidManifest.xml b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/AndroidManifest.xml
deleted file mode 100644
index b492bbf..0000000
--- a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.apprestrictions"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="18" />
-
-    <application android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher">
-
-        <activity android:name="MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-        <activity android:name="CustomRestrictionsActivity"
-            android:label="@string/restrictions_activity_label" />
-
-        <receiver android:name="GetRestrictionsReceiver">
-            <intent-filter>
-                <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES" />
-            </intent-filter>
-        </receiver>
-    </application>
-
-</manifest>
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/values/strings.xml b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/values/strings.xml
deleted file mode 100644
index 534edf0..0000000
--- a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 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.
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="restrictions_activity_label">Custom app restrictions</string>
-    <string name="boolean_entry_title">Test boolean type</string>
-    <string name="choice_entry_title">Test choice type</string>
-    <string name="multi_entry_title">Test multi-select type</string>
-    <string name="custom_description">If checked, use a custom app restriction Activity.  Otherwise,
-        use standard restriction types.
-    </string>
-    <string name="sample_app_description">Note: This sample app requires the restricted profile
-        feature.\n\n
-        1. If this is the primary user, go to Settings &gt; Users.\n\n
-        2. Create a restricted profile, if one doesn\'t exist already.\n\n
-        3. Open the profile settings, locate the sample app, and tap the app restriction settings
-        icon. Configure app restrictions for the app.\n\n
-        4. In the lock screen, switch to the user\'s restricted profile, launch this sample app,
-        and see the configured app restrictions displayed.\n
-    </string>
-    <string name="settings_button_label">Go to Settings</string>
-    <string name="current_app_limits_label">Current app restriction settings:</string>
-    <string name="na">N/A</string>
-    <string name="current_app_limits_description">Your app can restrict its content based on these
-        settings, which can be configured through the primary user\'s Users Settings.
-    </string>
-
-    <string-array name="multi_entry_entries">
-        <item>Ice Cream</item>
-        <item>Jelly Bean</item>
-        <item>More Jelly Bean</item>
-    </string-array>
-
-    <string-array name="multi_entry_values" translateable="false">
-        <item>1</item>
-        <item>2</item>
-        <item>3</item>
-    </string-array>
-
-    <string-array name="choice_entry_entries">
-        <item>Ice Cream</item>
-        <item>Jelly Bean</item>
-        <item>More Jelly Bean</item>
-    </string-array>
-
-    <string-array name="choice_entry_values" translateable="false">
-        <item>1</item>
-        <item>2</item>
-        <item>3</item>
-    </string-array>
-
-</resources>
\ No newline at end of file
diff --git a/content/multiuser/AppRestrictions/build.gradle b/content/multiuser/AppRestrictions/build.gradle
index cca9ac3..036abc8 100644
--- a/content/multiuser/AppRestrictions/build.gradle
+++ b/content/multiuser/AppRestrictions/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/content/multiuser/AppRestrictions/buildSrc/build.gradle b/content/multiuser/AppRestrictions/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/content/multiuser/AppRestrictions/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties b/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties
index 861eddc..5c22dec 100644
--- a/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties
+++ b/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/content/multiuser/AppRestrictions/settings.gradle b/content/multiuser/AppRestrictions/settings.gradle
index 02aef49..41f2d03 100644
--- a/content/multiuser/AppRestrictions/settings.gradle
+++ b/content/multiuser/AppRestrictions/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'AppRestrictionsSample'
+include ':AppRestrictions'
diff --git a/content/multiuser/AppRestrictions/template-params.xml b/content/multiuser/AppRestrictions/template-params.xml
deleted file mode 100644
index fa676b2..0000000
--- a/content/multiuser/AppRestrictions/template-params.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>AppRestrictions</name>
-    <group>Content</group>
-    <package>com.example.android.apprestrictions</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>18</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates the use of the App Restriction feature, which is available on
-            Android 4.3 and above tablet device with the multiuser feature.
-
-            When launched under the primary User account, you can toggle between standard app restriction
-            types and custom.  When launched under a restricted profile, this activity displays app
-            restriction settings, if available.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/_index.jd b/input/gestures/BasicGestureDetect/BasicGestureDetect/_index.jd
new file mode 100644
index 0000000..db0461b
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/_index.jd
@@ -0,0 +1,6 @@
+page.tags="gestures", "motion event"
+sample.group=Input
+@jd:body
+
+<p>Example code that shows how to handle gestures in apps and games.</p>
+
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/build.gradle b/input/gestures/BasicGestureDetect/BasicGestureDetect/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/libs/android-support-v4.jar b/input/gestures/BasicGestureDetect/BasicGestureDetect/libs/android-support-v4.jar
new file mode 100644
index 0000000..428bdbc
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/libs/android-support-v4.jar
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/AndroidManifest.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/AndroidManifest.xml
new file mode 100755
index 0000000..9c6ec99
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/AndroidManifest.xml
@@ -0,0 +1,42 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.basicgesturedetect"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
+
+    <application
+        android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample"
+        android:allowBackup="true">
+
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name"
+            android:uiOptions="splitActionBarWhenNarrow">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/GestureListener.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/GestureListener.java
new file mode 100644
index 0000000..2e2921d
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/GestureListener.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2013 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.basicgesturedetect;
+
+import android.view.GestureDetector;
+import android.view.MotionEvent;
+
+import com.example.android.common.logger.Log;
+
+public class GestureListener extends GestureDetector.SimpleOnGestureListener {
+
+    public static final String TAG = "GestureListener";
+
+    // BEGIN_INCLUDE(init_gestureListener)
+    @Override
+    public boolean onSingleTapUp(MotionEvent e) {
+        // Up motion completing a single tap occurred.
+        Log.i(TAG, "Single Tap Up");
+        return false;
+    }
+
+    @Override
+    public void onLongPress(MotionEvent e) {
+        // Touch has been long enough to indicate a long press.
+        // Does not indicate motion is complete yet (no up event necessarily)
+        Log.i(TAG, "Long Press");
+    }
+
+    @Override
+    public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
+    float distanceY) {
+        // User attempted to scroll
+        Log.i(TAG, "Scroll");
+        return false;
+    }
+
+    @Override
+    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
+    float velocityY) {
+        // Fling event occurred.  Notification of this one happens after an "up" event.
+        Log.i(TAG, "Fling");
+        return false;
+    }
+
+    @Override
+    public void onShowPress(MotionEvent e) {
+        // User performed a down event, and hasn't moved yet.
+        Log.i(TAG, "Show Press");
+    }
+
+    @Override
+    public boolean onDown(MotionEvent e) {
+        // "Down" event - User touched the screen.
+        Log.i(TAG, "Down");
+        return false;
+    }
+
+    @Override
+    public boolean onDoubleTap(MotionEvent e) {
+        // User tapped the screen twice.
+        Log.i(TAG, "Double tap");
+        return false;
+    }
+
+    @Override
+    public boolean onDoubleTapEvent(MotionEvent e) {
+        // Since double-tap is actually several events which are considered one aggregate
+        // gesture, there's a separate callback for an individual event within the doubletap
+        // occurring.  This occurs for down, up, and move.
+        Log.i(TAG, "Event within double tap");
+        return false;
+    }
+
+    @Override
+    public boolean onSingleTapConfirmed(MotionEvent e) {
+        // A confirmed single-tap event has occurred.  Only called when the detector has
+        // determined that the first tap stands alone, and is not part of a double tap.
+        Log.i(TAG, "Single tap confirmed");
+        return false;
+    }
+    // END_INCLUDE(init_gestureListener)
+}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/LogFragment.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/LogFragment.java
new file mode 100644
index 0000000..849edac
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/LogFragment.java
@@ -0,0 +1,58 @@
+// Copyright 2013 Google Inc. All Rights Reserved.
+
+package com.example.android.basicgesturedetect;
+
+import com.example.android.common.logger.LogView;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.text.Editable;
+import android.text.TextWatcher;
+
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ScrollView;
+
+/**
+ * Simple fraggment which contains a LogView and uses is to output log data it receives
+ * through the LogNode interface.
+ */
+public class LogFragment extends Fragment {
+
+    private LogView mLogView;
+
+    public LogFragment() {}
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+
+        View result = inflater.inflate(R.layout.log_fragment, container, false);
+
+        mLogView = (LogView) result.findViewById(R.id.sample_output);
+
+        // Wire up so when the text changes, the view scrolls down.
+        final ScrollView scrollView =
+                ((ScrollView) result.findViewById(R.id.log_scroll));
+
+        mLogView.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {}
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+            }
+        });
+
+        return result;
+    }
+
+    public LogView getLogView() {
+        return mLogView;
+    }
+}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/MainActivity.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/MainActivity.java
new file mode 100755
index 0000000..4654ac9
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/MainActivity.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2013 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.basicgesturedetect;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+import android.util.TypedValue;
+import android.view.GestureDetector;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.example.android.common.logger.LogWrapper;
+import com.example.android.common.logger.Log;
+import com.example.android.common.widgets.SimpleTextFragment;
+import com.example.android.common.logger.MessageOnlyLogFilter;
+
+/**
+ * Sample application demonstrating how to use GestureDetector go detect when a user performs
+ * a gesture that's recognized by the framework.  This example uses SimpleGestureDetector.  If you
+ * want to detect
+ * as well as customize that shortcut with metadata to send along to the application it activates.
+ * Code is also included for removing your shortcut from the homescreen, for situations where that
+ * is necessary (for instance, removing a shortcut to some data when that data is deleted from your
+ * app).
+ */
+public class MainActivity extends FragmentActivity {
+
+    public static final String TAG = "Basic Gesture Detector";
+
+    // Reference to the fragment showing events, so we can clear it with a button as necessary.
+    private LogFragment mLogFragment;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        SimpleTextFragment actionFragment = (SimpleTextFragment)
+                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
+        actionFragment.setText(R.string.intro_message);
+        actionFragment.getView().setClickable(true);
+        actionFragment.getView().setFocusable(true);
+        actionFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
+
+
+        // BEGIN_INCLUDE(init_detector)
+
+        // First create the GestureListener that will include all our callbacks.
+        // Then create the GestureDetector, which takes that listener as an argument.
+        GestureDetector.SimpleOnGestureListener gestureListener = getGestureListener();
+        final GestureDetector gd = new GestureDetector(this, gestureListener);
+
+        /* For the view where gestures will occur, create an onTouchListener that sends
+         * all motion events to the gesture detector.  When the gesture detector
+         * actually detects an event, it will use the callbacks you created in the
+         * SimpleOnGestureListener to alert your application.
+        */
+
+        actionFragment.getView().setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View view, MotionEvent motionEvent) {
+                gd.onTouchEvent(motionEvent);
+                return false;
+            }
+        });
+        // END_INCLUDE(init_detector)
+
+        initializeLogging();
+    }
+
+    /** Create a gesture listener which will be attached to the GestureDetector.
+     *  This listener is where you can write all your callbacks for when certain events occur.
+     * @return The listener your GestureDetector will use to inform your application when
+     * the supported gestures occur.
+     */
+    public GestureDetector.SimpleOnGestureListener getGestureListener() {
+        return new GestureListener();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.sample_action:
+                // Clears the log fragment when clicked.
+                mLogFragment.getLogView().setText("");
+                return true;
+        }
+        return false;
+    }
+
+    /** Create a chain of targets that will receive log data */
+    public void initializeLogging() {
+        // Wraps Android's native log framework.
+        LogWrapper logWrapper = new LogWrapper();
+        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
+        Log.setLogNode(logWrapper);
+
+        // Filter strips out everything except the message text.
+        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
+        logWrapper.setNext(msgFilter);
+
+        // On screen logging via a fragment with a TextView.
+        mLogFragment =
+                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
+        msgFilter.setNext(mLogFragment.getLogView());
+
+        Log.i(TAG, "Ready");
+    }
+}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/Log.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/Log.java
new file mode 100644
index 0000000..a87f299
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/Log.java
@@ -0,0 +1,236 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+/**
+ * Helper class for a list (or tree) of LoggerNodes.
+ *
+ * <p>When this is set as the head of the list,
+ * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
+ * Most of the methods in this class server only to map a method call in Log to its equivalent
+ * in LogNode.</p>
+ */
+public class Log {
+    // Grab the native values from Android's native logging facilities,
+    // to make for easy migration and interop.
+    public static final int NONE = -1;
+    public static final int VERBOSE = android.util.Log.VERBOSE;
+    public static final int DEBUG = android.util.Log.DEBUG;
+    public static final int INFO = android.util.Log.INFO;
+    public static final int WARN = android.util.Log.WARN;
+    public static final int ERROR = android.util.Log.ERROR;
+    public static final int ASSERT = android.util.Log.ASSERT;
+
+    // Stores the beginning of the LogNode topology.
+    private static LogNode mLogNode;
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public static LogNode getLogNode() {
+        return mLogNode;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to.
+     */
+    public static void setLogNode(LogNode node) {
+        mLogNode = node;
+    }
+
+    /**
+     * Instructs the LogNode to print the log data provided. Other LogNodes can
+     * be chained to the end of the LogNode as desired.
+     *
+     * @param priority Log level of the data being logged. Verbose, Error, etc.
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void println(int priority, String tag, String msg, Throwable tr) {
+        if (mLogNode != null) {
+            mLogNode.println(priority, tag, msg, tr);
+        }
+    }
+
+    /**
+     * Instructs the LogNode to print the log data provided. Other LogNodes can
+     * be chained to the end of the LogNode as desired.
+     *
+     * @param priority Log level of the data being logged. Verbose, Error, etc.
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     */
+    public static void println(int priority, String tag, String msg) {
+        println(priority, tag, msg, null);
+    }
+
+   /**
+     * Prints a message at VERBOSE priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void v(String tag, String msg, Throwable tr) {
+        println(VERBOSE, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at VERBOSE priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void v(String tag, String msg) {
+        v(tag, msg, null);
+    }
+
+
+    /**
+     * Prints a message at DEBUG priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void d(String tag, String msg, Throwable tr) {
+        println(DEBUG, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at DEBUG priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void d(String tag, String msg) {
+        d(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at INFO priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void i(String tag, String msg, Throwable tr) {
+        println(INFO, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at INFO priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void i(String tag, String msg) {
+        i(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void w(String tag, String msg, Throwable tr) {
+        println(WARN, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void w(String tag, String msg) {
+        w(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at WARN priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void w(String tag, Throwable tr) {
+        w(tag, null, tr);
+    }
+
+    /**
+     * Prints a message at ERROR priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void e(String tag, String msg, Throwable tr) {
+        println(ERROR, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at ERROR priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void e(String tag, String msg) {
+        e(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void wtf(String tag, String msg, Throwable tr) {
+        println(ASSERT, tag, msg, tr);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param msg The actual message to be logged.
+     */
+    public static void wtf(String tag, String msg) {
+        wtf(tag, msg, null);
+    }
+
+    /**
+     * Prints a message at ASSERT priority.
+     *
+     * @param tag Tag for for the log data. Can be used to organize log statements.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    public static void wtf(String tag, Throwable tr) {
+        wtf(tag, null, tr);
+    }
+}
diff --git a/common/src/java/com/example/android/common/logger/LogNode.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogNode.java
similarity index 100%
copy from common/src/java/com/example/android/common/logger/LogNode.java
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogNode.java
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogView.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogView.java
new file mode 100644
index 0000000..d86a88b
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogView.java
@@ -0,0 +1,121 @@
+package com.example.android.common.logger;
+
+import android.content.Context;
+import android.text.method.ScrollingMovementMethod;
+import android.util.*;
+import android.widget.TextView;
+
+/**
+ * Created by alexlucas on 6/4/13.
+ */
+
+
+public class LogView extends TextView implements LogNode {
+
+    public LogView(Context context) {
+        super(context);
+    }
+
+    public LogView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public LogView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    /**
+     * Formats the log data and prints it out to the LogView.
+     * @param priority Log level of the data being logged.  Verbose, Error, etc.
+     * @param tag Tag for for the log data.  Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        String priorityStr = null;
+
+        // For the purposes of this View, we want to print the priority as readable text.
+        switch(priority) {
+            case android.util.Log.VERBOSE:
+                priorityStr = "VERBOSE";
+                break;
+            case android.util.Log.DEBUG:
+                priorityStr = "DEBUG";
+                break;
+            case android.util.Log.INFO:
+                priorityStr = "INFO";
+                break;
+            case android.util.Log.WARN:
+                priorityStr = "WARN";
+                break;
+            case android.util.Log.ERROR:
+                priorityStr = "ERROR";
+                break;
+            case android.util.Log.ASSERT:
+                priorityStr = "ASSERT";
+                break;
+            default:
+                break;
+        }
+
+        // Handily, the Log class has a facility for converting a stack trace into a useable string.
+        String exceptionStr = null;
+        if (tr != null) {
+            exceptionStr = android.util.Log.getStackTraceString(tr);
+        }
+
+        // Take the priority, tag, message, and exception, and concatonate as necessary
+        // into one usable line of text.
+        String outputStr =  "";
+        outputStr = appendIfNotNull(outputStr, priorityStr, "\t");
+        outputStr = appendIfNotNull(outputStr, tag, "\t");
+        outputStr = appendIfNotNull(outputStr, msg, "\t");
+        outputStr = appendIfNotNull(outputStr, exceptionStr, "\t");
+
+        // Actually display the text we just generated within the LogView.
+        appendToLog(outputStr);
+
+        if (mNext != null) {
+            mNext.println(priority, tag, msg, tr);
+        }
+    }
+
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+    /** Takes a string and adds to it, with a seperator, if the bit to be added isn't null. Since
+     * the logger takes so many arguments that might be null, this method helps cut out some of the
+     * agonizing tedium of writing the same 3 lines over and over.
+     * @param sourceStr The String to append to.
+     * @param appendStr The String to append
+     * @param delimiter The String to seperate the source and appendee strings. A tab or comma,
+     *                  for instance.
+     * @return The fully concatonated String
+     */
+    private String appendIfNotNull(String sourceStr, String appendStr, String delimiter) {
+        if (appendStr != null) {
+            if (appendStr.length() == 0) {
+                delimiter = "";
+            }
+            sourceStr += delimiter + appendStr;
+        }
+        return sourceStr;
+    }
+
+    // The next LogNode in the chain.
+    LogNode mNext;
+
+    /** Outputs the string as a new line of log data in the LogView. */
+    public void appendToLog(String s) {
+        append("\n" + s);
+    }
+
+
+}
diff --git a/common/src/java/com/example/android/common/logger/LogWrapper.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogWrapper.java
similarity index 100%
rename from common/src/java/com/example/android/common/logger/LogWrapper.java
rename to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogWrapper.java
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
new file mode 100644
index 0000000..6b72771
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+/**
+ * Simple {@link LogNode} filter, removes everything except the message.
+ * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
+ * just easy-to-read message updates as they're happening.
+ */
+public class MessageOnlyLogFilter implements LogNode {
+
+    LogNode mNext;
+
+    /**
+     * Takes the "next" LogNode as a parameter, to simplify chaining.
+     *
+     * @param next The next LogNode in the pipeline.
+     */
+    public MessageOnlyLogFilter(LogNode next) {
+        mNext = next;
+    }
+
+    public MessageOnlyLogFilter() {
+    }
+
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        if (mNext != null) {
+            getNext().println(Log.NONE, null, msg, null);
+        }
+    }
+
+    /**
+     * Returns the next LogNode in the linked list.
+     */
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    /**
+     * Sets the LogNode data will be sent to..
+     */
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/widgets/SimpleTextFragment.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/widgets/SimpleTextFragment.java
new file mode 100644
index 0000000..bd51a1c
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/widgets/SimpleTextFragment.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2013 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.common.widgets;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Simple fragment containing only a TextView.  Used by TextPagerAdapter to create
+ * tutorial-style pages for apps.
+ */
+public class SimpleTextFragment extends Fragment {
+
+    // Contains the text that will be displayed by this Fragment
+    String mText;
+
+    // Contains a resource ID for the text that will be displayed by this fragment.
+    int mTextId = -1;
+
+    // Keys which will be used to store/retrieve text passed in via setArguments.
+    public static final String TEXT_KEY = "text";
+    public static final String TEXT_ID_KEY = "text_id";
+
+    // For situations where the app wants to modify text at Runtime, exposing the TextView.
+    private TextView mTextView;
+
+    public SimpleTextFragment() {
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+        // Before initializing the textView, check if any arguments were provided via setArguments.
+        processArguments();
+
+        // Create a new TextView and set its text to whatever was provided.
+        mTextView = new TextView(getActivity());
+        mTextView.setGravity(Gravity.CENTER);
+
+        if (mText != null) {
+            mTextView.setText(mText);
+            Log.i("SimpleTextFragment", mText);
+        }
+        return mTextView;
+    }
+
+    public TextView getTextView() {
+        return mTextView;
+    }
+
+    /**
+     * Changes the text for this TextView, according to the resource ID provided.
+     * @param stringId A resource ID representing the text content for this Fragment's TextView.
+     */
+    public void setText(int stringId) {
+        getTextView().setText(getActivity().getString(stringId));
+    }
+
+    /**
+     * Processes the arguments passed into this Fragment via setArguments method.
+     * Currently the method only looks for text or a textID, nothing else.
+     */
+    public void processArguments() {
+        // For most objects we'd handle the multiple possibilities for initialization variables
+        // as multiple constructors.  For Fragments, however, it's customary to use
+        // setArguments / getArguments.
+        if (getArguments() != null) {
+            Bundle args = getArguments();
+            if (args.containsKey(TEXT_KEY)) {
+                mText = args.getString(TEXT_KEY);
+                Log.d("Constructor", "Added Text.");
+            } else if (args.containsKey(TEXT_ID_KEY)) {
+                mTextId = args.getInt(TEXT_ID_KEY);
+                mText = getString(mTextId);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/activity_main.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/activity_main.xml
new file mode 100755
index 0000000..471748f
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/activity_main.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright 2013 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.
+  -->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+    <fragment
+        android:name="com.example.android.common.SimpleTextFragment"
+        android:id="@+id/intro_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dp"
+        android:background="@android:color/darker_gray"/>
+    <fragment
+        android:name="com.example.android.basicgesturedetect.LogFragment"
+        android:id="@+id/log_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+</LinearLayout>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/log_fragment.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/log_fragment.xml
new file mode 100644
index 0000000..6d79548
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/log_fragment.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/log_scroll"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <com.example.android.common.logger.LogView
+        android:id="@+id/sample_output"
+        style="@style/Log"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:clickable="true"
+        android:focusable="true"
+        android:text=""
+        android:gravity="bottom" />
+</ScrollView>
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/menu/main.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/menu/main.xml
new file mode 100644
index 0000000..d0ffa14
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/menu/main.xml
@@ -0,0 +1,21 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/sample_action"
+        android:showAsAction="ifRoom|withText"
+        android:title="@string/clear_text" />
+</menu>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/dimens.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..886b05f
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,4 @@
+<resources>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/styles.xml
similarity index 100%
copy from background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/styles.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v11/styles.xml
similarity index 100%
copy from background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml
copy to input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v11/styles.xml
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v14/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..a91fd03
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/dimens.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..4f69897
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/dimens.xml
@@ -0,0 +1,24 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/strings.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/strings.xml
new file mode 100755
index 0000000..ce1ad02
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/strings.xml
@@ -0,0 +1,25 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Basic Gesture Detect</string>
+
+    <string name="intro_message">Welcome to Basic Gesture Detect!
+        In order to try this sample out, try dragging or tapping this text to see what happens!
+    </string>
+
+    <string name="clear_text">Clear Text</string>
+</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/styles.xml
new file mode 100644
index 0000000..4d9bb98
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/styles.xml
@@ -0,0 +1,40 @@
+<!--
+  Copyright 2013 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 thegi License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleOutput">
+        <item name="android:padding">@dimen/margin_medium</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+    <style name="Log" parent="Widget.SampleOutput">
+        <item name="android:typeface">monospace</item>
+    </style>
+
+
+</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/.gitignore b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/README-singleview.txt b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/README-singleview.txt
deleted file mode 100644
index 0cacd46..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/README-singleview.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-        Copyright 2013 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.
--->
-
-Steps to implement SingleView template:
--in template-params.xml.ftl:
-    -add the following line to common imports
-        <common src="activities"/>
-
-    -add a string for the action button's text using the element name "sample_action".
-    This element should be a child of <strings>:
-        <strings>
-        ...
-        <sample_action>ButtonText</sample_action>
-        ...
-        </strings>
-
-
-
--Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
- called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
- folder instead of "common" or "templates".
-   For instance, if your package name is com.example.foo, create the file
-   src/main/java/com/example/foo/FooFragment.java
-
-
--Within this fragment, make sure that the onCreate method has the line
- "setHasOptionsMenu(true);", to enable the fragment to handle menu events.
-
--In order to override menu events, override onOptionsItemSelected.
-
--refer to sampleSamples/singleViewSample for a reference implementation of a
-project built on this template.
-
-
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/proguard-project.txt b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/AndroidManifest.xml b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 1d7b3bd..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicgesturedetect"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-
-</manifest>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/java/com/example/android/basicgesturedetect/BasicGestureDetectFragment.java b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/java/com/example/android/basicgesturedetect/BasicGestureDetectFragment.java
deleted file mode 100644
index 820e972..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/java/com/example/android/basicgesturedetect/BasicGestureDetectFragment.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-* Copyright (C) 2013 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.basicgesturedetect;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.GestureDetector;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.View;
-
-import com.example.android.common.logger.Log;
-import com.example.android.common.logger.LogFragment;
-
-public class BasicGestureDetectFragment extends Fragment{
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-        View gestureView = getActivity().findViewById(R.id.sample_output);
-        gestureView.setClickable(true);
-        gestureView.setFocusable(true);
-
-        // BEGIN_INCLUDE(init_detector)
-
-        // First create the GestureListener that will include all our callbacks.
-        // Then create the GestureDetector, which takes that listener as an argument.
-        GestureDetector.SimpleOnGestureListener gestureListener = new GestureListener();
-        final GestureDetector gd = new GestureDetector(getActivity(), gestureListener);
-
-        /* For the view where gestures will occur, create an onTouchListener that sends
-         * all motion events to the gesture detector.  When the gesture detector
-         * actually detects an event, it will use the callbacks you created in the
-         * SimpleOnGestureListener to alert your application.
-        */
-
-        gestureView.setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View view, MotionEvent motionEvent) {
-                gd.onTouchEvent(motionEvent);
-                return false;
-            }
-        });
-        // END_INCLUDE(init_detector)
-    }
-
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.sample_action) {
-            clearLog();
-        }
-        return true;
-    }
-
-    public void clearLog() {
-        LogFragment logFragment =  ((LogFragment) getActivity().getSupportFragmentManager()
-                .findFragmentById(R.id.log_fragment));
-        logFragment.getLogView().setText("");
-    }
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-hdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-mdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/AndroidManifest.xml b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/AndroidManifest.xml
deleted file mode 100644
index 3c5487c..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicgesturedetect.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicgesturedetect"
-            android:label="Tests for com.example.android.basicgesturedetect" />
-
-</manifest>
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/src/com/example/android/basicgesturedetect/tests/SampleTests.java b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/src/com/example/android/basicgesturedetect/tests/SampleTests.java
deleted file mode 100644
index e72c22e..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/src/com/example/android/basicgesturedetect/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicgesturedetect.tests;
-
-import com.example.android.basicgesturedetect.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicGestureDetect sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicGestureDetectFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicGestureDetectFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/README.txt b/input/gestures/BasicGestureDetect/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/build.gradle b/input/gestures/BasicGestureDetect/build.gradle
index cca9ac3..036abc8 100644
--- a/input/gestures/BasicGestureDetect/build.gradle
+++ b/input/gestures/BasicGestureDetect/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/input/gestures/BasicGestureDetect/buildSrc/build.gradle b/input/gestures/BasicGestureDetect/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/input/gestures/BasicGestureDetect/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties b/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..055ba6f 100644
--- a/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties
+++ b/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,5 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/input/gestures/BasicGestureDetect/settings.gradle b/input/gestures/BasicGestureDetect/settings.gradle
index ba7e8c0..2270ab7 100644
--- a/input/gestures/BasicGestureDetect/settings.gradle
+++ b/input/gestures/BasicGestureDetect/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicGestureDetectSample'
+include ':BasicGestureDetect'
diff --git a/input/gestures/BasicGestureDetect/template-params.xml b/input/gestures/BasicGestureDetect/template-params.xml
deleted file mode 100644
index fc8b48d..0000000
--- a/input/gestures/BasicGestureDetect/template-params.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicGestureDetect</name>
-    <group>Input</group>
-    <package>com.example.android.basicgesturedetect</package>
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>18</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            Welcome to Basic Gesture Detect!
-            In order to try this sample out, try dragging or tapping this text to see what happens!
-            ]]>
-        </intro>
-        <sample_action>Clear Text</sample_action>
-    </strings>
-
-    <template src="base"/>
-    <template src="SingleView"/>
-    <common src="logger"/>
-    <common src="activities"/>
-
-</sample>
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/build.gradle b/input/multitouch/BasicMultitouch/BasicMultitouch/build.gradle
new file mode 100644
index 0000000..945e1f5
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/AndroidManifest.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d6709ef
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/AndroidManifest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.example.input.multitouch.basicMultitouch"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="8"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.input.multitouch.basicMultitouch.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/images/MultitouchSample.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/images/MultitouchSample.png
new file mode 100644
index 0000000..17447e9
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/images/MultitouchSample.png
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/common/Pools.java b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/common/Pools.java
new file mode 100644
index 0000000..67c937b
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/common/Pools.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2009 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.common;
+
+/**
+ * Helper class for crating pools of objects. An example use looks like this:
+ * <pre>
+ * public class MyPooledClass {
+ *
+ *     private static final SynchronizedPool<MyPooledClass> sPool =
+ *             new SynchronizedPool<MyPooledClass>(10);
+ *
+ *     public static MyPooledClass obtain() {
+ *         MyPooledClass instance = sPool.acquire();
+ *         return (instance != null) ? instance : new MyPooledClass();
+ *     }
+ *
+ *     public void recycle() {
+ *          // Clear state if needed.
+ *          sPool.release(this);
+ *     }
+ *
+ *     . . .
+ * }
+ * </pre>
+ *
+ * @hide
+ */
+public final class Pools {
+
+    /**
+     * Interface for managing a pool of objects.
+     *
+     * @param <T> The pooled type.
+     */
+    public static interface Pool<T> {
+
+        /**
+         * @return An instance from the pool if such, null otherwise.
+         */
+        public T acquire();
+
+        /**
+         * Release an instance to the pool.
+         *
+         * @param instance The instance to release.
+         * @return Whether the instance was put in the pool.
+         *
+         * @throws IllegalStateException If the instance is already in the pool.
+         */
+        public boolean release(T instance);
+    }
+
+    private Pools() {
+        /* do nothing - hiding constructor */
+    }
+
+    /**
+     * Simple (non-synchronized) pool of objects.
+     *
+     * @param <T> The pooled type.
+     */
+    public static class SimplePool<T> implements Pool<T> {
+        private final Object[] mPool;
+
+        private int mPoolSize;
+
+        /**
+         * Creates a new instance.
+         *
+         * @param maxPoolSize The max pool size.
+         *
+         * @throws IllegalArgumentException If the max pool size is less than zero.
+         */
+        public SimplePool(int maxPoolSize) {
+            if (maxPoolSize <= 0) {
+                throw new IllegalArgumentException("The max pool size must be > 0");
+            }
+            mPool = new Object[maxPoolSize];
+        }
+
+        @Override
+        @SuppressWarnings("unchecked")
+        public T acquire() {
+            if (mPoolSize > 0) {
+                final int lastPooledIndex = mPoolSize - 1;
+                T instance = (T) mPool[lastPooledIndex];
+                mPool[lastPooledIndex] = null;
+                mPoolSize--;
+                return instance;
+            }
+            return null;
+        }
+
+        @Override
+        public boolean release(T instance) {
+            if (isInPool(instance)) {
+                throw new IllegalStateException("Already in the pool!");
+            }
+            if (mPoolSize < mPool.length) {
+                mPool[mPoolSize] = instance;
+                mPoolSize++;
+                return true;
+            }
+            return false;
+        }
+
+        private boolean isInPool(T instance) {
+            for (int i = 0; i < mPoolSize; i++) {
+                if (mPool[i] == instance) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * Synchronized) pool of objects.
+     *
+     * @param <T> The pooled type.
+     */
+    public static class SynchronizedPool<T> extends SimplePool<T> {
+        private final Object mLock = new Object();
+
+        /**
+         * Creates a new instance.
+         *
+         * @param maxPoolSize The max pool size.
+         *
+         * @throws IllegalArgumentException If the max pool size is less than zero.
+         */
+        public SynchronizedPool(int maxPoolSize) {
+            super(maxPoolSize);
+        }
+
+        @Override
+        public T acquire() {
+            synchronized (mLock) {
+                return super.acquire();
+            }
+        }
+
+        @Override
+        public boolean release(T element) {
+            synchronized (mLock) {
+                return super.release(element);
+            }
+        }
+    }
+}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/MainActivity.java b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/MainActivity.java
new file mode 100644
index 0000000..627ada5
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/MainActivity.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2013 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.input.multitouch.basicMultitouch;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.MotionEvent;
+
+import com.android.example.input.multitouch.basicMultitouch.R;
+
+/**
+ * This is an example of keeping track of individual touches across multiple
+ * {@link MotionEvent}s.
+ * <p>
+ * This is illustrated by a View ({@link TouchDisplayView}) that responds to
+ * touch events and draws coloured circles for each pointer, stores the last
+ * positions of this pointer and draws them. This example shows the relationship
+ * between MotionEvent indices, pointer identifiers and actions.
+ *
+ * @see MotionEvent
+ */
+public class MainActivity extends Activity {
+    TouchDisplayView mView;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.layout_mainactivity);
+    }
+
+}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/TouchDisplayView.java b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/TouchDisplayView.java
new file mode 100644
index 0000000..55bcf8f
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/TouchDisplayView.java
@@ -0,0 +1,401 @@
+/*
+ * Copyright (C) 2013 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.input.multitouch.basicMultitouch;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.PointF;
+import android.util.AttributeSet;
+import android.util.SparseArray;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.example.android.common.Pools.SimplePool;
+
+/**
+ * View that shows touch events and their history. This view demonstrates the
+ * use of {@link #onTouchEvent(MotionEvent)} and {@link MotionEvent}s to keep
+ * track of touch pointers across events.
+ */
+public class TouchDisplayView extends View {
+
+    // Hold data for active touch pointer IDs
+    private SparseArray<TouchHistory> mTouches;
+
+    // Is there an active touch?
+    private boolean mHasTouch = false;
+
+    /**
+     * Holds data related to a touch pointer, including its current position,
+     * pressure and historical positions. Objects are allocated through an
+     * object pool using {@link #obtain()} and {@link #recycle()} to reuse
+     * existing objects.
+     */
+    static final class TouchHistory {
+
+        // number of historical points to store
+        public static final int HISTORY_COUNT = 20;
+
+        public float x;
+        public float y;
+        public float pressure = 0f;
+        public String label = null;
+
+        // current position in history array
+        public int historyIndex = 0;
+        public int historyCount = 0;
+
+        // arrray of pointer position history
+        public PointF[] history = new PointF[HISTORY_COUNT];
+
+        private static final int MAX_POOL_SIZE = 10;
+        private static final SimplePool<TouchHistory> sPool =
+                new SimplePool<TouchHistory>(MAX_POOL_SIZE);
+
+        public static TouchHistory obtain(float x, float y, float pressure) {
+            TouchHistory data = sPool.acquire();
+            if (data == null) {
+                data = new TouchHistory();
+            }
+
+            data.setTouch(x, y, pressure);
+
+            return data;
+        }
+
+        public TouchHistory() {
+
+            // initialise history array
+            for (int i = 0; i < HISTORY_COUNT; i++) {
+                history[i] = new PointF();
+            }
+        }
+
+        public void setTouch(float x, float y, float pressure) {
+            this.x = x;
+            this.y = y;
+            this.pressure = pressure;
+        }
+
+        public void recycle() {
+            this.historyIndex = 0;
+            this.historyCount = 0;
+            sPool.release(this);
+        }
+
+        /**
+         * Add a point to its history. Overwrites oldest point if the maximum
+         * number of historical points is already stored.
+         *
+         * @param point
+         */
+        public void addHistory(float x, float y) {
+            PointF p = history[historyIndex];
+            p.x = x;
+            p.y = y;
+
+            historyIndex = (historyIndex + 1) % history.length;
+
+            if (historyCount < HISTORY_COUNT) {
+                historyCount++;
+            }
+        }
+
+    }
+
+    public TouchDisplayView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+
+        // SparseArray for touch events, indexed by touch id
+        mTouches = new SparseArray<TouchDisplayView.TouchHistory>(10);
+
+        initialisePaint();
+    }
+
+    // BEGIN_INCLUDE(onTouchEvent)
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+
+        final int action = event.getAction();
+
+        /*
+         * Switch on the action. The action is extracted from the event by
+         * applying the MotionEvent.ACTION_MASK. Alternatively a call to
+         * event.getActionMasked() would yield in the action as well.
+         */
+        switch (action & MotionEvent.ACTION_MASK) {
+
+            case MotionEvent.ACTION_DOWN: {
+                // first pressed gesture has started
+
+                /*
+                 * Only one touch event is stored in the MotionEvent. Extract
+                 * the pointer identifier of this touch from the first index
+                 * within the MotionEvent object.
+                 */
+                int id = event.getPointerId(0);
+
+                TouchHistory data = TouchHistory.obtain(event.getX(0), event.getY(0),
+                        event.getPressure(0));
+                data.label = "id: " + 0;
+
+                /*
+                 * Store the data under its pointer identifier. The pointer
+                 * number stays consistent for the duration of a gesture,
+                 * accounting for other pointers going up or down.
+                 */
+                mTouches.put(id, data);
+
+                mHasTouch = true;
+
+                break;
+            }
+
+            case MotionEvent.ACTION_POINTER_DOWN: {
+                /*
+                 * A non-primary pointer has gone down, after an event for the
+                 * primary pointer (ACTION_DOWN) has already been received.
+                 */
+
+                /*
+                 * The MotionEvent object contains multiple pointers. Need to
+                 * extract the index at which the data for this particular event
+                 * is stored.
+                 */
+                int index = event.getActionIndex();
+                int id = event.getPointerId(index);
+
+                TouchHistory data = TouchHistory.obtain(event.getX(index), event.getY(index),
+                        event.getPressure(index));
+                data.label = "id: " + id;
+
+                /*
+                 * Store the data under its pointer identifier. The index of
+                 * this pointer can change over multiple events, but this
+                 * pointer is always identified by the same identifier for this
+                 * active gesture.
+                 */
+                mTouches.put(id, data);
+
+                break;
+            }
+
+            case MotionEvent.ACTION_UP: {
+                /*
+                 * Final pointer has gone up and has ended the last pressed
+                 * gesture.
+                 */
+
+                /*
+                 * Extract the pointer identifier for the only event stored in
+                 * the MotionEvent object and remove it from the list of active
+                 * touches.
+                 */
+                int id = event.getPointerId(0);
+                TouchHistory data = mTouches.get(id);
+                mTouches.remove(id);
+                data.recycle();
+
+                mHasTouch = false;
+
+                break;
+            }
+
+            case MotionEvent.ACTION_POINTER_UP: {
+                /*
+                 * A non-primary pointer has gone up and other pointers are
+                 * still active.
+                 */
+
+                /*
+                 * The MotionEvent object contains multiple pointers. Need to
+                 * extract the index at which the data for this particular event
+                 * is stored.
+                 */
+                int index = event.getActionIndex();
+                int id = event.getPointerId(index);
+
+                TouchHistory data = mTouches.get(id);
+                mTouches.remove(id);
+                data.recycle();
+
+                break;
+            }
+
+            case MotionEvent.ACTION_MOVE: {
+                /*
+                 * A change event happened during a pressed gesture. (Between
+                 * ACTION_DOWN and ACTION_UP or ACTION_POINTER_DOWN and
+                 * ACTION_POINTER_UP)
+                 */
+
+                /*
+                 * Loop through all active pointers contained within this event.
+                 * Data for each pointer is stored in a MotionEvent at an index
+                 * (starting from 0 up to the number of active pointers). This
+                 * loop goes through each of these active pointers, extracts its
+                 * data (position and pressure) and updates its stored data. A
+                 * pointer is identified by its pointer number which stays
+                 * constant across touch events as long as it remains active.
+                 * This identifier is used to keep track of a pointer across
+                 * events.
+                 */
+                for (int index = 0; index < event.getPointerCount(); index++) {
+                    // get pointer id for data stored at this index
+                    int id = event.getPointerId(index);
+
+                    // get the data stored externally about this pointer.
+                    TouchHistory data = mTouches.get(id);
+
+                    // add previous position to history and add new values
+                    data.addHistory(data.x, data.y);
+                    data.setTouch(event.getX(index), event.getY(index),
+                            event.getPressure(index));
+
+                }
+
+                break;
+            }
+        }
+
+        // trigger redraw on UI thread
+        this.postInvalidate();
+
+        return true;
+    }
+
+    // END_INCLUDE(onTouchEvent)
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+
+        // Canvas background color depends on whether there is an active touch
+        if (mHasTouch) {
+            canvas.drawColor(BACKGROUND_ACTIVE);
+        } else {
+            // draw inactive border
+            canvas.drawRect(mBorderWidth, mBorderWidth, getWidth() - mBorderWidth, getHeight()
+                    - mBorderWidth, mBorderPaint);
+        }
+
+        // loop through all active touches and draw them
+        for (int i = 0; i < mTouches.size(); i++) {
+
+            // get the pointer id and associated data for this index
+            int id = mTouches.keyAt(i);
+            TouchHistory data = mTouches.valueAt(i);
+
+            // draw the data and its history to the canvas
+            drawCircle(canvas, id, data);
+        }
+    }
+
+    /*
+     * Below are only helper methods and variables required for drawing.
+     */
+
+    // radius of active touch circle in dp
+    private static final float CIRCLE_RADIUS_DP = 75f;
+    // radius of historical circle in dp
+    private static final float CIRCLE_HISTORICAL_RADIUS_DP = 7f;
+
+    // calculated radiuses in px
+    private float mCircleRadius;
+    private float mCircleHistoricalRadius;
+
+    private Paint mCirclePaint = new Paint();
+    private Paint mTextPaint = new Paint();
+
+    private static final int BACKGROUND_ACTIVE = Color.WHITE;
+
+    // inactive border
+    private static final float INACTIVE_BORDER_DP = 15f;
+    private static final int INACTIVE_BORDER_COLOR = 0xFFffd060;
+    private Paint mBorderPaint = new Paint();
+    private float mBorderWidth;
+
+    public final int[] COLORS = {
+            0xFF33B5E5, 0xFFAA66CC, 0xFF99CC00, 0xFFFFBB33, 0xFFFF4444,
+            0xFF0099CC, 0xFF9933CC, 0xFF669900, 0xFFFF8800, 0xFFCC0000
+    };
+
+    /**
+     * Sets up the required {@link Paint} objects for the screen density of this
+     * device.
+     */
+    private void initialisePaint() {
+
+        // Calculate radiuses in px from dp based on screen density
+        float density = getResources().getDisplayMetrics().density;
+        mCircleRadius = CIRCLE_RADIUS_DP * density;
+        mCircleHistoricalRadius = CIRCLE_HISTORICAL_RADIUS_DP * density;
+
+        // Setup text paint for circle label
+        mTextPaint.setTextSize(27f);
+        mTextPaint.setColor(Color.BLACK);
+
+        // Setup paint for inactive border
+        mBorderWidth = INACTIVE_BORDER_DP * density;
+        mBorderPaint.setStrokeWidth(mBorderWidth);
+        mBorderPaint.setColor(INACTIVE_BORDER_COLOR);
+        mBorderPaint.setStyle(Paint.Style.STROKE);
+
+    }
+
+    /**
+     * Draws the data encapsulated by a {@link TouchHistory} object to a canvas.
+     * A large circle indicates the current position held by the
+     * {@link TouchHistory} object, while a smaller circle is drawn for each
+     * entry in its history. The size of the large circle is scaled depending on
+     * its pressure, clamped to a maximum of <code>1.0</code>.
+     *
+     * @param canvas
+     * @param id
+     * @param data
+     */
+    protected void drawCircle(Canvas canvas, int id, TouchDisplayView.TouchHistory data) {
+        // select the color based on the id
+        int color = COLORS[id % COLORS.length];
+        mCirclePaint.setColor(color);
+
+        /*
+         * Draw the circle, size scaled to its pressure. Pressure is clamped to
+         * 1.0 max to ensure proper drawing. (Reported pressure values can
+         * exceed 1.0, depending on the calibration of the touch screen).
+         */
+        float pressure = Math.min(data.pressure, 1f);
+        float radius = pressure * mCircleRadius;
+
+        canvas.drawCircle(data.x, (data.y) - (radius / 2f), radius,
+                mCirclePaint);
+
+        // draw all historical points with a lower alpha value
+        mCirclePaint.setAlpha(125);
+        for (int j = 0; j < data.history.length && j < data.historyCount; j++) {
+            PointF p = data.history[j];
+            canvas.drawCircle(p.x, p.y, mCircleHistoricalRadius, mCirclePaint);
+        }
+
+        // draw its label next to the main circle
+        canvas.drawText(data.label, data.x + radius, data.y
+                - radius, mTextPaint);
+    }
+
+}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-hdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..c49a01f
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-mdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..34d8c42
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..abb5f12
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..ef649c1
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/layout/layout_mainactivity.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/layout/layout_mainactivity.xml
new file mode 100644
index 0000000..a53e5f1
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/layout/layout_mainactivity.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:padding="75dp"
+        android:text="@string/explanation" />
+
+    <com.example.android.input.multitouch.basicMultitouch.TouchDisplayView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+</FrameLayout>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v11/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v11/styles.xml
similarity index 100%
rename from input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v11/styles.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v11/styles.xml
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v14/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v14/styles.xml
similarity index 100%
rename from input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v14/styles.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v14/styles.xml
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/strings.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/strings.xml
new file mode 100644
index 0000000..541639c
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/strings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<resources>
+
+    <string name="app_name">BasicMultitouch</string>
+    <string name="explanation">This samples demonstrates the use of <b>MotionEvent</b> properties
+ to keep track of individual touches across multiple touch events.\n\n
+Touch the screen with multiple fingers to show that the pointer id
+(also represented by a colour) does not change as new touch events are received.</string>
+
+</resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/styles.xml
new file mode 100644
index 0000000..dedc633
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/styles.xml
@@ -0,0 +1,35 @@
+<!--
+  Copyright 2013 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.
+  -->
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/.gitignore b/input/multitouch/BasicMultitouch/BasicMultitouchSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/proguard-project.txt b/input/multitouch/BasicMultitouch/BasicMultitouchSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/AndroidManifest.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 043345c..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicmultitouch"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="8"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/MainActivity.java b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/MainActivity.java
deleted file mode 100644
index fc95a60..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/MainActivity.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2013 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.basicmultitouch;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-/**
- * This is an example of keeping track of individual touches across multiple
- * {@link android.view.MotionEvent}s.
- * <p>
- * This is illustrated by a View ({@link TouchDisplayView}) that responds to
- * touch events and draws coloured circles for each pointer, stores the last
- * positions of this pointer and draws them. This example shows the relationship
- * between MotionEvent indices, pointer identifiers and actions.
- *
- * @see android.view.MotionEvent
- */
-public class MainActivity extends Activity {
-    TouchDisplayView mView;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setContentView(R.layout.layout_mainactivity);
-    }
-
-}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/Pools.java b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/Pools.java
deleted file mode 100644
index 0eda0ee..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/Pools.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (C) 2009 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.basicmultitouch;
-
-/**
- * Helper class for crating pools of objects. An example use looks like this:
- * <pre>
- * public class MyPooledClass {
- *
- *     private static final SynchronizedPool<MyPooledClass> sPool =
- *             new SynchronizedPool<MyPooledClass>(10);
- *
- *     public static MyPooledClass obtain() {
- *         MyPooledClass instance = sPool.acquire();
- *         return (instance != null) ? instance : new MyPooledClass();
- *     }
- *
- *     public void recycle() {
- *          // Clear state if needed.
- *          sPool.release(this);
- *     }
- *
- *     . . .
- * }
- * </pre>
- *
- * @hide
- */
-public final class Pools {
-
-    /**
-     * Interface for managing a pool of objects.
-     *
-     * @param <T> The pooled type.
-     */
-    public static interface Pool<T> {
-
-        /**
-         * @return An instance from the pool if such, null otherwise.
-         */
-        public T acquire();
-
-        /**
-         * Release an instance to the pool.
-         *
-         * @param instance The instance to release.
-         * @return Whether the instance was put in the pool.
-         *
-         * @throws IllegalStateException If the instance is already in the pool.
-         */
-        public boolean release(T instance);
-    }
-
-    private Pools() {
-        /* do nothing - hiding constructor */
-    }
-
-    /**
-     * Simple (non-synchronized) pool of objects.
-     *
-     * @param <T> The pooled type.
-     */
-    public static class SimplePool<T> implements Pool<T> {
-        private final Object[] mPool;
-
-        private int mPoolSize;
-
-        /**
-         * Creates a new instance.
-         *
-         * @param maxPoolSize The max pool size.
-         *
-         * @throws IllegalArgumentException If the max pool size is less than zero.
-         */
-        public SimplePool(int maxPoolSize) {
-            if (maxPoolSize <= 0) {
-                throw new IllegalArgumentException("The max pool size must be > 0");
-            }
-            mPool = new Object[maxPoolSize];
-        }
-
-        @Override
-        @SuppressWarnings("unchecked")
-        public T acquire() {
-            if (mPoolSize > 0) {
-                final int lastPooledIndex = mPoolSize - 1;
-                T instance = (T) mPool[lastPooledIndex];
-                mPool[lastPooledIndex] = null;
-                mPoolSize--;
-                return instance;
-            }
-            return null;
-        }
-
-        @Override
-        public boolean release(T instance) {
-            if (isInPool(instance)) {
-                throw new IllegalStateException("Already in the pool!");
-            }
-            if (mPoolSize < mPool.length) {
-                mPool[mPoolSize] = instance;
-                mPoolSize++;
-                return true;
-            }
-            return false;
-        }
-
-        private boolean isInPool(T instance) {
-            for (int i = 0; i < mPoolSize; i++) {
-                if (mPool[i] == instance) {
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    /**
-     * Synchronized) pool of objects.
-     *
-     * @param <T> The pooled type.
-     */
-    public static class SynchronizedPool<T> extends SimplePool<T> {
-        private final Object mLock = new Object();
-
-        /**
-         * Creates a new instance.
-         *
-         * @param maxPoolSize The max pool size.
-         *
-         * @throws IllegalArgumentException If the max pool size is less than zero.
-         */
-        public SynchronizedPool(int maxPoolSize) {
-            super(maxPoolSize);
-        }
-
-        @Override
-        public T acquire() {
-            synchronized (mLock) {
-                return super.acquire();
-            }
-        }
-
-        @Override
-        public boolean release(T element) {
-            synchronized (mLock) {
-                return super.release(element);
-            }
-        }
-    }
-}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/TouchDisplayView.java b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/TouchDisplayView.java
deleted file mode 100644
index 78e6abe..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/TouchDisplayView.java
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * Copyright (C) 2013 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.basicmultitouch;
-
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.PointF;
-import android.util.AttributeSet;
-import android.util.SparseArray;
-import android.view.MotionEvent;
-import android.view.View;
-
-import com.example.android.basicmultitouch.Pools.SimplePool;
-
-/**
- * View that shows touch events and their history. This view demonstrates the
- * use of {@link #onTouchEvent(android.view.MotionEvent)} and {@link android.view.MotionEvent}s to keep
- * track of touch pointers across events.
- */
-public class TouchDisplayView extends View {
-
-    // Hold data for active touch pointer IDs
-    private SparseArray<TouchHistory> mTouches;
-
-    // Is there an active touch?
-    private boolean mHasTouch = false;
-
-    /**
-     * Holds data related to a touch pointer, including its current position,
-     * pressure and historical positions. Objects are allocated through an
-     * object pool using {@link #obtain()} and {@link #recycle()} to reuse
-     * existing objects.
-     */
-    static final class TouchHistory {
-
-        // number of historical points to store
-        public static final int HISTORY_COUNT = 20;
-
-        public float x;
-        public float y;
-        public float pressure = 0f;
-        public String label = null;
-
-        // current position in history array
-        public int historyIndex = 0;
-        public int historyCount = 0;
-
-        // arrray of pointer position history
-        public PointF[] history = new PointF[HISTORY_COUNT];
-
-        private static final int MAX_POOL_SIZE = 10;
-        private static final SimplePool<TouchHistory> sPool =
-                new SimplePool<TouchHistory>(MAX_POOL_SIZE);
-
-        public static TouchHistory obtain(float x, float y, float pressure) {
-            TouchHistory data = sPool.acquire();
-            if (data == null) {
-                data = new TouchHistory();
-            }
-
-            data.setTouch(x, y, pressure);
-
-            return data;
-        }
-
-        public TouchHistory() {
-
-            // initialise history array
-            for (int i = 0; i < HISTORY_COUNT; i++) {
-                history[i] = new PointF();
-            }
-        }
-
-        public void setTouch(float x, float y, float pressure) {
-            this.x = x;
-            this.y = y;
-            this.pressure = pressure;
-        }
-
-        public void recycle() {
-            this.historyIndex = 0;
-            this.historyCount = 0;
-            sPool.release(this);
-        }
-
-        /**
-         * Add a point to its history. Overwrites oldest point if the maximum
-         * number of historical points is already stored.
-         *
-         * @param point
-         */
-        public void addHistory(float x, float y) {
-            PointF p = history[historyIndex];
-            p.x = x;
-            p.y = y;
-
-            historyIndex = (historyIndex + 1) % history.length;
-
-            if (historyCount < HISTORY_COUNT) {
-                historyCount++;
-            }
-        }
-
-    }
-
-    public TouchDisplayView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-
-        // SparseArray for touch events, indexed by touch id
-        mTouches = new SparseArray<TouchHistory>(10);
-
-        initialisePaint();
-    }
-
-    // BEGIN_INCLUDE(onTouchEvent)
-    @Override
-    public boolean onTouchEvent(MotionEvent event) {
-
-        final int action = event.getAction();
-
-        /*
-         * Switch on the action. The action is extracted from the event by
-         * applying the MotionEvent.ACTION_MASK. Alternatively a call to
-         * event.getActionMasked() would yield in the action as well.
-         */
-        switch (action & MotionEvent.ACTION_MASK) {
-
-            case MotionEvent.ACTION_DOWN: {
-                // first pressed gesture has started
-
-                /*
-                 * Only one touch event is stored in the MotionEvent. Extract
-                 * the pointer identifier of this touch from the first index
-                 * within the MotionEvent object.
-                 */
-                int id = event.getPointerId(0);
-
-                TouchHistory data = TouchHistory.obtain(event.getX(0), event.getY(0),
-                        event.getPressure(0));
-                data.label = "id: " + 0;
-
-                /*
-                 * Store the data under its pointer identifier. The pointer
-                 * number stays consistent for the duration of a gesture,
-                 * accounting for other pointers going up or down.
-                 */
-                mTouches.put(id, data);
-
-                mHasTouch = true;
-
-                break;
-            }
-
-            case MotionEvent.ACTION_POINTER_DOWN: {
-                /*
-                 * A non-primary pointer has gone down, after an event for the
-                 * primary pointer (ACTION_DOWN) has already been received.
-                 */
-
-                /*
-                 * The MotionEvent object contains multiple pointers. Need to
-                 * extract the index at which the data for this particular event
-                 * is stored.
-                 */
-                int index = event.getActionIndex();
-                int id = event.getPointerId(index);
-
-                TouchHistory data = TouchHistory.obtain(event.getX(index), event.getY(index),
-                        event.getPressure(index));
-                data.label = "id: " + id;
-
-                /*
-                 * Store the data under its pointer identifier. The index of
-                 * this pointer can change over multiple events, but this
-                 * pointer is always identified by the same identifier for this
-                 * active gesture.
-                 */
-                mTouches.put(id, data);
-
-                break;
-            }
-
-            case MotionEvent.ACTION_UP: {
-                /*
-                 * Final pointer has gone up and has ended the last pressed
-                 * gesture.
-                 */
-
-                /*
-                 * Extract the pointer identifier for the only event stored in
-                 * the MotionEvent object and remove it from the list of active
-                 * touches.
-                 */
-                int id = event.getPointerId(0);
-                TouchHistory data = mTouches.get(id);
-                mTouches.remove(id);
-                data.recycle();
-
-                mHasTouch = false;
-
-                break;
-            }
-
-            case MotionEvent.ACTION_POINTER_UP: {
-                /*
-                 * A non-primary pointer has gone up and other pointers are
-                 * still active.
-                 */
-
-                /*
-                 * The MotionEvent object contains multiple pointers. Need to
-                 * extract the index at which the data for this particular event
-                 * is stored.
-                 */
-                int index = event.getActionIndex();
-                int id = event.getPointerId(index);
-
-                TouchHistory data = mTouches.get(id);
-                mTouches.remove(id);
-                data.recycle();
-
-                break;
-            }
-
-            case MotionEvent.ACTION_MOVE: {
-                /*
-                 * A change event happened during a pressed gesture. (Between
-                 * ACTION_DOWN and ACTION_UP or ACTION_POINTER_DOWN and
-                 * ACTION_POINTER_UP)
-                 */
-
-                /*
-                 * Loop through all active pointers contained within this event.
-                 * Data for each pointer is stored in a MotionEvent at an index
-                 * (starting from 0 up to the number of active pointers). This
-                 * loop goes through each of these active pointers, extracts its
-                 * data (position and pressure) and updates its stored data. A
-                 * pointer is identified by its pointer number which stays
-                 * constant across touch events as long as it remains active.
-                 * This identifier is used to keep track of a pointer across
-                 * events.
-                 */
-                for (int index = 0; index < event.getPointerCount(); index++) {
-                    // get pointer id for data stored at this index
-                    int id = event.getPointerId(index);
-
-                    // get the data stored externally about this pointer.
-                    TouchHistory data = mTouches.get(id);
-
-                    // add previous position to history and add new values
-                    data.addHistory(data.x, data.y);
-                    data.setTouch(event.getX(index), event.getY(index),
-                            event.getPressure(index));
-
-                }
-
-                break;
-            }
-        }
-
-        // trigger redraw on UI thread
-        this.postInvalidate();
-
-        return true;
-    }
-
-    // END_INCLUDE(onTouchEvent)
-
-    @Override
-    protected void onDraw(Canvas canvas) {
-        super.onDraw(canvas);
-
-        // Canvas background color depends on whether there is an active touch
-        if (mHasTouch) {
-            canvas.drawColor(BACKGROUND_ACTIVE);
-        } else {
-            // draw inactive border
-            canvas.drawRect(mBorderWidth, mBorderWidth, getWidth() - mBorderWidth, getHeight()
-                    - mBorderWidth, mBorderPaint);
-        }
-
-        // loop through all active touches and draw them
-        for (int i = 0; i < mTouches.size(); i++) {
-
-            // get the pointer id and associated data for this index
-            int id = mTouches.keyAt(i);
-            TouchHistory data = mTouches.valueAt(i);
-
-            // draw the data and its history to the canvas
-            drawCircle(canvas, id, data);
-        }
-    }
-
-    /*
-     * Below are only helper methods and variables required for drawing.
-     */
-
-    // radius of active touch circle in dp
-    private static final float CIRCLE_RADIUS_DP = 75f;
-    // radius of historical circle in dp
-    private static final float CIRCLE_HISTORICAL_RADIUS_DP = 7f;
-
-    // calculated radiuses in px
-    private float mCircleRadius;
-    private float mCircleHistoricalRadius;
-
-    private Paint mCirclePaint = new Paint();
-    private Paint mTextPaint = new Paint();
-
-    private static final int BACKGROUND_ACTIVE = Color.WHITE;
-
-    // inactive border
-    private static final float INACTIVE_BORDER_DP = 15f;
-    private static final int INACTIVE_BORDER_COLOR = 0xFFffd060;
-    private Paint mBorderPaint = new Paint();
-    private float mBorderWidth;
-
-    public final int[] COLORS = {
-            0xFF33B5E5, 0xFFAA66CC, 0xFF99CC00, 0xFFFFBB33, 0xFFFF4444,
-            0xFF0099CC, 0xFF9933CC, 0xFF669900, 0xFFFF8800, 0xFFCC0000
-    };
-
-    /**
-     * Sets up the required {@link android.graphics.Paint} objects for the screen density of this
-     * device.
-     */
-    private void initialisePaint() {
-
-        // Calculate radiuses in px from dp based on screen density
-        float density = getResources().getDisplayMetrics().density;
-        mCircleRadius = CIRCLE_RADIUS_DP * density;
-        mCircleHistoricalRadius = CIRCLE_HISTORICAL_RADIUS_DP * density;
-
-        // Setup text paint for circle label
-        mTextPaint.setTextSize(27f);
-        mTextPaint.setColor(Color.BLACK);
-
-        // Setup paint for inactive border
-        mBorderWidth = INACTIVE_BORDER_DP * density;
-        mBorderPaint.setStrokeWidth(mBorderWidth);
-        mBorderPaint.setColor(INACTIVE_BORDER_COLOR);
-        mBorderPaint.setStyle(Paint.Style.STROKE);
-
-    }
-
-    /**
-     * Draws the data encapsulated by a {@link TouchDisplayView.TouchHistory} object to a canvas.
-     * A large circle indicates the current position held by the
-     * {@link TouchDisplayView.TouchHistory} object, while a smaller circle is drawn for each
-     * entry in its history. The size of the large circle is scaled depending on
-     * its pressure, clamped to a maximum of <code>1.0</code>.
-     *
-     * @param canvas
-     * @param id
-     * @param data
-     */
-    protected void drawCircle(Canvas canvas, int id, TouchHistory data) {
-        // select the color based on the id
-        int color = COLORS[id % COLORS.length];
-        mCirclePaint.setColor(color);
-
-        /*
-         * Draw the circle, size scaled to its pressure. Pressure is clamped to
-         * 1.0 max to ensure proper drawing. (Reported pressure values can
-         * exceed 1.0, depending on the calibration of the touch screen).
-         */
-        float pressure = Math.min(data.pressure, 1f);
-        float radius = pressure * mCircleRadius;
-
-        canvas.drawCircle(data.x, (data.y) - (radius / 2f), radius,
-                mCirclePaint);
-
-        // draw all historical points with a lower alpha value
-        mCirclePaint.setAlpha(125);
-        for (int j = 0; j < data.history.length && j < data.historyCount; j++) {
-            PointF p = data.history[j];
-            canvas.drawCircle(p.x, p.y, mCircleHistoricalRadius, mCirclePaint);
-        }
-
-        // draw its label next to the main circle
-        canvas.drawText(data.label, data.x + radius, data.y
-                - radius, mTextPaint);
-    }
-
-}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-hdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-mdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/layout/layout_mainactivity.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/layout/layout_mainactivity.xml
deleted file mode 100644
index 539a43a..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/layout/layout_mainactivity.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent" >
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:padding="75dp"
-        android:text="@string/intro_message" />
-
-    <com.example.android.basicmultitouch.TouchDisplayView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content" />
-
-</FrameLayout>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/strings.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/strings.xml
deleted file mode 100644
index 5765548..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<resources>
-
-</resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/styles.xml
deleted file mode 100644
index e56d4f8..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-<resources>
-
-    <!--
-        Base application theme, dependent on API level. This theme is replaced
-        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-    -->
-    <style name="AppBaseTheme" parent="android:Theme.Light.NoTitleBar">
-        <!--
-            Theme customizations available in newer API levels can go in
-            res/values-vXX/styles.xml, while customizations related to
-            backward-compatibility can go here.
-        -->
-    </style>
-
-</resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/README.txt b/input/multitouch/BasicMultitouch/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/build.gradle b/input/multitouch/BasicMultitouch/build.gradle
index cca9ac3..036abc8 100644
--- a/input/multitouch/BasicMultitouch/build.gradle
+++ b/input/multitouch/BasicMultitouch/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/input/multitouch/BasicMultitouch/buildSrc/build.gradle b/input/multitouch/BasicMultitouch/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/input/multitouch/BasicMultitouch/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties b/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties
+++ b/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/input/multitouch/BasicMultitouch/multitouch.jd b/input/multitouch/BasicMultitouch/multitouch.jd
new file mode 100644
index 0000000..d9108bb
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/multitouch.jd
@@ -0,0 +1,24 @@
+page.title=Multitouch Sample
+@jd:body
+
+<p>This samples demonstrates the use of <pre>MotionEvent</pre> properties to keep track of individual touches across multiple touch events.</p>
+
+<p>A <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> describes a movement event.
+For touch events, they contain an action, X and Y coordinates and other relevant information. Multi-touch screens can report multiple movement traces at the same time, 
+reporting all active touches within a single <pre>MotionEvent</pre>.</p>
+
+<p>Each pointer has a unique id that is assigned when it first goes down
+ (indicated by <pre><a href="/reference/android/view/MotionEvent.html#ACTION_DOWN">ACTION_DOWN</a></pre> or <pre><a href="/reference/android/view/MotionEvent.html#ACTION_POINTER_DOWN">ACTION_POINTER_DOWN</a></pre>).  A pointer id
+ remains valid until the pointer eventually goes up (indicated by <pre><a href="/reference/android/view/MotionEvent.html#ACTION_UP">ACTION_UP</a></pre>
+ or <pre><a href="/reference/android/view/MotionEvent.html#ACTION_POINTER_UP">ACTION_POINTER_UP</a></pre>) or when the gesture is canceled (indicated by
+ <pre><a href="/reference/android/view/MotionEvent.html#ACTION_CANCEL">ACTION_CANCEL</a></pre>).
+ </p>
+ 
+<p>The sample shows how these pointer identifiers can be used over subsequent events to track individual fingers. 
+This is illustrated by a custom View that responds to touch events. Coloured circles are drawn for each finger, showing its current and past position on the screen.
+This example shows the relationship between <pre>MotionEvent</pre> indices, pointer identifiers and <pre>MotionEvent</pre> actions.</p>
+
+<p>For more information, see the relevant <a href="http://android-developers.blogspot.com.au/2010/06/making-sense-of-multitouch.html">blog post</a> and 
+<a href="http://developer.android.com/reference/android/view/MotionEvent.html"><pre>MotionEvent</pre></a> API documentation. </p> 
+
+<p><img src="images/MultitouchSample.png" /></p>
diff --git a/input/multitouch/BasicMultitouch/settings.gradle b/input/multitouch/BasicMultitouch/settings.gradle
index 6e6c5ba..5587917 100644
--- a/input/multitouch/BasicMultitouch/settings.gradle
+++ b/input/multitouch/BasicMultitouch/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicMultitouchSample'
+include ':BasicMultitouch'
diff --git a/input/multitouch/BasicMultitouch/template-params.xml b/input/multitouch/BasicMultitouch/template-params.xml
deleted file mode 100644
index 7677818..0000000
--- a/input/multitouch/BasicMultitouch/template-params.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicMultitouch</name>
-    <group>Input</group>
-    <package>com.example.android.basicmultitouch</package>
-
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>8</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-This samples demonstrates the use of MotionEvent properties to keep track of individual touches
-across multiple touch events.
-\n\nTouch the screen with multiple fingers to show that the pointer id
-(also represented by a colour) does not change as new touch events are received.</string>
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/.gitignore b/media/BasicMediaDecoder/BasicMediaDecoderSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/proguard-project.txt b/media/BasicMediaDecoder/BasicMediaDecoderSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/AndroidManifest.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/AndroidManifest.xml
deleted file mode 100644
index d191491..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicmediadecoder"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="17"/>
-    <application
-        android:label="@string/app_name" android:icon="@drawable/ic_launcher">
-        <activity
-            android:name=".MainActivity"
-            android:screenOrientation="landscape"
-            android:label="@string/app_name">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/java/com/example/android/basicmediadecoder/MainActivity.java b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/java/com/example/android/basicmediadecoder/MainActivity.java
deleted file mode 100644
index cac5bf2..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/java/com/example/android/basicmediadecoder/MainActivity.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2013 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.basicmediadecoder;
-
-
-import android.animation.TimeAnimator;
-import android.app.Activity;
-import android.media.MediaCodec;
-import android.media.MediaExtractor;
-import android.net.Uri;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
-import android.view.Surface;
-import android.view.TextureView;
-import android.view.View;
-import android.widget.TextView;
-
-import com.example.android.common.media.MediaCodecWrapper;
-
-import java.io.IOException;
-
-/**
- * This activity uses a {@link android.view.TextureView} to render the frames of a video decoded using
- * {@link android.media.MediaCodec} API.
- */
-public class MainActivity extends Activity {
-
-    private TextureView mPlaybackView;
-    private TimeAnimator mTimeAnimator = new TimeAnimator();
-
-    // A utility that wraps up the underlying input and output buffer processing operations
-    // into an east to use API.
-    private MediaCodecWrapper mCodecWrapper;
-    private MediaExtractor mExtractor = new MediaExtractor();
-    TextView mAttribView = null;
-
-
-    /**
-     * Called when the activity is first created.
-     */
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-        mPlaybackView = (TextureView) findViewById(R.id.PlaybackView);
-        mAttribView =  (TextView)findViewById(R.id.AttribView);
-
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        MenuInflater inflater = getMenuInflater();
-        inflater.inflate(R.menu.action_menu, menu);
-        return true;
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        if(mTimeAnimator != null && mTimeAnimator.isRunning()) {
-            mTimeAnimator.end();
-        }
-
-        if (mCodecWrapper != null ) {
-            mCodecWrapper.stopAndRelease();
-            mExtractor.release();
-        }
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.menu_play) {
-            mAttribView.setVisibility(View.VISIBLE);
-            startPlayback();
-            item.setEnabled(false);
-        }
-        return true;
-    }
-
-
-    public void startPlayback() {
-
-        // Construct a URI that points to the video resource that we want to play
-        Uri videoUri = Uri.parse("android.resource://"
-                + getPackageName() + "/"
-                + R.raw.vid_bigbuckbunny);
-
-        try {
-
-            // BEGIN_INCLUDE(initialize_extractor)
-            mExtractor.setDataSource(this, videoUri, null);
-            int nTracks = mExtractor.getTrackCount();
-
-            // Begin by unselecting all of the tracks in the extractor, so we won't see
-            // any tracks that we haven't explicitly selected.
-            for (int i = 0; i < nTracks; ++i) {
-                mExtractor.unselectTrack(i);
-            }
-
-
-            // Find the first video track in the stream. In a real-world application
-            // it's possible that the stream would contain multiple tracks, but this
-            // sample assumes that we just want to play the first one.
-            for (int i = 0; i < nTracks; ++i) {
-                // Try to create a video codec for this track. This call will return null if the
-                // track is not a video track, or not a recognized video format. Once it returns
-                // a valid MediaCodecWrapper, we can break out of the loop.
-                mCodecWrapper = MediaCodecWrapper.fromVideoFormat(mExtractor.getTrackFormat(i),
-                        new Surface(mPlaybackView.getSurfaceTexture()));
-                if (mCodecWrapper != null) {
-                    mExtractor.selectTrack(i);
-                    break;
-                }
-            }
-            // END_INCLUDE(initialize_extractor)
-
-
-
-
-            // By using a {@link TimeAnimator}, we can sync our media rendering commands with
-            // the system display frame rendering. The animator ticks as the {@link Choreographer}
-            // recieves VSYNC events.
-            mTimeAnimator.setTimeListener(new TimeAnimator.TimeListener() {
-                @Override
-                public void onTimeUpdate(final TimeAnimator animation,
-                                         final long totalTime,
-                                         final long deltaTime) {
-
-                    boolean isEos = ((mExtractor.getSampleFlags() & MediaCodec
-                            .BUFFER_FLAG_END_OF_STREAM) == MediaCodec.BUFFER_FLAG_END_OF_STREAM);
-
-                    // BEGIN_INCLUDE(write_sample)
-                    if (!isEos) {
-                        // Try to submit the sample to the codec and if successful advance the
-                        // extractor to the next available sample to read.
-                        boolean result = mCodecWrapper.writeSample(mExtractor, false,
-                                mExtractor.getSampleTime(), mExtractor.getSampleFlags());
-
-                        if (result) {
-                            // Advancing the extractor is a blocking operation and it MUST be
-                            // executed outside the main thread in real applications.
-                            mExtractor.advance();
-                        }
-                    }
-                    // END_INCLUDE(write_sample)
-
-                    // Examine the sample at the head of the queue to see if its ready to be
-                    // rendered and is not zero sized End-of-Stream record.
-                    MediaCodec.BufferInfo out_bufferInfo = new MediaCodec.BufferInfo();
-                    mCodecWrapper.peekSample(out_bufferInfo);
-
-                    // BEGIN_INCLUDE(render_sample)
-                    if (out_bufferInfo.size <= 0 && isEos) {
-                        mTimeAnimator.end();
-                        mCodecWrapper.stopAndRelease();
-                        mExtractor.release();
-                    } else if (out_bufferInfo.presentationTimeUs / 1000 < totalTime) {
-                        // Pop the sample off the queue and send it to {@link Surface}
-                        mCodecWrapper.popSample(true);
-                    }
-                    // END_INCLUDE(render_sample)
-
-                }
-            });
-
-            // We're all set. Kick off the animator to process buffers and render video frames as
-            // they become available
-            mTimeAnimator.start();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play.png
deleted file mode 100755
index dbfd337..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play_disabled.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play_disabled.png
deleted file mode 100755
index e4310ef..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play_disabled.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 9bc536b..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play.png
deleted file mode 100755
index a2f198a..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play_disabled.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play_disabled.png
deleted file mode 100755
index d69107b..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play_disabled.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index d656b21..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play.png
deleted file mode 100755
index 9e63c90..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play_disabled.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play_disabled.png
deleted file mode 100755
index 2ff8c39..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play_disabled.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index bbb9b16..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 4a5c33f..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable/selector_play.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable/selector_play.xml
deleted file mode 100644
index 2307135..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable/selector_play.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_enabled="true"
-          android:drawable="@drawable/ic_action_play"/>
-
-    <item android:state_enabled="false"
-          android:drawable="@drawable/ic_action_play_disabled"/>
-</selector>
\ No newline at end of file
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/layout/sample_main.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/layout/sample_main.xml
deleted file mode 100644
index 7543120..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/layout/sample_main.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 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.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="vertical"
-              android:layout_width="fill_parent"
-              android:layout_height="fill_parent"
-    >
-    <TextureView
-        android:id="@+id/PlaybackView"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"/>
-    <TextView
-            android:id="@+id/AttribView"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="right|bottom"
-            android:visibility="gone"
-            android:textColor="@android:color/holo_blue_bright"
-            android:text="@string/app_video_attrib"/>
-</FrameLayout>
-
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/menu/action_menu.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/menu/action_menu.xml
deleted file mode 100644
index 2b31a86..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/menu/action_menu.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 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.
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:id="@+id/menu_play"
-          android:icon="@drawable/selector_play"
-          android:title="Play"
-          android:showAsAction="ifRoom|withText" />
-</menu>
\ No newline at end of file
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/raw/vid_bigbuckbunny.mp4 b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/raw/vid_bigbuckbunny.mp4
deleted file mode 100644
index 81d11df..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/raw/vid_bigbuckbunny.mp4
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/values/strings.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/values/strings.xml
deleted file mode 100644
index 2cf79ab..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2013 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.
--->
-<resources>
-    <string name="app_video_attrib">(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org
-    </string>
-</resources>
diff --git a/media/BasicMediaDecoder/build.gradle b/media/BasicMediaDecoder/build.gradle
deleted file mode 100644
index c7a137e..0000000
--- a/media/BasicMediaDecoder/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../build"
-  pathToSamplesCommon "../../common"
-}
-apply from: "../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/media/BasicMediaDecoder/buildSrc/build.gradle b/media/BasicMediaDecoder/buildSrc/build.gradle
deleted file mode 100644
index 29282af..0000000
--- a/media/BasicMediaDecoder/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.jar b/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties b/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/media/BasicMediaDecoder/gradlew b/media/BasicMediaDecoder/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/media/BasicMediaDecoder/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/media/BasicMediaDecoder/gradlew.bat b/media/BasicMediaDecoder/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/media/BasicMediaDecoder/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/media/BasicMediaDecoder/settings.gradle b/media/BasicMediaDecoder/settings.gradle
deleted file mode 100644
index 1e76e09..0000000
--- a/media/BasicMediaDecoder/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-include 'BasicMediaDecoderSample'
diff --git a/media/BasicMediaDecoder/template-params.xml b/media/BasicMediaDecoder/template-params.xml
deleted file mode 100644
index bcb01af..0000000
--- a/media/BasicMediaDecoder/template-params.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicMediaDecoder</name>
-    <group>Media</group>
-    <package>com.example.android.basicmediadecoder</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>17</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-             This activity uses a TextureView to render the frames of a video decoded using the
-             MediaCodec API.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="media"/>
-</sample>
diff --git a/media/BasicMediaRouter/BasicMediaRouter/build.gradle b/media/BasicMediaRouter/BasicMediaRouter/build.gradle
new file mode 100644
index 0000000..945e1f5
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/AndroidManifest.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..f909d5e
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.output.mediaroutersample"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="17"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.media.basicmediarouter.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/MainActivity.java b/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/MainActivity.java
new file mode 100644
index 0000000..ccf6ad0
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/MainActivity.java
@@ -0,0 +1,303 @@
+/*
+ * Copyright 2013 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.media.basicmediarouter;
+
+import android.app.Activity;
+import android.app.MediaRouteActionProvider;
+import android.app.Presentation;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.media.MediaRouter;
+import android.media.MediaRouter.RouteInfo;
+import android.os.Bundle;
+import android.view.Display;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.example.android.output.mediaroutersample.R;
+
+/**
+ * <p>
+ * This sample demonstrates the use of the MediaRouter API to show content on a
+ * secondary display using a {@link Presentation}.
+ * </p>
+ * <p>
+ * The activity uses the {@link MediaRouter} API to automatically detect when a
+ * presentation display is available and to allow the user to control the media
+ * routes using a menu item provided by the {@link MediaRouteActionProvider}.
+ * When a presentation display is available a {@link Presentation} (implemented
+ * as a {@link SamplePresentation}) is shown on the preferred display. A button
+ * toggles the background color of the secondary screen to show the interaction
+ * between the primary and secondary screens.
+ * </p>
+ * <p>
+ * This sample requires an HDMI or Wifi display. Alternatively, the
+ * "Simulate secondary displays" feature in Development Settings can be enabled
+ * to simulate secondary displays.
+ * </p>
+ *
+ * @see Presentation
+ * @see MediaRouter
+ */
+public class MainActivity extends Activity {
+
+    private MediaRouter mMediaRouter;
+
+    // Active Presentation, set to null if no secondary screen is enabled
+    private SamplePresentation mPresentation;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.activity_main);
+        mTextStatus = (TextView) findViewById(R.id.textStatus);
+
+        // get the list of background colors
+        mColors = getResources().getIntArray(R.array.androidcolors);
+
+        // Enable clicks on the 'change color' button
+        mButton = (Button) findViewById(R.id.button1);
+        mButton.setOnClickListener(new View.OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                showNextColor();
+            }
+        });
+
+        // BEGIN_INCLUDE(getMediaRouter)
+        // Get the MediaRouter service
+        mMediaRouter = (MediaRouter) getSystemService(Context.MEDIA_ROUTER_SERVICE);
+        // END_INCLUDE(getMediaRouter)
+    }
+
+    /**
+     * Implementing a {@link MediaRouter.Callback} to update the displayed
+     * {@link Presentation} when a route is selected, unselected or the
+     * presentation display has changed. The provided stub implementation
+     * {@link MediaRouter.SimpleCallback} is extended and only
+     * {@link MediaRouter.SimpleCallback#onRouteSelected(MediaRouter, int, RouteInfo)}
+     * ,
+     * {@link MediaRouter.SimpleCallback#onRouteUnselected(MediaRouter, int, RouteInfo)}
+     * and
+     * {@link MediaRouter.SimpleCallback#onRoutePresentationDisplayChanged(MediaRouter, RouteInfo)}
+     * are overridden to update the displayed {@link Presentation} in
+     * {@link #updatePresentation()}. These callbacks enable or disable the
+     * second screen presentation based on the routing provided by the
+     * {@link MediaRouter} for {@link MediaRouter#ROUTE_TYPE_LIVE_VIDEO}
+     * streams. @
+     */
+    private final MediaRouter.SimpleCallback mMediaRouterCallback =
+            new MediaRouter.SimpleCallback() {
+
+                // BEGIN_INCLUDE(SimpleCallback)
+                /**
+                 * A new route has been selected as active. Disable the current
+                 * route and enable the new one.
+                 */
+                @Override
+                public void onRouteSelected(MediaRouter router, int type, RouteInfo info) {
+                    updatePresentation();
+                }
+
+                /**
+                 * The route has been unselected.
+                 */
+                @Override
+                public void onRouteUnselected(MediaRouter router, int type, RouteInfo info) {
+                    updatePresentation();
+
+                }
+
+                /**
+                 * The route's presentation display has changed. This callback
+                 * is called when the presentation has been activated, removed
+                 * or its properties have changed.
+                 */
+                @Override
+                public void onRoutePresentationDisplayChanged(MediaRouter router, RouteInfo info) {
+                    updatePresentation();
+                }
+                // END_INCLUDE(SimpleCallback)
+            };
+
+    /**
+     * Updates the displayed presentation to enable a secondary screen if it has
+     * been selected in the {@link MediaRouter} for the
+     * {@link MediaRouter#ROUTE_TYPE_LIVE_VIDEO} type. If no screen has been
+     * selected by the {@link MediaRouter}, the current screen is disabled.
+     * Otherwise a new {@link SamplePresentation} is initialized and shown on
+     * the secondary screen.
+     */
+    private void updatePresentation() {
+
+        // BEGIN_INCLUDE(updatePresentationInit)
+        // Get the selected route for live video
+        MediaRouter.RouteInfo selectedRoute = mMediaRouter.getSelectedRoute(
+                MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
+
+        // Get its Display if a valid route has been selected
+        Display selectedDisplay = null;
+        if (selectedRoute != null) {
+            selectedDisplay = selectedRoute.getPresentationDisplay();
+        }
+        // END_INCLUDE(updatePresentationInit)
+
+        // BEGIN_INCLUDE(updatePresentationDismiss)
+        /*
+         * Dismiss the current presentation if the display has changed or no new
+         * route has been selected
+         */
+        if (mPresentation != null && mPresentation.getDisplay() != selectedDisplay) {
+            mPresentation.dismiss();
+            mPresentation = null;
+            mButton.setEnabled(false);
+            mTextStatus.setText(R.string.secondary_notconnected);
+        }
+        // END_INCLUDE(updatePresentationDismiss)
+
+        // BEGIN_INCLUDE(updatePresentationNew)
+        /*
+         * Show a new presentation if the previous one has been dismissed and a
+         * route has been selected.
+         */
+        if (mPresentation == null && selectedDisplay != null) {
+
+            // Initialise a new Presentation for the Display
+            mPresentation = new SamplePresentation(this, selectedDisplay);
+            mPresentation.setOnDismissListener(mOnDismissListener);
+
+            // Try to show the presentation, this might fail if the display has
+            // gone away in the mean time
+            try {
+                mPresentation.show();
+                mTextStatus.setText(getResources().getString(R.string.secondary_connected,
+                        selectedRoute.getName(MainActivity.this)));
+                mButton.setEnabled(true);
+                showNextColor();
+            } catch (WindowManager.InvalidDisplayException ex) {
+                // Couldn't show presentation - display was already removed
+                mPresentation = null;
+            }
+        }
+        // END_INCLUDE(updatePresentationNew)
+
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        // BEGIN_INCLUDE(addCallback)
+        // Register a callback for all events related to live video devices
+        mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_LIVE_VIDEO, mMediaRouterCallback);
+        // END_INCLUDE(addCallback)
+
+        // Show the 'Not connected' status message
+        mButton.setEnabled(false);
+        mTextStatus.setText(R.string.secondary_notconnected);
+
+        // Update the displays based on the currently active routes
+        updatePresentation();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+
+        // BEGIN_INCLUDE(onPause)
+        // Stop listening for changes to media routes.
+        mMediaRouter.removeCallback(mMediaRouterCallback);
+        // END_INCLUDE(onPause)
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+
+        // BEGIN_INCLUDE(onStop)
+        // Dismiss the presentation when the activity is not visible.
+        if (mPresentation != null) {
+            mPresentation.dismiss();
+            mPresentation = null;
+        }
+        // BEGIN_INCLUDE(onStop)
+    }
+
+    /**
+     * Inflates the ActionBar or options menu. The menu file defines an item for
+     * the {@link MediaRouteActionProvider}, which is registered here for all
+     * live video devices using {@link MediaRouter#ROUTE_TYPE_LIVE_VIDEO}.
+     */
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+
+        getMenuInflater().inflate(R.menu.main, menu);
+
+        // BEGIN_INCLUDE(MediaRouteActionProvider)
+        // Configure the media router action provider
+        MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
+        MediaRouteActionProvider mediaRouteActionProvider =
+                (MediaRouteActionProvider) mediaRouteMenuItem.getActionProvider();
+        mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
+        // BEGIN_INCLUDE(MediaRouteActionProvider)
+
+        return true;
+    }
+
+    /**
+     * Listens for dismissal of the {@link SamplePresentation} and removes its
+     * reference.
+     */
+    private final DialogInterface.OnDismissListener mOnDismissListener =
+            new DialogInterface.OnDismissListener() {
+                @Override
+                public void onDismiss(DialogInterface dialog) {
+                    if (dialog == mPresentation) {
+                        mPresentation = null;
+                    }
+                }
+            };
+
+    // Views used to display status information on the primary screen
+    private TextView mTextStatus;
+    private Button mButton;
+
+    // selected color index
+    private int mColor = 0;
+
+    // background colors
+    public int[] mColors;
+
+    /**
+     * Displays the next color on the secondary screen if it is activate.
+     */
+    private void showNextColor() {
+        if (mPresentation != null) {
+            // a second screen is active and initialized, show the next color
+            mPresentation.setColor(mColors[mColor]);
+            mColor = (mColor + 1) % mColors.length;
+        }
+    }
+
+}
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/SamplePresentation.java b/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/SamplePresentation.java
new file mode 100644
index 0000000..0938635
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/SamplePresentation.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2013 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.media.basicmediarouter;
+
+import android.app.Presentation;
+import android.content.Context;
+import android.os.Bundle;
+import android.view.Display;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.example.android.output.mediaroutersample.R;
+
+/**
+ * <p>
+ * A {@link Presentation} used to demonstrate interaction between primary and
+ * secondary screens.
+ * </p>
+ * <p>
+ * It displays the name of the display in which it has been embedded (see
+ * {@link Presentation#getDisplay()}) and exposes a facility to change its
+ * background color and display its text.
+ * </p>
+ */
+public class SamplePresentation extends Presentation {
+
+    private LinearLayout mLayout;
+    private TextView mText;
+
+    public SamplePresentation(Context outerContext, Display display) {
+        super(outerContext, display);
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Set the content view to the custom layout
+        setContentView(R.layout.display);
+
+        // Get the Views
+        mLayout = (LinearLayout) findViewById(R.id.display_layout);
+        mText = (TextView) findViewById(R.id.display_text);
+
+        /*
+         * Show the name of the display this presentation was embedded in.
+         */
+        TextView smallText = (TextView) findViewById(R.id.display_smalltext);
+        final String name = getDisplay().getName();
+        smallText.setText(getResources().getString(R.string.display_name, name));
+    }
+
+    /**
+     * Set the background color of the layout and display the color as a String.
+     *
+     * @param color The background color
+     */
+    public void setColor(int color) {
+        mLayout.setBackgroundColor(color);
+
+        // Display the color as a string on screen
+        String s = getResources().getString(R.string.display_color, color);
+        mText.setText(s);
+    }
+
+}
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-hdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..2fd4ce4
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-mdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..56b78c5
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..da3db3b
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4aa8bdd
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/activity_main.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..18565c4
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/activity_main.xml
@@ -0,0 +1,32 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/LinearLayout1"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:gravity="center"
+    android:orientation="vertical"
+    tools:context=".MainActivity" >
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:padding="5dp"
+        android:text="@string/intro" />
+
+    <TextView
+        android:id="@+id/textStatus"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:text="@string/secondary_notconnected"
+        android:textAppearance="?android:attr/textAppearanceLarge"
+        android:layout_margin="5dp" />
+
+    <Button
+        android:id="@+id/button1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:enabled="false"
+        android:text="@string/change_color" />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/display.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/display.xml
similarity index 100%
rename from media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/display.xml
rename to media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/display.xml
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/menu/main.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/menu/main.xml
similarity index 100%
rename from media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/menu/main.xml
rename to media/BasicMediaRouter/BasicMediaRouter/src/main/res/menu/main.xml
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v11/styles.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..541752f
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v14/styles.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..f20e015
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/colors.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/colors.xml
similarity index 100%
rename from media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/colors.xml
rename to media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/colors.xml
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/strings.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/strings.xml
new file mode 100644
index 0000000..ca9e53f
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/strings.xml
@@ -0,0 +1,19 @@
+<resources>
+
+    <string name="menu_present_to">Present to</string>
+    <string name="app_name">BasicMediaRouter Sample</string>
+    <string name="title_activity_main">MainActivity</string>
+    <string name="intro">This sample demonstrates the use of the MediaRouter API to display
+ content on a secondary display.\n\nUse the <b>Media Route Action Item</b> in the ActionBar
+ to select an output device. If your device supports Miracast wireless displays,
+ you may need to enable <b>Wireless Display</b> functionality in the system settings.
+ Secondary screen simulation can also be enabled from the <b>Developer Options</b>.\n\n
+Once connected, use the <b>Change Color</b> button to change the background color of the secondary screen.
+</string>
+    <string name="secondary_connected">Connected to:\n%s</string>
+    <string name="secondary_notconnected">No secondary display connected.</string>
+    <string name="change_color">Change Color</string>
+    <string name="display_name">This display is: %s</string>
+    <string name="display_color">Background color: #%X</string>
+
+</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/styles.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/styles.xml
new file mode 100644
index 0000000..05c67f3
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/styles.xml
@@ -0,0 +1,26 @@
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+    <style name="DisplayLargeText">
+        <item name="android:textSize">30sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">#FFFFFF</item>
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/.gitignore b/media/BasicMediaRouter/BasicMediaRouterSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/proguard-project.txt b/media/BasicMediaRouter/BasicMediaRouterSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/AndroidManifest.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 33c20d5..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicmediarouter"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="17"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/MainActivity.java b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/MainActivity.java
deleted file mode 100644
index 23b2709..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/MainActivity.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright 2013 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.basicmediarouter;
-
-import android.app.Activity;
-import android.app.MediaRouteActionProvider;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.media.MediaRouter;
-import android.media.MediaRouter.RouteInfo;
-import android.os.Bundle;
-import android.view.Display;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.WindowManager;
-import android.widget.Button;
-import android.widget.TextView;
-
-/**
- * <p>
- * This sample demonstrates the use of the MediaRouter API to show content on a
- * secondary display using a {@link android.app.Presentation}.
- * </p>
- * <p>
- * The activity uses the {@link android.media.MediaRouter} API to automatically detect when a
- * presentation display is available and to allow the user to control the media
- * routes using a menu item provided by the {@link android.app.MediaRouteActionProvider}.
- * When a presentation display is available a {@link android.app.Presentation} (implemented
- * as a {@link SamplePresentation}) is shown on the preferred display. A button
- * toggles the background color of the secondary screen to show the interaction
- * between the primary and secondary screens.
- * </p>
- * <p>
- * This sample requires an HDMI or Wifi display. Alternatively, the
- * "Simulate secondary displays" feature in Development Settings can be enabled
- * to simulate secondary displays.
- * </p>
- *
- * @see android.app.Presentation
- * @see android.media.MediaRouter
- */
-public class MainActivity extends Activity {
-
-    private MediaRouter mMediaRouter;
-
-    // Active Presentation, set to null if no secondary screen is enabled
-    private SamplePresentation mPresentation;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setContentView(R.layout.sample_main);
-        mTextStatus = (TextView) findViewById(R.id.textStatus);
-
-        // get the list of background colors
-        mColors = getResources().getIntArray(R.array.androidcolors);
-
-        // Enable clicks on the 'change color' button
-        mButton = (Button) findViewById(R.id.button1);
-        mButton.setOnClickListener(new View.OnClickListener() {
-
-            @Override
-            public void onClick(View v) {
-                showNextColor();
-            }
-        });
-
-        // BEGIN_INCLUDE(getMediaRouter)
-        // Get the MediaRouter service
-        mMediaRouter = (MediaRouter) getSystemService(Context.MEDIA_ROUTER_SERVICE);
-        // END_INCLUDE(getMediaRouter)
-    }
-
-    /**
-     * Implementing a {@link android.media.MediaRouter.Callback} to update the displayed
-     * {@link android.app.Presentation} when a route is selected, unselected or the
-     * presentation display has changed. The provided stub implementation
-     * {@link android.media.MediaRouter.SimpleCallback} is extended and only
-     * {@link android.media.MediaRouter.SimpleCallback#onRouteSelected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo)}
-     * ,
-     * {@link android.media.MediaRouter.SimpleCallback#onRouteUnselected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo)}
-     * and
-     * {@link android.media.MediaRouter.SimpleCallback#onRoutePresentationDisplayChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo)}
-     * are overridden to update the displayed {@link android.app.Presentation} in
-     * {@link #updatePresentation()}. These callbacks enable or disable the
-     * second screen presentation based on the routing provided by the
-     * {@link android.media.MediaRouter} for {@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO}
-     * streams. @
-     */
-    private final MediaRouter.SimpleCallback mMediaRouterCallback =
-            new MediaRouter.SimpleCallback() {
-
-                // BEGIN_INCLUDE(SimpleCallback)
-                /**
-                 * A new route has been selected as active. Disable the current
-                 * route and enable the new one.
-                 */
-                @Override
-                public void onRouteSelected(MediaRouter router, int type, RouteInfo info) {
-                    updatePresentation();
-                }
-
-                /**
-                 * The route has been unselected.
-                 */
-                @Override
-                public void onRouteUnselected(MediaRouter router, int type, RouteInfo info) {
-                    updatePresentation();
-
-                }
-
-                /**
-                 * The route's presentation display has changed. This callback
-                 * is called when the presentation has been activated, removed
-                 * or its properties have changed.
-                 */
-                @Override
-                public void onRoutePresentationDisplayChanged(MediaRouter router, RouteInfo info) {
-                    updatePresentation();
-                }
-                // END_INCLUDE(SimpleCallback)
-            };
-
-    /**
-     * Updates the displayed presentation to enable a secondary screen if it has
-     * been selected in the {@link android.media.MediaRouter} for the
-     * {@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO} type. If no screen has been
-     * selected by the {@link android.media.MediaRouter}, the current screen is disabled.
-     * Otherwise a new {@link SamplePresentation} is initialized and shown on
-     * the secondary screen.
-     */
-    private void updatePresentation() {
-
-        // BEGIN_INCLUDE(updatePresentationInit)
-        // Get the selected route for live video
-        RouteInfo selectedRoute = mMediaRouter.getSelectedRoute(
-                MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
-
-        // Get its Display if a valid route has been selected
-        Display selectedDisplay = null;
-        if (selectedRoute != null) {
-            selectedDisplay = selectedRoute.getPresentationDisplay();
-        }
-        // END_INCLUDE(updatePresentationInit)
-
-        // BEGIN_INCLUDE(updatePresentationDismiss)
-        /*
-         * Dismiss the current presentation if the display has changed or no new
-         * route has been selected
-         */
-        if (mPresentation != null && mPresentation.getDisplay() != selectedDisplay) {
-            mPresentation.dismiss();
-            mPresentation = null;
-            mButton.setEnabled(false);
-            mTextStatus.setText(R.string.secondary_notconnected);
-        }
-        // END_INCLUDE(updatePresentationDismiss)
-
-        // BEGIN_INCLUDE(updatePresentationNew)
-        /*
-         * Show a new presentation if the previous one has been dismissed and a
-         * route has been selected.
-         */
-        if (mPresentation == null && selectedDisplay != null) {
-
-            // Initialise a new Presentation for the Display
-            mPresentation = new SamplePresentation(this, selectedDisplay);
-            mPresentation.setOnDismissListener(mOnDismissListener);
-
-            // Try to show the presentation, this might fail if the display has
-            // gone away in the mean time
-            try {
-                mPresentation.show();
-                mTextStatus.setText(getResources().getString(R.string.secondary_connected,
-                        selectedRoute.getName(MainActivity.this)));
-                mButton.setEnabled(true);
-                showNextColor();
-            } catch (WindowManager.InvalidDisplayException ex) {
-                // Couldn't show presentation - display was already removed
-                mPresentation = null;
-            }
-        }
-        // END_INCLUDE(updatePresentationNew)
-
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        // BEGIN_INCLUDE(addCallback)
-        // Register a callback for all events related to live video devices
-        mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_LIVE_VIDEO, mMediaRouterCallback);
-        // END_INCLUDE(addCallback)
-
-        // Show the 'Not connected' status message
-        mButton.setEnabled(false);
-        mTextStatus.setText(R.string.secondary_notconnected);
-
-        // Update the displays based on the currently active routes
-        updatePresentation();
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-
-        // BEGIN_INCLUDE(onPause)
-        // Stop listening for changes to media routes.
-        mMediaRouter.removeCallback(mMediaRouterCallback);
-        // END_INCLUDE(onPause)
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-
-        // BEGIN_INCLUDE(onStop)
-        // Dismiss the presentation when the activity is not visible.
-        if (mPresentation != null) {
-            mPresentation.dismiss();
-            mPresentation = null;
-        }
-        // BEGIN_INCLUDE(onStop)
-    }
-
-    /**
-     * Inflates the ActionBar or options menu. The menu file defines an item for
-     * the {@link android.app.MediaRouteActionProvider}, which is registered here for all
-     * live video devices using {@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO}.
-     */
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-
-        getMenuInflater().inflate(R.menu.main, menu);
-
-        // BEGIN_INCLUDE(MediaRouteActionProvider)
-        // Configure the media router action provider
-        MenuItem mediaRouteMenuItem = menu.findItem(R.id.menu_media_route);
-        MediaRouteActionProvider mediaRouteActionProvider =
-                (MediaRouteActionProvider) mediaRouteMenuItem.getActionProvider();
-        mediaRouteActionProvider.setRouteTypes(MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
-        // BEGIN_INCLUDE(MediaRouteActionProvider)
-
-        return true;
-    }
-
-    /**
-     * Listens for dismissal of the {@link SamplePresentation} and removes its
-     * reference.
-     */
-    private final DialogInterface.OnDismissListener mOnDismissListener =
-            new DialogInterface.OnDismissListener() {
-                @Override
-                public void onDismiss(DialogInterface dialog) {
-                    if (dialog == mPresentation) {
-                        mPresentation = null;
-                    }
-                }
-            };
-
-    // Views used to display status information on the primary screen
-    private TextView mTextStatus;
-    private Button mButton;
-
-    // selected color index
-    private int mColor = 0;
-
-    // background colors
-    public int[] mColors;
-
-    /**
-     * Displays the next color on the secondary screen if it is activate.
-     */
-    private void showNextColor() {
-        if (mPresentation != null) {
-            // a second screen is active and initialized, show the next color
-            mPresentation.setColor(mColors[mColor]);
-            mColor = (mColor + 1) % mColors.length;
-        }
-    }
-
-}
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/SamplePresentation.java b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/SamplePresentation.java
deleted file mode 100644
index ac1f40f..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/SamplePresentation.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2013 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.basicmediarouter;
-
-import android.app.Presentation;
-import android.content.Context;
-import android.os.Bundle;
-import android.view.Display;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-/**
- * <p>
- * A {@link android.app.Presentation} used to demonstrate interaction between primary and
- * secondary screens.
- * </p>
- * <p>
- * It displays the name of the display in which it has been embedded (see
- * {@link android.app.Presentation#getDisplay()}) and exposes a facility to change its
- * background color and display its text.
- * </p>
- */
-public class SamplePresentation extends Presentation {
-
-    private LinearLayout mLayout;
-    private TextView mText;
-
-    public SamplePresentation(Context outerContext, Display display) {
-        super(outerContext, display);
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Set the content view to the custom layout
-        setContentView(R.layout.display);
-
-        // Get the Views
-        mLayout = (LinearLayout) findViewById(R.id.display_layout);
-        mText = (TextView) findViewById(R.id.display_text);
-
-        /*
-         * Show the name of the display this presentation was embedded in.
-         */
-        TextView smallText = (TextView) findViewById(R.id.display_smalltext);
-        final String name = getDisplay().getName();
-        smallText.setText(getResources().getString(R.string.display_name, name));
-    }
-
-    /**
-     * Set the background color of the layout and display the color as a String.
-     *
-     * @param color The background color
-     */
-    public void setColor(int color) {
-        mLayout.setBackgroundColor(color);
-
-        // Display the color as a string on screen
-        String s = getResources().getString(R.string.display_color, color);
-        mText.setText(s);
-    }
-
-}
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-hdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-mdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/sample_main.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/sample_main.xml
deleted file mode 100644
index 2768514..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/sample_main.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:id="@+id/LinearLayout1"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center"
-    android:orientation="vertical"
-    tools:context=".MainActivity" >
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:padding="5dp"
-        android:text="@string/intro_message" />
-
-    <TextView
-        android:id="@+id/textStatus"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:text="@string/secondary_notconnected"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:layout_margin="5dp" />
-
-    <Button
-        android:id="@+id/button1"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:enabled="false"
-        android:text="@string/change_color" />
-
-</LinearLayout>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/strings.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/strings.xml
deleted file mode 100644
index 40c023a..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<resources>
-    <string name="menu_present_to">Present to</string>
-    <string name="title_activity_main">MainActivity</string>
-    <string name="secondary_connected">Connected to:\n%s</string>
-    <string name="secondary_notconnected">No secondary display connected.</string>
-    <string name="change_color">Change Color</string>
-    <string name="display_name">This display is: %s</string>
-    <string name="display_color">Background color: #%X</string>
-</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/styles.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/styles.xml
deleted file mode 100644
index 4f64054..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!--
-        Base application theme, dependent on API level. This theme is replaced
-        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-    -->
-    <style name="AppBaseTheme" parent="android:Theme.Light">
-        <!--
-            Theme customizations available in newer API levels can go in
-            res/values-vXX/styles.xml, while customizations related to
-            backward-compatibility can go here.
-        -->
-    </style>
-
-
-    <style name="DisplayLargeText">
-        <item name="android:textSize">30sp</item>
-        <item name="android:textStyle">bold</item>
-        <item name="android:textColor">#FFFFFF</item>
-    </style>
-
-</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/tests/AndroidManifest.xml b/media/BasicMediaRouter/BasicMediaRouterSample/tests/AndroidManifest.xml
deleted file mode 100644
index 8800232..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicmediarouter.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicmediarouter"
-            android:label="Tests for com.example.android.basicmediarouter" />
-
-</manifest>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/tests/src/com/example/android/basicmediarouter/tests/SampleTests.java b/media/BasicMediaRouter/BasicMediaRouterSample/tests/src/com/example/android/basicmediarouter/tests/SampleTests.java
deleted file mode 100644
index 5c475a3..0000000
--- a/media/BasicMediaRouter/BasicMediaRouterSample/tests/src/com/example/android/basicmediarouter/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicmediarouter.tests;
-
-import com.example.android.basicmediarouter.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicMediaRouter sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicMediaRouterFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicMediaRouterFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/media/BasicMediaRouter/README.txt b/media/BasicMediaRouter/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/media/BasicMediaRouter/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/media/BasicMediaRouter/build.gradle b/media/BasicMediaRouter/build.gradle
index c7a137e..036abc8 100644
--- a/media/BasicMediaRouter/build.gradle
+++ b/media/BasicMediaRouter/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../build"
-  pathToSamplesCommon "../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/media/BasicMediaRouter/buildSrc/build.gradle b/media/BasicMediaRouter/buildSrc/build.gradle
deleted file mode 100644
index 29282af..0000000
--- a/media/BasicMediaRouter/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties b/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties
+++ b/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/media/BasicMediaRouter/mediarouter.jd b/media/BasicMediaRouter/mediarouter.jd
new file mode 100644
index 0000000..fcf6ec9
--- /dev/null
+++ b/media/BasicMediaRouter/mediarouter.jd
@@ -0,0 +1,26 @@
+page.title=MediaRouter Sample
+@jd:body
+<p>
+This sample demonstrates the use of the MediaRouter API to show content on a
+secondary display using a {@link Presentation}.
+</p>
+<p>
+The activity uses the 
+<a href="http://developer.android.com/reference/android/media/MediaRouter.html">MediaRouter</a> API
+ to automatically detect when a
+ presentation display is available and to allow the user to control the media routes using a menu
+ item provided by the 
+ <a href="http://developer.android.com/reference/android/app/MediaRouteActionProvider.html">
+ MediaRouteActionProvider</a>.
+When a presentation display is available a
+ <a href="http://developer.android.com/reference/android/app/Presentation.html">Presentation</a>
+ is shown on the preferred display. A button toggles the background color of the secondary screen
+ to show the interaction between the primary and secondary screens.
+</p>
+<p>
+This sample requires an HDMI or Wifi display. Alternatively, the
+ "Simulate secondary displays" feature in Development Settings can be enabled
+ to simulate secondary displays.
+</p>
+
+
diff --git a/media/BasicMediaRouter/settings.gradle b/media/BasicMediaRouter/settings.gradle
index 9d5cbc2..327efd6 100644
--- a/media/BasicMediaRouter/settings.gradle
+++ b/media/BasicMediaRouter/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicMediaRouterSample'
+include ':BasicMediaRouter'
\ No newline at end of file
diff --git a/media/BasicMediaRouter/template-params.xml b/media/BasicMediaRouter/template-params.xml
deleted file mode 100644
index e7cbab5..0000000
--- a/media/BasicMediaRouter/template-params.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicMediaRouter</name>
-    <group>Media</group>
-    <package>com.example.android.basicmediarouter</package>
-
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>17</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates the use of the MediaRouter API to display
- content on a secondary display.\n\nUse the "Media Route Action Item" in the ActionBar
- to select an output device. If your device supports Miracast wireless displays,
- you may need to enable "Wireless Display" functionality in the system settings.
- Secondary screen simulation can also be enabled from the "Developer Options".\n\n
-Once connected, use the "Change Color" button to change the background color of the secondary screen.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/media/MediaRecorder/MediaRecorder/build.gradle b/media/MediaRecorder/MediaRecorder/build.gradle
new file mode 100644
index 0000000..10fb811
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.1"
+}
diff --git a/media/MediaRecorder/MediaRecorder/src/main/AndroidManifest.xml b/media/MediaRecorder/MediaRecorder/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..038b1fd
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/AndroidManifest.xml
@@ -0,0 +1,51 @@
+<!--
+    Copyright 2013 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.media.recorder"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="14"
+        android:targetSdkVersion="17" />
+
+    <!-- This app records A/V content from camera and stores it to disk -->
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.RECORD_VIDEO" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-feature android:name="android.hardware.camera" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme">
+        <!-- Since this sample records video from camera preview, locking the orientation to
+            landscape. Landscape mode offers us more preview space with standard video aspect
+            ratios (width > height) -->
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name"
+            android:screenOrientation="landscape">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/media/MediaRecorder/MediaRecorder/src/main/java/com/example/android/media/recorder/MainActivity.java b/media/MediaRecorder/MediaRecorder/src/main/java/com/example/android/media/recorder/MainActivity.java
new file mode 100644
index 0000000..d50b53e
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/java/com/example/android/media/recorder/MainActivity.java
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2013 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.media.recorder;
+
+import android.annotation.TargetApi;
+import android.hardware.Camera;
+import android.media.CamcorderProfile;
+import android.media.MediaRecorder;
+import android.os.AsyncTask;
+import android.os.Build;
+import android.os.Bundle;
+import android.app.Activity;
+import android.util.Log;
+import android.view.Menu;
+import android.view.TextureView;
+import android.view.View;
+import android.widget.Button;
+
+import com.example.android.common.media.CameraHelper;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ *  This activity uses the camera/camcorder as the A/V source for the {@link MediaRecorder} API.
+ *  A {@link TextureView} is used as the camera preview which limits the code to API 14+. This
+ *  can be easily replaced with a {@link android.view.SurfaceView} to run on older devices.
+ */
+public class MainActivity extends Activity {
+
+    private Camera mCamera;
+    private TextureView mPreview;
+    private MediaRecorder mMediaRecorder;
+
+    private boolean isRecording = false;
+    private static final String TAG = "Recorder";
+    private Button captureButton;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        mPreview = (TextureView) findViewById(R.id.surface_view);
+        captureButton = (Button) findViewById(R.id.button_capture);
+    }
+
+    /**
+     * The capture button controls all user interaction. When recording, the button click
+     * stops recording, releases {@link MediaRecorder} and {@link Camera}. When not recording,
+     * it prepares the {@link MediaRecorder} and starts recording.
+     *
+     * @param view the view generating the event.
+     */
+    public void onCaptureClick(View view) {
+        if (isRecording) {
+            // BEGIN_INCLUDE(stop_release_media_recorder)
+
+            // stop recording and release camera
+            mMediaRecorder.stop();  // stop the recording
+            releaseMediaRecorder(); // release the MediaRecorder object
+            mCamera.lock();         // take camera access back from MediaRecorder
+
+            // inform the user that recording has stopped
+            setCaptureButtonText("Capture");
+            isRecording = false;
+            releaseCamera();
+            // END_INCLUDE(stop_release_media_recorder)
+
+        } else {
+
+            // BEGIN_INCLUDE(prepare_start_media_recorder)
+
+            new MediaPrepareTask().execute(null, null, null);
+
+            // END_INCLUDE(prepare_start_media_recorder)
+
+        }
+    }
+
+    private void setCaptureButtonText(String title) {
+        captureButton.setText(title);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        // if we are using MediaRecorder, release it first
+        releaseMediaRecorder();
+        // release the camera immediately on pause event
+        releaseCamera();
+    }
+
+    private void releaseMediaRecorder(){
+        if (mMediaRecorder != null) {
+            // clear recorder configuration
+            mMediaRecorder.reset();
+            // release the recorder object
+            mMediaRecorder.release();
+            mMediaRecorder = null;
+            // Lock camera for later use i.e taking it back from MediaRecorder.
+            // MediaRecorder doesn't need it anymore and we will release it if the activity pauses.
+            mCamera.lock();
+        }
+    }
+
+    private void releaseCamera(){
+        if (mCamera != null){
+            // release the camera for other applications
+            mCamera.release();
+            mCamera = null;
+        }
+    }
+
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+    private boolean prepareVideoRecorder(){
+
+        // BEGIN_INCLUDE (configure_preview)
+        mCamera = CameraHelper.getDefaultCameraInstance();
+
+        // We need to make sure that our preview and recording video size are supported by the
+        // camera. Query camera to find all the sizes and choose the optimal size given the
+        // dimensions of our preview surface.
+        Camera.Parameters parameters = mCamera.getParameters();
+        List<Camera.Size> mSupportedPreviewSizes = parameters.getSupportedPreviewSizes();
+        Camera.Size optimalSize = CameraHelper.getOptimalPreviewSize(mSupportedPreviewSizes,
+                mPreview.getWidth(), mPreview.getHeight());
+
+        // Use the same size for recording profile.
+        CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
+        profile.videoFrameWidth = optimalSize.width;
+        profile.videoFrameHeight = optimalSize.height;
+
+        // likewise for the camera object itself.
+        parameters.setPreviewSize(profile.videoFrameWidth, profile.videoFrameHeight);
+        mCamera.setParameters(parameters);
+        try {
+                // Requires API level 11+, For backward compatibility use {@link setPreviewDisplay}
+                // with {@link SurfaceView}
+                mCamera.setPreviewTexture(mPreview.getSurfaceTexture());
+        } catch (IOException e) {
+            Log.e(TAG, "Surface texture is unavailable or unsuitable" + e.getMessage());
+            return false;
+        }
+        // END_INCLUDE (configure_preview)
+
+
+        // BEGIN_INCLUDE (configure_media_recorder)
+        mMediaRecorder = new MediaRecorder();
+
+        // Step 1: Unlock and set camera to MediaRecorder
+        mCamera.unlock();
+        mMediaRecorder.setCamera(mCamera);
+
+        // Step 2: Set sources
+        mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT );
+        mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
+
+        // Step 3: Set a CamcorderProfile (requires API Level 8 or higher)
+        mMediaRecorder.setProfile(profile);
+
+        // Step 4: Set output file
+        mMediaRecorder.setOutputFile(CameraHelper.getOutputMediaFile(
+                CameraHelper.MEDIA_TYPE_VIDEO).toString());
+        // END_INCLUDE (configure_media_recorder)
+
+        // Step 5: Prepare configured MediaRecorder
+        try {
+            mMediaRecorder.prepare();
+        } catch (IllegalStateException e) {
+            Log.d(TAG, "IllegalStateException preparing MediaRecorder: " + e.getMessage());
+            releaseMediaRecorder();
+            return false;
+        } catch (IOException e) {
+            Log.d(TAG, "IOException preparing MediaRecorder: " + e.getMessage());
+            releaseMediaRecorder();
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Asynchronous task for preparing the {@link MediaRecorder} since it's a long blocking
+     * operation.
+     */
+    class MediaPrepareTask extends AsyncTask<Void, Void, Boolean> {
+
+        @Override
+        protected Boolean doInBackground(Void... voids) {
+            // initialize video camera
+            if (prepareVideoRecorder()) {
+                // Camera is available and unlocked, MediaRecorder is prepared,
+                // now you can start recording
+                mMediaRecorder.start();
+
+                isRecording = true;
+            } else {
+                // prepare didn't work, release the camera
+                releaseMediaRecorder();
+                return false;
+            }
+            return true;
+        }
+
+        @Override
+        protected void onPostExecute(Boolean result) {
+            if (!result) {
+                MainActivity.this.finish();
+            }
+            // inform the user that recording has started
+            setCaptureButtonText("Stop");
+
+        }
+    }
+
+}
\ No newline at end of file
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-hdpi/ic_launcher.png b/media/MediaRecorder/MediaRecorder/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to media/MediaRecorder/MediaRecorder/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-mdpi/ic_launcher.png b/media/MediaRecorder/MediaRecorder/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to media/MediaRecorder/MediaRecorder/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-xhdpi/ic_launcher.png b/media/MediaRecorder/MediaRecorder/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to media/MediaRecorder/MediaRecorder/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/MediaRecorder/MediaRecorder/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from media/MediaRecorder/MediaRecorderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to media/MediaRecorder/MediaRecorder/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/layout/sample_main.xml b/media/MediaRecorder/MediaRecorder/src/main/res/layout/activity_main.xml
similarity index 100%
rename from media/MediaRecorder/MediaRecorderSample/src/main/res/layout/sample_main.xml
rename to media/MediaRecorder/MediaRecorder/src/main/res/layout/activity_main.xml
diff --git a/media/MediaRecorder/MediaRecorder/src/main/res/menu/main.xml b/media/MediaRecorder/MediaRecorder/src/main/res/menu/main.xml
new file mode 100644
index 0000000..f3b10b6
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/res/menu/main.xml
@@ -0,0 +1,6 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/action_settings"
+        android:title="@string/action_settings"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
diff --git a/media/MediaRecorder/MediaRecorder/src/main/res/values-sw600dp/dimens.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..886b05f
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,4 @@
+<resources>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml
copy to media/MediaRecorder/MediaRecorder/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/media/MediaRecorder/MediaRecorder/src/main/res/values-v11/styles.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..3c02242
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/media/MediaRecorder/MediaRecorder/src/main/res/values-v14/styles.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..a91fd03
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/res/values-v14/styles.xml
@@ -0,0 +1,12 @@
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/dimens.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values/dimens.xml
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/dimens.xml
copy to media/MediaRecorder/MediaRecorder/src/main/res/values/dimens.xml
diff --git a/media/MediaRecorder/MediaRecorder/src/main/res/values/strings.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values/strings.xml
new file mode 100644
index 0000000..91ab13a
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/res/values/strings.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="app_name">MediaRecorder</string>
+    <string name="action_settings">Settings</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="btnCapture">capture</string>
+
+</resources>
diff --git a/media/MediaRecorder/MediaRecorder/src/main/res/values/styles.xml b/media/MediaRecorder/MediaRecorder/src/main/res/values/styles.xml
new file mode 100644
index 0000000..6ce89c7
--- /dev/null
+++ b/media/MediaRecorder/MediaRecorder/src/main/res/values/styles.xml
@@ -0,0 +1,20 @@
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
diff --git a/media/MediaRecorder/MediaRecorderSample/.gitignore b/media/MediaRecorder/MediaRecorderSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/media/MediaRecorder/MediaRecorderSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/media/MediaRecorder/MediaRecorderSample/proguard-project.txt b/media/MediaRecorder/MediaRecorderSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/media/MediaRecorder/MediaRecorderSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/AndroidManifest.xml b/media/MediaRecorder/MediaRecorderSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 32f88f6..0000000
--- a/media/MediaRecorder/MediaRecorderSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.mediarecorder"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk
-        android:minSdkVersion="14"
-        android:targetSdkVersion="17" />
-
-    <!-- This app records A/V content from camera and stores it to disk -->
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.RECORD_VIDEO" />
-    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
-    <uses-permission android:name="android.permission.CAMERA" />
-    <uses-feature android:name="android.hardware.camera" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme">
-        <!-- Since this sample records video from camera preview, locking the orientation to
-            landscape. Landscape mode offers us more preview space with standard video aspect
-            ratios (width > height) -->
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name"
-            android:screenOrientation="landscape">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/java/com/example/android/mediarecorder/MainActivity.java b/media/MediaRecorder/MediaRecorderSample/src/main/java/com/example/android/mediarecorder/MainActivity.java
deleted file mode 100644
index 8587636..0000000
--- a/media/MediaRecorder/MediaRecorderSample/src/main/java/com/example/android/mediarecorder/MainActivity.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (C) 2013 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.mediarecorder;
-
-import android.annotation.TargetApi;
-import android.app.Activity;
-import android.hardware.Camera;
-import android.media.CamcorderProfile;
-import android.media.MediaRecorder;
-import android.os.AsyncTask;
-import android.os.Build;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.Menu;
-import android.view.TextureView;
-import android.view.View;
-import android.widget.Button;
-
-import com.example.android.common.media.CameraHelper;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- *  This activity uses the camera/camcorder as the A/V source for the {@link android.media.MediaRecorder} API.
- *  A {@link android.view.TextureView} is used as the camera preview which limits the code to API 14+. This
- *  can be easily replaced with a {@link android.view.SurfaceView} to run on older devices.
- */
-public class MainActivity extends Activity {
-
-    private Camera mCamera;
-    private TextureView mPreview;
-    private MediaRecorder mMediaRecorder;
-
-    private boolean isRecording = false;
-    private static final String TAG = "Recorder";
-    private Button captureButton;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        mPreview = (TextureView) findViewById(R.id.surface_view);
-        captureButton = (Button) findViewById(R.id.button_capture);
-    }
-
-    /**
-     * The capture button controls all user interaction. When recording, the button click
-     * stops recording, releases {@link android.media.MediaRecorder} and {@link android.hardware.Camera}. When not recording,
-     * it prepares the {@link android.media.MediaRecorder} and starts recording.
-     *
-     * @param view the view generating the event.
-     */
-    public void onCaptureClick(View view) {
-        if (isRecording) {
-            // BEGIN_INCLUDE(stop_release_media_recorder)
-
-            // stop recording and release camera
-            mMediaRecorder.stop();  // stop the recording
-            releaseMediaRecorder(); // release the MediaRecorder object
-            mCamera.lock();         // take camera access back from MediaRecorder
-
-            // inform the user that recording has stopped
-            setCaptureButtonText("Capture");
-            isRecording = false;
-            releaseCamera();
-            // END_INCLUDE(stop_release_media_recorder)
-
-        } else {
-
-            // BEGIN_INCLUDE(prepare_start_media_recorder)
-
-            new MediaPrepareTask().execute(null, null, null);
-
-            // END_INCLUDE(prepare_start_media_recorder)
-
-        }
-    }
-
-    private void setCaptureButtonText(String title) {
-        captureButton.setText(title);
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        // if we are using MediaRecorder, release it first
-        releaseMediaRecorder();
-        // release the camera immediately on pause event
-        releaseCamera();
-    }
-
-    private void releaseMediaRecorder(){
-        if (mMediaRecorder != null) {
-            // clear recorder configuration
-            mMediaRecorder.reset();
-            // release the recorder object
-            mMediaRecorder.release();
-            mMediaRecorder = null;
-            // Lock camera for later use i.e taking it back from MediaRecorder.
-            // MediaRecorder doesn't need it anymore and we will release it if the activity pauses.
-            mCamera.lock();
-        }
-    }
-
-    private void releaseCamera(){
-        if (mCamera != null){
-            // release the camera for other applications
-            mCamera.release();
-            mCamera = null;
-        }
-    }
-
-    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
-    private boolean prepareVideoRecorder(){
-
-        // BEGIN_INCLUDE (configure_preview)
-        mCamera = CameraHelper.getDefaultCameraInstance();
-
-        // We need to make sure that our preview and recording video size are supported by the
-        // camera. Query camera to find all the sizes and choose the optimal size given the
-        // dimensions of our preview surface.
-        Camera.Parameters parameters = mCamera.getParameters();
-        List<Camera.Size> mSupportedPreviewSizes = parameters.getSupportedPreviewSizes();
-        Camera.Size optimalSize = CameraHelper.getOptimalPreviewSize(mSupportedPreviewSizes,
-                mPreview.getWidth(), mPreview.getHeight());
-
-        // Use the same size for recording profile.
-        CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
-        profile.videoFrameWidth = optimalSize.width;
-        profile.videoFrameHeight = optimalSize.height;
-
-        // likewise for the camera object itself.
-        parameters.setPreviewSize(profile.videoFrameWidth, profile.videoFrameHeight);
-        mCamera.setParameters(parameters);
-        try {
-                // Requires API level 11+, For backward compatibility use {@link setPreviewDisplay}
-                // with {@link SurfaceView}
-                mCamera.setPreviewTexture(mPreview.getSurfaceTexture());
-        } catch (IOException e) {
-            Log.e(TAG, "Surface texture is unavailable or unsuitable" + e.getMessage());
-            return false;
-        }
-        // END_INCLUDE (configure_preview)
-
-
-        // BEGIN_INCLUDE (configure_media_recorder)
-        mMediaRecorder = new MediaRecorder();
-
-        // Step 1: Unlock and set camera to MediaRecorder
-        mCamera.unlock();
-        mMediaRecorder.setCamera(mCamera);
-
-        // Step 2: Set sources
-        mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT );
-        mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
-
-        // Step 3: Set a CamcorderProfile (requires API Level 8 or higher)
-        mMediaRecorder.setProfile(profile);
-
-        // Step 4: Set output file
-        mMediaRecorder.setOutputFile(CameraHelper.getOutputMediaFile(
-                CameraHelper.MEDIA_TYPE_VIDEO).toString());
-        // END_INCLUDE (configure_media_recorder)
-
-        // Step 5: Prepare configured MediaRecorder
-        try {
-            mMediaRecorder.prepare();
-        } catch (IllegalStateException e) {
-            Log.d(TAG, "IllegalStateException preparing MediaRecorder: " + e.getMessage());
-            releaseMediaRecorder();
-            return false;
-        } catch (IOException e) {
-            Log.d(TAG, "IOException preparing MediaRecorder: " + e.getMessage());
-            releaseMediaRecorder();
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Asynchronous task for preparing the {@link android.media.MediaRecorder} since it's a long blocking
-     * operation.
-     */
-    class MediaPrepareTask extends AsyncTask<Void, Void, Boolean> {
-
-        @Override
-        protected Boolean doInBackground(Void... voids) {
-            // initialize video camera
-            if (prepareVideoRecorder()) {
-                // Camera is available and unlocked, MediaRecorder is prepared,
-                // now you can start recording
-                mMediaRecorder.start();
-
-                isRecording = true;
-            } else {
-                // prepare didn't work, release the camera
-                releaseMediaRecorder();
-                return false;
-            }
-            return true;
-        }
-
-        @Override
-        protected void onPostExecute(Boolean result) {
-            if (!result) {
-                MainActivity.this.finish();
-            }
-            // inform the user that recording has started
-            setCaptureButtonText("Stop");
-
-        }
-    }
-
-}
\ No newline at end of file
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/values-sw720dp-land/dimens.xml b/media/MediaRecorder/MediaRecorderSample/src/main/res/values-sw720dp-land/dimens.xml
deleted file mode 100644
index c4aad9b..0000000
--- a/media/MediaRecorder/MediaRecorderSample/src/main/res/values-sw720dp-land/dimens.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-  Copyright (C) 2013 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.
--->
-
-<resources>
-    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
-         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. -->
-    <dimen name="activity_horizontal_margin">128dp</dimen>
-</resources>
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/values/dimens.xml b/media/MediaRecorder/MediaRecorderSample/src/main/res/values/dimens.xml
deleted file mode 100644
index 0353ed6..0000000
--- a/media/MediaRecorder/MediaRecorderSample/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-  Copyright (C) 2013 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.
--->
-
-<resources>
-    <!-- Default screen margins, per the Android Design guidelines. -->
-    <dimen name="activity_horizontal_margin">16dp</dimen>
-    <dimen name="activity_vertical_margin">16dp</dimen>
-</resources>
diff --git a/media/MediaRecorder/MediaRecorderSample/src/main/res/values/strings.xml b/media/MediaRecorder/MediaRecorderSample/src/main/res/values/strings.xml
deleted file mode 100644
index b6a2cd2..0000000
--- a/media/MediaRecorder/MediaRecorderSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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.
--->
-
-<resources>
-
-    <string name="action_settings">Settings</string>
-    <string name="hello_world">Hello world!</string>
-    <string name="btnCapture">capture</string>
-
-</resources>
diff --git a/media/MediaRecorder/build.gradle b/media/MediaRecorder/build.gradle
index c886d80..bd6967f 100644
--- a/media/MediaRecorder/build.gradle
+++ b/media/MediaRecorder/build.gradle
@@ -1,11 +1,9 @@
-
-
-
-
-// BEGIN_EXCLUDE
-apply from: "../../../../build/build.gradle"
-samplegen {
-  pathToBuild "../../../../build"
-  pathToSamplesCommon "../../common"
-}
-// END_EXCLUDE
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
+}
\ No newline at end of file
diff --git a/media/MediaRecorder/buildSrc/build.gradle b/media/MediaRecorder/buildSrc/build.gradle
deleted file mode 100644
index 29282af..0000000
--- a/media/MediaRecorder/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/media/MediaRecorder/gradle/wrapper/gradle-wrapper.properties b/media/MediaRecorder/gradle/wrapper/gradle-wrapper.properties
index 861eddc..5c22dec 100644
--- a/media/MediaRecorder/gradle/wrapper/gradle-wrapper.properties
+++ b/media/MediaRecorder/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/media/MediaRecorder/settings.gradle b/media/MediaRecorder/settings.gradle
index 61e4032..3fbbc54 100644
--- a/media/MediaRecorder/settings.gradle
+++ b/media/MediaRecorder/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'MediaRecorderSample'
+include ':MediaRecorder'
diff --git a/media/MediaRecorder/template-params.xml b/media/MediaRecorder/template-params.xml
deleted file mode 100644
index 6b6ddc5..0000000
--- a/media/MediaRecorder/template-params.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<sample>
-    <name>MediaRecorder</name>
-    <group>Media</group>
-    <package>com.example.android.mediarecorder</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>14</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample uses the camera/camcorder as the A/V source for the MediaRecorder API.
-            A TextureView is used as the camera preview which limits the code to API 14+. This
-            can be easily replaced with a SurfaceView to run on older devices.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="media"/>
-</sample>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/build.gradle b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/AndroidManifest.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..7693ed1
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/AndroidManifest.xml
@@ -0,0 +1,40 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.basicandroidkeystore"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample">
+
+        <activity android:name=".MainActivity"
+            android:label="@string/app_name"
+            android:uiOptions="splitActionBarWhenNarrow">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+    </application>
+
+</manifest>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/KeyStoreHelper.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/KeyStoreHelper.java
new file mode 100644
index 0000000..7ccf733
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/KeyStoreHelper.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2013 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.basicandroidkeystore;
+
+import android.content.Context;
+import android.security.KeyPairGeneratorSpec;
+import android.util.Base64;
+
+import com.example.android.common.logger.Log;
+import com.example.android.common.SecurityConstants;
+
+import java.io.IOException;
+import java.math.BigInteger;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Signature;
+import java.security.SignatureException;
+import java.security.UnrecoverableEntryException;
+import java.security.cert.CertificateException;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import javax.security.auth.x500.X500Principal;
+
+public class KeyStoreHelper {
+
+    public static final String TAG = "KeyStoreHelper";
+
+    // You can store multiple key pairs in the Key Store.  The string used to refer to the Key you
+    // want to store, or later pull, is referred to as an "alias" in this case, because calling it
+    // a key, when you use it to retrieve a key, would just be irritating.
+    private String mAlias = null;
+
+    /**
+     * Creates a public and private key and stores it using the Android Key Store, so that only
+     * this application will be able to access the keys.
+     */
+    public void createKeys(Context context) throws NoSuchProviderException,
+            NoSuchAlgorithmException, InvalidAlgorithmParameterException {
+        // BEGIN_INCLUDE(create_valid_dates)
+        // Create a start and end time, for the validity range of the key pair that's about to be
+        // generated.
+        Calendar start = new GregorianCalendar();
+        Calendar end = new GregorianCalendar();
+        end.add(1, Calendar.YEAR);
+        //END_INCLUDE(create_valid_dates)
+
+
+        // BEGIN_INCLUDE(create_spec)
+        // The KeyPairGeneratorSpec object is how parameters for your key pair are passed
+        // to the KeyPairGenerator.  For a fun home game, count how many classes in this sample
+        // start with the phrase "KeyPair".
+        KeyPairGeneratorSpec spec =
+                new KeyPairGeneratorSpec.Builder(context)
+                        // You'll use the alias later to retrieve the key.  It's a key for the key!
+                        .setAlias(mAlias)
+                        // The subject used for the self-signed certificate of the generated pair
+                        .setSubject(new X500Principal("CN=" + mAlias))
+                        // The serial number used for the self-signed certificate of the
+                        // generated pair.
+                        .setSerialNumber(BigInteger.valueOf(1337))
+                        // Date range of validity for the generated pair.
+                        .setStartDate(start.getTime())
+                        .setEndDate(end.getTime())
+                        .build();
+        // END_INCLUDE(create_spec)
+
+
+        // BEGIN_INCLUDE(create_keypair)
+
+        // Initialize a KeyPair generator using the the intended algorithm (in this example, RSA
+        // and the KeyStore.  This example uses the AndroidKeyStore.
+        KeyPairGenerator kpGenerator = KeyPairGenerator
+                .getInstance(SecurityConstants.TYPE_RSA,
+                        SecurityConstants.KEYSTORE_PROVIDER_ANDROID_KEYSTORE);
+        kpGenerator.initialize(spec);
+        KeyPair kp = kpGenerator.generateKeyPair();
+        Log.d(TAG, "Public Key is: " + kp.getPublic().toString());
+        // END_INCLUDE(create_keypair)
+
+
+    }
+
+    /**
+     * Signs the data using the key pair stored in the Android Key Store.  This signature can be
+     * used with the data later to verify it was signed by this application.
+     * @return A string encoding of the data signature generated
+     */
+    public String signData(String inputStr) throws KeyStoreException,
+            UnrecoverableEntryException, NoSuchAlgorithmException, InvalidKeyException,
+            SignatureException, IOException, CertificateException {
+        byte[] data = inputStr.getBytes();
+
+        // BEGIN_INCLUDE(sign_load_keystore)
+        KeyStore ks = KeyStore.getInstance(SecurityConstants.KEYSTORE_PROVIDER_ANDROID_KEYSTORE);
+
+        // Weird artifact of Java API.  If you don't have an InputStream to load, you still need
+        // to call "load", or it'll crash.
+        ks.load(null);
+
+        // Load the key pair from the Android Key Store
+        KeyStore.Entry entry = ks.getEntry(mAlias, null);
+
+        /* If the entry is null, keys were never stored under this alias.
+         * Debug steps in this situation would be:
+         * -Check the list of aliases by iterating over Keystore.aliases(), be sure the alias
+         *   exists.
+         * -If that's empty, verify they were both stored and pulled from the same keystore
+         *   "AndroidKeyStore"
+         */
+        if (entry == null) {
+            Log.w(TAG, "No key found under alias: " + mAlias);
+            Log.w(TAG, "Exiting signData()...");
+            return null;
+        }
+
+        /* If entry is not a KeyStore.PrivateKeyEntry, it might have gotten stored in a previous
+         * iteration of your application that was using some other mechanism, or been overwritten
+         * by something else using the same keystore with the same alias.
+         * You can determine the type using entry.getClass() and debug from there.
+         */
+        if (!(entry instanceof KeyStore.PrivateKeyEntry)) {
+            Log.w(TAG, "Not an instance of a PrivateKeyEntry");
+            Log.w(TAG, "Exiting signData()...");
+            return null;
+        }
+        // END_INCLUDE(sign_data)
+
+        // BEGIN_INCLUDE(sign_create_signature)
+        // This class doesn't actually represent the signature,
+        // just the engine for creating/verifying signatures, using
+        // the specified algorithm.
+        Signature s = Signature.getInstance(SecurityConstants.SIGNATURE_SHA256withRSA);
+
+        // Initialize Signature using specified private key
+        s.initSign(((KeyStore.PrivateKeyEntry) entry).getPrivateKey());
+
+        // Sign the data, store the result as a Base64 encoded String.
+        s.update(data);
+        byte[] signature = s.sign();
+        String result = null;
+        result = Base64.encodeToString(signature, Base64.DEFAULT);
+        // END_INCLUDE(sign_data)
+
+        return result;
+    }
+
+    /**
+     * Given some data and a signature, uses the key pair stored in the Android Key Store to verify
+     * that the data was signed by this application, using that key pair.
+     * @param input The data to be verified.
+     * @param signatureStr The signature provided for the data.
+     * @return A boolean value telling you whether the signature is valid or not.
+     */
+    public boolean verifyData(String input, String signatureStr) throws KeyStoreException,
+            CertificateException, NoSuchAlgorithmException, IOException,
+            UnrecoverableEntryException, InvalidKeyException, SignatureException {
+        byte[] data = input.getBytes();
+        byte[] signature;
+        // BEGIN_INCLUDE(decode_signature)
+
+        // Make sure the signature string exists.  If not, bail out, nothing to do.
+
+        if (signatureStr == null) {
+            Log.w(TAG, "Invalid signature.");
+            Log.w(TAG, "Exiting verifyData()...");
+            return false;
+        }
+
+        try {
+            // The signature is going to be examined as a byte array,
+            // not as a base64 encoded string.
+            signature = Base64.decode(signatureStr, Base64.DEFAULT);
+        } catch (IllegalArgumentException e) {
+            // signatureStr wasn't null, but might not have been encoded properly.
+            // It's not a valid Base64 string.
+            return false;
+        }
+        // END_INCLUDE(decode_signature)
+
+        KeyStore ks = KeyStore.getInstance("AndroidKeyStore");
+
+        // Weird artifact of Java API.  If you don't have an InputStream to load, you still need
+        // to call "load", or it'll crash.
+        ks.load(null);
+
+        // Load the key pair from the Android Key Store
+        KeyStore.Entry entry = ks.getEntry(mAlias, null);
+
+        if (entry == null) {
+            Log.w(TAG, "No key found under alias: " + mAlias);
+            Log.w(TAG, "Exiting verifyData()...");
+            return false;
+        }
+
+        if (!(entry instanceof KeyStore.PrivateKeyEntry)) {
+            Log.w(TAG, "Not an instance of a PrivateKeyEntry");
+            return false;
+        }
+
+        // This class doesn't actually represent the signature,
+        // just the engine for creating/verifying signatures, using
+        // the specified algorithm.
+        Signature s = Signature.getInstance(SecurityConstants.SIGNATURE_SHA256withRSA);
+
+        // BEGIN_INCLUDE(verify_data)
+        // Verify the data.
+        s.initVerify(((KeyStore.PrivateKeyEntry) entry).getCertificate());
+        s.update(data);
+        boolean valid = s.verify(signature);
+        return valid;
+        // END_INCLUDE(verify_data)
+    }
+
+    public void setAlias(String alias) {
+        mAlias = alias;
+    }
+}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/LogFragment.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/LogFragment.java
new file mode 100644
index 0000000..23d4da7
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/LogFragment.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2013 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.basicandroidkeystore;
+
+import com.example.android.common.logger.LogView;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ScrollView;
+
+/**
+ * Simple fraggment which contains a LogView and uses is to output log data it receives
+ * through the LogNode interface.
+ */
+public class LogFragment extends Fragment {
+
+    private LogView mLogView;
+
+    public LogFragment() {}
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+            Bundle savedInstanceState) {
+
+        View result = inflater.inflate(R.layout.log_fragment, container, false);
+
+        mLogView = (LogView) result.findViewById(R.id.sample_output);
+
+        // Wire up so when the text changes, the view scrolls down.
+        final ScrollView scrollView =
+                ((ScrollView) result.findViewById(R.id.log_scroll));
+
+        mLogView.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+                scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                scrollView.fullScroll(ScrollView.FOCUS_DOWN);
+            }
+        });
+
+        return result;
+    }
+
+    public LogView getLogView() {
+        return mLogView;
+    }
+}
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/MainActivity.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/MainActivity.java
new file mode 100644
index 0000000..33af4e5
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/MainActivity.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2013 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.basicandroidkeystore;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentActivity;
+import android.view.Menu;
+import android.view.MenuItem;
+
+import com.example.android.common.SimpleTextFragment;
+import com.example.android.common.logger.LogWrapper;
+import com.example.android.common.logger.MessageOnlyLogFilter;
+import com.example.android.common.logger.Log;
+
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.SignatureException;
+import java.security.UnrecoverableEntryException;
+import java.security.cert.CertificateException;
+
+public class MainActivity extends FragmentActivity {
+
+    public final static String TAG = "MainActivity";
+    public LogFragment mLogFragment;
+
+    public KeyStoreHelper mKeyStoreHelper;
+
+
+    // BEGIN_INCLUDE(values)
+    // You can store multiple key pairs in the Key Store.  The string used to refer to the Key you
+    // want to store, or later pull, is referred to as an "alias" in this case, because calling it
+    // a key, when you use it to retrieve a key, would just be irritating.
+    public static final String ALIAS = "myKey";
+
+    // Some sample data to sign, and later verify using the generated signature.
+    public static final String SAMPLE_INPUT="Hello, Android!";
+
+    // Just a handy place to store the signature in between signing and verifying.
+    public String mSignatureStr = null;
+    // END_INCLUDE(values)
+
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        SimpleTextFragment actionFragment =
+                (SimpleTextFragment) getSupportFragmentManager()
+                        .findFragmentById(R.id.intro_fragment);
+        actionFragment.setText(R.string.intro_message);
+
+        mKeyStoreHelper = new KeyStoreHelper();
+        mKeyStoreHelper.setAlias(ALIAS);
+        initializeLogging();
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.btn_create_keys:
+                try {
+                    mKeyStoreHelper.createKeys(this);
+                    Log.d(TAG, "Keys created");
+                    return true;
+                } catch (NoSuchAlgorithmException e) {
+                    Log.w(TAG, "RSA not supported", e);
+                } catch (InvalidAlgorithmParameterException e) {
+                    Log.w(TAG, "No such provider: AndroidKeyStore");
+                } catch (NoSuchProviderException e) {
+                    Log.w(TAG, "Invalid Algorithm Parameter Exception", e);
+                }
+                return true;
+            case R.id.btn_sign_data:
+                try {
+                    mSignatureStr = mKeyStoreHelper.signData(SAMPLE_INPUT);
+                } catch (KeyStoreException e) {
+                    Log.w(TAG, "KeyStore not Initialized", e);
+                } catch (UnrecoverableEntryException e) {
+                    Log.w(TAG, "KeyPair not recovered", e);
+                } catch (NoSuchAlgorithmException e) {
+                    Log.w(TAG, "RSA not supported", e);
+                } catch (InvalidKeyException e) {
+                    Log.w(TAG, "Invalid Key", e);
+                } catch (SignatureException e) {
+                    Log.w(TAG, "Invalid Signature", e);
+                } catch (IOException e) {
+                    Log.w(TAG, "IO Exception", e);
+                } catch (CertificateException e) {
+                    Log.w(TAG, "Error occurred while loading certificates", e);
+                }
+                Log.d(TAG, "Signature: " + mSignatureStr);
+                return true;
+
+            case R.id.btn_verify_data:
+                boolean verified = false;
+                try {
+                    if (mSignatureStr != null) {
+                        verified = mKeyStoreHelper.verifyData(SAMPLE_INPUT, mSignatureStr);
+                    }
+                } catch (KeyStoreException e) {
+                    Log.w(TAG, "KeyStore not Initialized", e);
+                } catch (CertificateException e) {
+                    Log.w(TAG, "Error occurred while loading certificates", e);
+                } catch (NoSuchAlgorithmException e) {
+                    Log.w(TAG, "RSA not supported", e);
+                } catch (IOException e) {
+                    Log.w(TAG, "IO Exception", e);
+                } catch (UnrecoverableEntryException e) {
+                    Log.w(TAG, "KeyPair not recovered", e);
+                } catch (InvalidKeyException e) {
+                    Log.w(TAG, "Invalid Key", e);
+                } catch (SignatureException e) {
+                    Log.w(TAG, "Invalid Signature", e);
+                }
+                if (verified) {
+                    Log.d(TAG, "Data Signature Verified");
+                } else {
+                    Log.d(TAG, "Data not verified.");
+                }
+                return true;
+        }
+        return false;
+    }
+
+    /** Create a chain of targets that will receive log data */
+    public void initializeLogging() {
+        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
+        // Wraps Android's native log framework
+        LogWrapper logWrapper = new LogWrapper();
+        Log.setLogNode(logWrapper);
+
+        // A filter that strips out everything except the message text
+        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
+        logWrapper.setNext(msgFilter);
+
+        // On screen logging via a fragment with a TextView
+        mLogFragment = (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
+        msgFilter.setNext(mLogFragment.getLogView());
+        Log.i(TAG, "Ready");
+    }
+}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SecurityConstants.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SecurityConstants.java
new file mode 100644
index 0000000..e23110c
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SecurityConstants.java
@@ -0,0 +1,34 @@
+package com.example.android.common;
+
+/*
+ * Copyright 2013 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.
+ */
+
+/**
+ * Helper class, contains several constants used when encrypting/decrypting data on Android.
+ * This class should not be considered a complete list of the algorithms, keystore types,
+ * or signature types within the Android Platform, only the more common ones.
+ */
+public class SecurityConstants {
+    public static final String KEYSTORE_PROVIDER_ANDROID_KEYSTORE = "AndroidKeyStore";
+
+    public static final String TYPE_RSA = "RSA";
+    public static final String TYPE_DSA = "DSA";
+    public static final String TYPE_BKS = "BKS";
+
+    public static final String SIGNATURE_SHA256withRSA = "SHA256withRSA";
+    public static final String SIGNATURE_SHA512withRSA = "SHA512withRSA";
+
+}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java
new file mode 100644
index 0000000..2895ea0
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2013 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.common;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+/**
+ * Simple fragment containing only a TextView.  Used by TextPagerAdapter to create
+ * tutorial-style pages for apps.
+ */
+public class SimpleTextFragment extends Fragment {
+
+    // Contains the text that will be displayed by this Fragment 	
+    String mText;
+
+    // Contains a resource ID for the text that will be displayed by this fragment. 	
+    int mTextId = -1;
+
+    // Keys which will be used to store/retrieve text passed in via setArguments. 	
+    public static final String TEXT_KEY = "text";
+    public static final String TEXT_ID_KEY = "text_id";
+
+    // For situations where the app wants to modify text at Runtime, exposing the TextView. 	
+    private TextView mTextView;
+
+    public SimpleTextFragment() {
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        // Before initializing the textView, check if any arguments were provided via setArguments. 	
+        processArguments();
+
+        // Create a new TextView and set its text to whatever was provided. 	
+        mTextView = new TextView(getActivity());
+
+        if (mText != null) {
+            mTextView.setText(mText);
+            Log.i("SimpleTextFragment", mText);
+        }
+        return mTextView;
+    }
+
+    public TextView getTextView() {
+        return mTextView;
+    }
+
+    /**
+     * Changes the text for this TextView, according to the resource ID provided.
+     *
+     * @param stringId A resource ID representing the text content for this Fragment's TextView.
+     */
+    public void setText(int stringId) {
+        getTextView().setText(getActivity().getString(stringId));
+    }
+
+    /**
+     * Processes the arguments passed into this Fragment via setArguments method.
+     * Currently the method only looks for text or a textID, nothing else.
+     */
+    public void processArguments() {
+        // For most objects we'd handle the multiple possibilities for initialization variables 	
+        // as multiple constructors.  For Fragments, however, it's customary to use 	
+        // setArguments / getArguments. 	
+        if (getArguments() != null) {
+            Bundle args = getArguments();
+            if (args.containsKey(TEXT_KEY)) {
+                mText = args.getString(TEXT_KEY);
+                Log.d("Constructor", "Added Text.");
+            } else if (args.containsKey(TEXT_ID_KEY)) {
+                mTextId = args.getInt(TEXT_ID_KEY);
+                mText = getString(mTextId);
+            }
+        }
+    }
+} 
\ No newline at end of file
diff --git a/common/src/java/com/example/android/common/logger/Log.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/Log.java
similarity index 100%
rename from common/src/java/com/example/android/common/logger/Log.java
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/Log.java
diff --git a/common/src/java/com/example/android/common/logger/LogNode.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogNode.java
similarity index 100%
copy from common/src/java/com/example/android/common/logger/LogNode.java
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogNode.java
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogView.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogView.java
new file mode 100644
index 0000000..dfe7648
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogView.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (C) 2013 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.common.logger;
+
+import android.content.Context;
+import android.text.method.ScrollingMovementMethod;
+import android.util.*;
+import android.widget.TextView;
+
+/**
+ * Created by alexlucas on 6/4/13.
+ */
+
+
+public class LogView extends TextView implements LogNode {
+
+    public LogView(Context context) {
+        super(context);
+    }
+
+    public LogView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public LogView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    /**
+     * Formats the log data and prints it out to the LogView.
+     * @param priority Log level of the data being logged.  Verbose, Error, etc.
+     * @param tag Tag for for the log data.  Can be used to organize log statements.
+     * @param msg The actual message to be logged. The actual message to be logged.
+     * @param tr If an exception was thrown, this can be sent along for the logging facilities
+     *           to extract and print useful information.
+     */
+    @Override
+    public void println(int priority, String tag, String msg, Throwable tr) {
+        String priorityStr = null;
+
+        // For the purposes of this View, we want to print the priority as readable text.
+        switch(priority) {
+            case android.util.Log.VERBOSE:
+                priorityStr = "VERBOSE";
+                break;
+            case android.util.Log.DEBUG:
+                priorityStr = "DEBUG";
+                break;
+            case android.util.Log.INFO:
+                priorityStr = "INFO";
+                break;
+            case android.util.Log.WARN:
+                priorityStr = "WARN";
+                break;
+            case android.util.Log.ERROR:
+                priorityStr = "ERROR";
+                break;
+            case android.util.Log.ASSERT:
+                priorityStr = "ASSERT";
+                break;
+            default:
+                break;
+        }
+
+        // Handily, the Log class has a facility for converting a stack trace into a useable string.
+        String exceptionStr = null;
+        if (tr != null) {
+            exceptionStr = android.util.Log.getStackTraceString(tr);
+        }
+
+        // Take the priority, tag, message, and exception, and concatenate as necessary
+        // into one usable line of text.
+        StringBuilder outputBuilder = new StringBuilder();
+
+        String delimiter = "\t";
+
+        appendIfNotNull(outputBuilder, priorityStr, delimiter);
+        appendIfNotNull(outputBuilder, tag, delimiter);
+        appendIfNotNull(outputBuilder, msg, delimiter);
+        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
+
+        // Actually display the text we just generated within the LogView.
+        appendToLog(outputBuilder.toString());
+
+        if (mNext != null) {
+            mNext.println(priority, tag, msg, tr);
+        }
+    }
+
+    public LogNode getNext() {
+        return mNext;
+    }
+
+    public void setNext(LogNode node) {
+        mNext = node;
+    }
+
+    /** Takes a string and adds to it, with a seperator, if the bit to be added isn't null. Since
+     * the logger takes so many arguments that might be null, this method helps cut out some of the
+     * agonizing tedium of writing the same 3 lines over and over.
+     * @param source Stringbuilder containing the text to append to.
+     * @param addStrStr The String to append
+     * @param delimiter The String to seperate the source and appendee strings. A tab or comma,
+     *                  for instance.
+     * @return The fully concatenated String as a StringBuilder
+     */
+    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
+        if (addStr != null) {
+            if (addStr.length() == 0) {
+                delimiter = "";
+            }
+
+            return source.append(addStr).append(delimiter);
+        }
+        return source;
+    }
+
+    // The next LogNode in the chain.
+    LogNode mNext;
+
+    /** Outputs the string as a new line of log data in the LogView. */
+    public void appendToLog(String s) {
+        append(s + "\n");
+    }
+
+
+}
diff --git a/common/src/java/com/example/android/common/logger/LogWrapper.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogWrapper.java
similarity index 100%
copy from common/src/java/com/example/android/common/logger/LogWrapper.java
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogWrapper.java
diff --git a/common/src/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
similarity index 100%
rename from common/src/java/com/example/android/common/logger/MessageOnlyLogFilter.java
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/activity_main.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/activity_main.xml
new file mode 100755
index 0000000..a86e2b0
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/activity_main.xml
@@ -0,0 +1,38 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<LinearLayout
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent">
+<fragment
+        android:name="com.example.android.common.SimpleTextFragment"
+        android:id="@+id/intro_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+<View
+        android:layout_width="fill_parent"
+        android:layout_height="1dp"
+        android:background="@android:color/darker_gray"/>
+<fragment
+        android:name="com.example.android.basicandroidkeystore.LogFragment"
+        android:id="@+id/log_fragment"
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+        </LinearLayout>
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/log_fragment.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/log_fragment.xml
new file mode 100644
index 0000000..f2d7b75
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/log_fragment.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+       
+        <!--
+          Copyright 2013 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.	
+          -->	
+        
+<ScrollView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/log_scroll"	
+        android:layout_width="match_parent"	
+        android:layout_height="match_parent">	
+        
+        <com.example.android.common.logger.LogView
+                android:id="@+id/sample_output"
+                style="@style/Log"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:clickable="true"
+                android:focusable="true"
+                android:text=""
+                android:gravity="bottom" />
+</ScrollView>
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/menu/main.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/menu/main.xml
similarity index 100%
rename from security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/menu/main.xml
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/menu/main.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-sw600dp/styles.xml
similarity index 100%
copy from background/alarms/repeatingAlarm/Scheduler/res/values-sw600dp/styles.xml
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-sw600dp/styles.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-v11/styles.xml
similarity index 100%
copy from background/alarms/repeatingAlarm/Scheduler/res/values-v11/styles.xml
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-v11/styles.xml
diff --git a/background/alarms/repeatingAlarm/Scheduler/res/values/dimens.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/dimens.xml
similarity index 100%
rename from background/alarms/repeatingAlarm/Scheduler/res/values/dimens.xml
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/dimens.xml
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/strings.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/strings.xml
new file mode 100755
index 0000000..e579aee
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/strings.xml
@@ -0,0 +1,37 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Androidkeystore</string>
+    <string name="sample_action">Sample action</string>
+
+    <!-- Steps -->
+    <string name="intro_message">
+        Welcome to the <b>Basic Android Key Store</b> sample!\n\n
+        This sample demonstrates how to use the Android Key Store to safely create and store
+        encryption keys that only your application can access.  You can also sign data using those
+        keys.\n\n
+        To create a new KeyPair, click \"Create\".\n\n
+        To sign some data using a KeyPair, click \"Sign\".\n\n
+        To verify the data using the signature provided, click \"Verify\".\n\n
+    </string>
+
+    <!-- Button labels -->
+    <string name="str_create_keys">Create</string>
+    <string name="str_sign_data">Sign</string>
+    <string name="str_verify_data">Verify</string>
+
+</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/styles.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/styles.xml
new file mode 100644
index 0000000..fb75961
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleOutput">
+        <item name="android:padding">@dimen/margin_medium</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+    <style name="Log" parent="Widget.SampleOutput">
+        <item name="android:typeface">monospace</item>
+    </style>
+
+</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/.gitignore b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/README-simpleview.txt b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/README-simpleview.txt
deleted file mode 100644
index 4ac7cdb..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/README-simpleview.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-<#--
-        Copyright 2013 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.
--->
-
-Steps to implement SimpleView template:
--in template-params.xml.ftl:
-    -add the following line to common imports
-        <common src="activities"/>
-
--Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
- called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
- folder instead of "common" or "templates".
-   For instance, if your package name is com.example.foo, create the file
-   src/main/java/com/example/foo/FooFragment.java
-
--refer to sampleSamples/simpleViewSample for a reference implementation of a
-project built on this template.
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/proguard-project.txt b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/AndroidManifest.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 28d256c..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicandroidkeystore"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="18" android:targetSdkVersion="19" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
deleted file mode 100644
index 12873e8..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
-* Copyright (C) 2013 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.basicandroidkeystore;
-
-import android.content.Context;
-import android.os.Bundle;
-import android.security.KeyPairGeneratorSpec;
-import android.support.v4.app.Fragment;
-import android.util.Base64;
-import android.view.MenuItem;
-
-import com.example.android.common.logger.Log;
-
-import java.io.IOException;
-import java.math.BigInteger;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.UnrecoverableEntryException;
-import java.security.cert.CertificateException;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
-
-import javax.security.auth.x500.X500Principal;
-
-public class BasicAndroidKeyStoreFragment extends Fragment {
-
-    public static final String TAG = "BasicAndroidKeyStoreFragment";
-
-    // BEGIN_INCLUDE(values)
-
-    public static final String SAMPLE_ALIAS = "myKey";
-
-    // Some sample data to sign, and later verify using the generated signature.
-    public static final String SAMPLE_INPUT="Hello, Android!";
-
-    // Just a handy place to store the signature in between signing and verifying.
-    public String mSignatureStr = null;
-
-    // You can store multiple key pairs in the Key Store.  The string used to refer to the Key you
-    // want to store, or later pull, is referred to as an "alias" in this case, because calling it
-    // a key, when you use it to retrieve a key, would just be irritating.
-    private String mAlias = null;
-
-    // END_INCLUDE(values)
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-        setAlias(SAMPLE_ALIAS);
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.btn_create_keys:
-                try {
-                    createKeys(getActivity());
-                    Log.d(TAG, "Keys created");
-                    return true;
-                } catch (NoSuchAlgorithmException e) {
-                    Log.w(TAG, "RSA not supported", e);
-                } catch (InvalidAlgorithmParameterException e) {
-                    Log.w(TAG, "No such provider: AndroidKeyStore");
-                } catch (NoSuchProviderException e) {
-                    Log.w(TAG, "Invalid Algorithm Parameter Exception", e);
-                }
-                return true;
-            case R.id.btn_sign_data:
-                try {
-                    mSignatureStr = signData(SAMPLE_INPUT);
-                } catch (KeyStoreException e) {
-                    Log.w(TAG, "KeyStore not Initialized", e);
-                } catch (UnrecoverableEntryException e) {
-                    Log.w(TAG, "KeyPair not recovered", e);
-                } catch (NoSuchAlgorithmException e) {
-                    Log.w(TAG, "RSA not supported", e);
-                } catch (InvalidKeyException e) {
-                    Log.w(TAG, "Invalid Key", e);
-                } catch (SignatureException e) {
-                    Log.w(TAG, "Invalid Signature", e);
-                } catch (IOException e) {
-                    Log.w(TAG, "IO Exception", e);
-                } catch (CertificateException e) {
-                    Log.w(TAG, "Error occurred while loading certificates", e);
-                }
-                Log.d(TAG, "Signature: " + mSignatureStr);
-                return true;
-
-            case R.id.btn_verify_data:
-                boolean verified = false;
-                try {
-                    if (mSignatureStr != null) {
-                        verified = verifyData(SAMPLE_INPUT, mSignatureStr);
-                    }
-                } catch (KeyStoreException e) {
-                    Log.w(TAG, "KeyStore not Initialized", e);
-                } catch (CertificateException e) {
-                    Log.w(TAG, "Error occurred while loading certificates", e);
-                } catch (NoSuchAlgorithmException e) {
-                    Log.w(TAG, "RSA not supported", e);
-                } catch (IOException e) {
-                    Log.w(TAG, "IO Exception", e);
-                } catch (UnrecoverableEntryException e) {
-                    Log.w(TAG, "KeyPair not recovered", e);
-                } catch (InvalidKeyException e) {
-                    Log.w(TAG, "Invalid Key", e);
-                } catch (SignatureException e) {
-                    Log.w(TAG, "Invalid Signature", e);
-                }
-                if (verified) {
-                    Log.d(TAG, "Data Signature Verified");
-                } else {
-                    Log.d(TAG, "Data not verified.");
-                }
-                return true;
-        }
-        return false;
-    }
-
-    /**
-     * Creates a public and private key and stores it using the Android Key Store, so that only
-     * this application will be able to access the keys.
-     */
-    public void createKeys(Context context) throws NoSuchProviderException,
-            NoSuchAlgorithmException, InvalidAlgorithmParameterException {
-        // BEGIN_INCLUDE(create_valid_dates)
-        // Create a start and end time, for the validity range of the key pair that's about to be
-        // generated.
-        Calendar start = new GregorianCalendar();
-        Calendar end = new GregorianCalendar();
-        end.add(1, Calendar.YEAR);
-        //END_INCLUDE(create_valid_dates)
-
-
-        // BEGIN_INCLUDE(create_spec)
-        // The KeyPairGeneratorSpec object is how parameters for your key pair are passed
-        // to the KeyPairGenerator.  For a fun home game, count how many classes in this sample
-        // start with the phrase "KeyPair".
-        KeyPairGeneratorSpec spec =
-                new KeyPairGeneratorSpec.Builder(context)
-                        // You'll use the alias later to retrieve the key.  It's a key for the key!
-                        .setAlias(mAlias)
-                                // The subject used for the self-signed certificate of the generated pair
-                        .setSubject(new X500Principal("CN=" + mAlias))
-                                // The serial number used for the self-signed certificate of the
-                                // generated pair.
-                        .setSerialNumber(BigInteger.valueOf(1337))
-                                // Date range of validity for the generated pair.
-                        .setStartDate(start.getTime())
-                        .setEndDate(end.getTime())
-                        .build();
-        // END_INCLUDE(create_spec)
-
-        // BEGIN_INCLUDE(create_keypair)
-        // Initialize a KeyPair generator using the the intended algorithm (in this example, RSA
-        // and the KeyStore.  This example uses the AndroidKeyStore.
-        KeyPairGenerator kpGenerator = KeyPairGenerator
-                .getInstance(SecurityConstants.TYPE_RSA,
-                        SecurityConstants.KEYSTORE_PROVIDER_ANDROID_KEYSTORE);
-        kpGenerator.initialize(spec);
-        KeyPair kp = kpGenerator.generateKeyPair();
-        Log.d(TAG, "Public Key is: " + kp.getPublic().toString());
-        // END_INCLUDE(create_keypair)
-    }
-
-    /**
-     * Signs the data using the key pair stored in the Android Key Store.  This signature can be
-     * used with the data later to verify it was signed by this application.
-     * @return A string encoding of the data signature generated
-     */
-    public String signData(String inputStr) throws KeyStoreException,
-            UnrecoverableEntryException, NoSuchAlgorithmException, InvalidKeyException,
-            SignatureException, IOException, CertificateException {
-        byte[] data = inputStr.getBytes();
-
-        // BEGIN_INCLUDE(sign_load_keystore)
-        KeyStore ks = KeyStore.getInstance(SecurityConstants.KEYSTORE_PROVIDER_ANDROID_KEYSTORE);
-
-        // Weird artifact of Java API.  If you don't have an InputStream to load, you still need
-        // to call "load", or it'll crash.
-        ks.load(null);
-
-        // Load the key pair from the Android Key Store
-        KeyStore.Entry entry = ks.getEntry(mAlias, null);
-
-        /* If the entry is null, keys were never stored under this alias.
-         * Debug steps in this situation would be:
-         * -Check the list of aliases by iterating over Keystore.aliases(), be sure the alias
-         *   exists.
-         * -If that's empty, verify they were both stored and pulled from the same keystore
-         *   "AndroidKeyStore"
-         */
-        if (entry == null) {
-            Log.w(TAG, "No key found under alias: " + mAlias);
-            Log.w(TAG, "Exiting signData()...");
-            return null;
-        }
-
-        /* If entry is not a KeyStore.PrivateKeyEntry, it might have gotten stored in a previous
-         * iteration of your application that was using some other mechanism, or been overwritten
-         * by something else using the same keystore with the same alias.
-         * You can determine the type using entry.getClass() and debug from there.
-         */
-        if (!(entry instanceof KeyStore.PrivateKeyEntry)) {
-            Log.w(TAG, "Not an instance of a PrivateKeyEntry");
-            Log.w(TAG, "Exiting signData()...");
-            return null;
-        }
-        // END_INCLUDE(sign_data)
-
-        // BEGIN_INCLUDE(sign_create_signature)
-        // This class doesn't actually represent the signature,
-        // just the engine for creating/verifying signatures, using
-        // the specified algorithm.
-        Signature s = Signature.getInstance(SecurityConstants.SIGNATURE_SHA256withRSA);
-
-        // Initialize Signature using specified private key
-        s.initSign(((KeyStore.PrivateKeyEntry) entry).getPrivateKey());
-
-        // Sign the data, store the result as a Base64 encoded String.
-        s.update(data);
-        byte[] signature = s.sign();
-        String result = Base64.encodeToString(signature, Base64.DEFAULT);
-        // END_INCLUDE(sign_data)
-
-        return result;
-    }
-
-    /**
-     * Given some data and a signature, uses the key pair stored in the Android Key Store to verify
-     * that the data was signed by this application, using that key pair.
-     * @param input The data to be verified.
-     * @param signatureStr The signature provided for the data.
-     * @return A boolean value telling you whether the signature is valid or not.
-     */
-    public boolean verifyData(String input, String signatureStr) throws KeyStoreException,
-            CertificateException, NoSuchAlgorithmException, IOException,
-            UnrecoverableEntryException, InvalidKeyException, SignatureException {
-        byte[] data = input.getBytes();
-        byte[] signature;
-        // BEGIN_INCLUDE(decode_signature)
-
-        // Make sure the signature string exists.  If not, bail out, nothing to do.
-
-        if (signatureStr == null) {
-            Log.w(TAG, "Invalid signature.");
-            Log.w(TAG, "Exiting verifyData()...");
-            return false;
-        }
-
-        try {
-            // The signature is going to be examined as a byte array,
-            // not as a base64 encoded string.
-            signature = Base64.decode(signatureStr, Base64.DEFAULT);
-        } catch (IllegalArgumentException e) {
-            // signatureStr wasn't null, but might not have been encoded properly.
-            // It's not a valid Base64 string.
-            return false;
-        }
-        // END_INCLUDE(decode_signature)
-
-        KeyStore ks = KeyStore.getInstance("AndroidKeyStore");
-
-        // Weird artifact of Java API.  If you don't have an InputStream to load, you still need
-        // to call "load", or it'll crash.
-        ks.load(null);
-
-        // Load the key pair from the Android Key Store
-        KeyStore.Entry entry = ks.getEntry(mAlias, null);
-
-        if (entry == null) {
-            Log.w(TAG, "No key found under alias: " + mAlias);
-            Log.w(TAG, "Exiting verifyData()...");
-            return false;
-        }
-
-        if (!(entry instanceof KeyStore.PrivateKeyEntry)) {
-            Log.w(TAG, "Not an instance of a PrivateKeyEntry");
-            return false;
-        }
-
-        // This class doesn't actually represent the signature,
-        // just the engine for creating/verifying signatures, using
-        // the specified algorithm.
-        Signature s = Signature.getInstance(SecurityConstants.SIGNATURE_SHA256withRSA);
-
-        // BEGIN_INCLUDE(verify_data)
-        // Verify the data.
-        s.initVerify(((KeyStore.PrivateKeyEntry) entry).getCertificate());
-        s.update(data);
-        boolean valid = s.verify(signature);
-        return valid;
-        // END_INCLUDE(verify_data)
-    }
-
-    public void setAlias(String alias) {
-        mAlias = alias;
-    }
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/SecurityConstants.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/SecurityConstants.java
deleted file mode 100644
index ea5ee30..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/SecurityConstants.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2013 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.basicandroidkeystore;
-
-/**
- * Helper class, contains several constants used when encrypting/decrypting data on Android.
- * This class should not be considered a complete list of the algorithms, keystore types,
- * or signature types within the Android Platform, only the more common ones.
- */
-public class SecurityConstants {
-    public static final String KEYSTORE_PROVIDER_ANDROID_KEYSTORE = "AndroidKeyStore";
-
-    public static final String TYPE_RSA = "RSA";
-    public static final String TYPE_DSA = "DSA";
-    public static final String TYPE_BKS = "BKS";
-
-    public static final String SIGNATURE_SHA256withRSA = "SHA256withRSA";
-    public static final String SIGNATURE_SHA512withRSA = "SHA512withRSA";
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-hdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-mdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/values/strings.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/values/strings.xml
deleted file mode 100644
index 25ad389..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<resources>
-    <string name="str_create_keys">Create</string>
-    <string name="str_sign_data">Sign</string>
-    <string name="str_verify_data">Verify</string>
-</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/AndroidManifest.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/AndroidManifest.xml
deleted file mode 100644
index eb8b7b8..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicandroidkeystore.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicandroidkeystore"
-            android:label="Tests for com.example.android.basicandroidkeystore" />
-
-</manifest>
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/src/com/example/android/basicandroidkeystore/tests/SampleTests.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/src/com/example/android/basicandroidkeystore/tests/SampleTests.java
deleted file mode 100644
index 756b605..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/src/com/example/android/basicandroidkeystore/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicandroidkeystore.tests;
-
-import com.example.android.basicandroidkeystore.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicAndroidKeyStore sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicAndroidKeyStoreFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicAndroidKeyStoreFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/README.txt b/security/keystore/BasicAndroidKeyStore/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/build.gradle b/security/keystore/BasicAndroidKeyStore/build.gradle
index cca9ac3..036abc8 100644
--- a/security/keystore/BasicAndroidKeyStore/build.gradle
+++ b/security/keystore/BasicAndroidKeyStore/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/security/keystore/BasicAndroidKeyStore/buildSrc/build.gradle b/security/keystore/BasicAndroidKeyStore/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/security/keystore/BasicAndroidKeyStore/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties b/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties
+++ b/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/security/keystore/BasicAndroidKeyStore/settings.gradle b/security/keystore/BasicAndroidKeyStore/settings.gradle
index e4b36fe..1d0b075 100644
--- a/security/keystore/BasicAndroidKeyStore/settings.gradle
+++ b/security/keystore/BasicAndroidKeyStore/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicAndroidKeyStoreSample'
+include ':BasicAndroidKeyStore'
diff --git a/security/keystore/BasicAndroidKeyStore/template-params.xml b/security/keystore/BasicAndroidKeyStore/template-params.xml
deleted file mode 100644
index d603dfa..0000000
--- a/security/keystore/BasicAndroidKeyStore/template-params.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicAndroidKeyStore</name>
-    <group>Security</group>
-    <package>com.example.android.basicandroidkeystore</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>18</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                Welcome to the <b>Basic Android Key Store</b> sample!\n\n
-                This sample demonstrates how to use the Android Key Store to safely create and store
-                encryption keys that only your application can access.  You can also sign data
-                using those keys.\n\n
-                To create a new KeyPair, click \"Create\".\n\n
-                To sign some data using a KeyPair, click \"Sign\".\n\n
-                To verify the data using the signature provided, click \"Verify\".\n\n            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <template src="SimpleView"/>
-    <common src="activities"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore b/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt b/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 547d95e..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.activityinstrumentation"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-
-</manifest>
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java
deleted file mode 100644
index 39056ea..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2013 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.activityinstrumentation;
-
-import android.app.Activity;
-import android.content.SharedPreferences;
-import android.os.Bundle;
-import android.preference.PreferenceManager;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.Spinner;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-/**
- * Basic activity with a spinner. The spinner should persist its position to disk every time a
- * new selection is made.
- */
-public class MainActivity extends Activity {
-
-    /** Shared preferences key: Holds spinner position. Must not be negative. */
-    private static final String PREF_SPINNER_POS = "spinner_pos";
-    /** Magic constant to indicate that no value is stored for PREF_SPINNER_POS. */
-    private static final int PREF_SPINNER_VALUE_ISNULL = -1;
-    /** Values for display in spinner. */
-    private static final String[] SPINNER_VALUES = new String[] {
-            "Select Weather...", "Sunny", "Partly Cloudy", "Cloudy", "Rain", "Snow", "Hurricane"};
-
-    // Constants representing each of the options in SPINNER_VALUES. Declared package-private
-    // so that they can be accessed from our test suite.
-    static final int WEATHER_NOSELECTION = 0;
-    static final int WEATHER_SUNNY = 1;
-    static final int WEATHER_PARTLY_CLOUDY = 2;
-    static final int WEATHER_CLOUDY = 3;
-    static final int WEATHER_RAIN = 4;
-    static final int WEATHER_SNOW = 5;
-    static final int WEATHER_HURRICANE = 6;
-
-    /** Handle to default shared preferences for this activity. */
-    private SharedPreferences mPrefs;
-    /** Handle to the spinner in this Activity's layout. */
-    private Spinner mSpinner;
-
-    /**
-     * Setup activity state.
-     *
-     * @param savedInstanceState
-     */
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Inflate UI from res/layout/activity_main.xml
-        setContentView(R.layout.sample_main);
-
-        // Get handle to default shared preferences for this activity
-        mPrefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
-
-        // Populate spinner with sample values from an array
-        mSpinner = (Spinner) findViewById(R.id.spinner);
-        mSpinner.setAdapter(
-                new ArrayAdapter<String>(
-                        this,                                                   // Context
-                        android.R.layout.simple_list_item_1,                    // Layout
-                        new ArrayList<String>(Arrays.asList(SPINNER_VALUES))    // Data source
-                ));
-
-        // Read in a sample value, if it's not set.
-        int selection = mPrefs.getInt(PREF_SPINNER_POS, PREF_SPINNER_VALUE_ISNULL);
-        if (selection != PREF_SPINNER_VALUE_ISNULL) {
-            mSpinner.setSelection(selection);
-        }
-
-        // Callback to persist spinner data whenever a new value is selected. This will be the
-        // focus of our sample unit test.
-        mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-
-            // The methods below commit the ID of the currently selected item in the spinner
-            // to disk, using a SharedPreferences file.
-            //
-            // Note: A common mistake here is to forget to call .commit(). Try removing this
-            // statement and running the tests to watch them fail.
-            @Override
-            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-                mPrefs.edit().putInt(PREF_SPINNER_POS, position).commit();
-            }
-
-            @Override
-            public void onNothingSelected(AdapterView<?> parent) {
-                mPrefs.edit().remove(PREF_SPINNER_POS).commit();
-            }
-        });
-    }
-}
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml
deleted file mode 100644
index 4ed2243..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright 2013 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.
-  -->
-
-<resources>
-    <string name="instructions">The value of the spinner below should be persisted when this activity is destroyed.</string>
-</resources>
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml
deleted file mode 100644
index ad20a2a..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.activityinstrumentation.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.activityinstrumentation"
-            android:label="Tests for com.example.android.activityinstrumentation" />
-
-</manifest>
\ No newline at end of file
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java
deleted file mode 100644
index 3be1867..0000000
--- a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2013 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.activityinstrumentation;
-
-import android.app.Activity;
-import android.test.ActivityInstrumentationTestCase2;
-import android.widget.Spinner;
-
-import com.example.android.activityinstrumentation.MainActivity;
-import com.example.android.activityinstrumentation.R;
-
-/**
- * This is a simple framework for a test of an Application.  See
- * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on
- * how to write and extend Application tests.
- *
- * <p>To run this test, you can type:
- * adb shell am instrument -w \
- * -e class com.example.android.activityinstrumentation.MainActivityTest \
- * quux.tests/android.test.InstrumentationTestRunner
- *
- * <p>Individual tests are defined as any method beginning with 'test'.
- *
- * <p>ActivityInstrumentationTestCase2 allows these tests to run alongside a running
- * copy of the application under inspection. Calling getActivity() will return a
- * handle to this activity (launching it if needed).
- */
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    public SampleTests() {
-        super("com.example.android.activityinstrumentation", MainActivity.class);
-    }
-
-    /**
-     * Test to make sure that spinner values are persisted across activity restarts.
-     *
-     * <p>Launches the main activity, sets a spinner value, closes the activity, then relaunches
-     * that activity. Checks to make sure that the spinner values match what we set them to.
-     */
-    // BEGIN_INCLUDE (test_name)
-    public void testSpinnerValuePersistedBetweenLaunches() {
-        // END_INCLUDE (test_name)
-        final int TEST_SPINNER_POSITION_1 = MainActivity.WEATHER_PARTLY_CLOUDY;
-
-        // BEGIN_INCLUDE (launch_activity)
-        // Launch the activity
-        Activity activity = getActivity();
-        // END_INCLUDE (launch_activity)
-
-        // BEGIN_INCLUDE (write_to_ui)
-        // Set spinner to test position 1
-        final Spinner spinner1 = (Spinner) activity.findViewById(R.id.spinner);
-        activity.runOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                // Attempts to manipulate the UI must be performed on a UI thread.
-                // Calling this outside runOnUiThread() will cause an exception.
-                //
-                // You could also use @UiThreadTest, but activity lifecycle methods
-                // cannot be called if this annotation is used.
-                spinner1.requestFocus();
-                spinner1.setSelection(TEST_SPINNER_POSITION_1);
-            }
-        });
-        // END_INCLUDE (write_to_ui)
-
-        // BEGIN_INCLUDE (relaunch_activity)
-        // Close the activity
-        activity.finish();
-        setActivity(null);  // Required to force creation of a new activity
-
-        // Relaunch the activity
-        activity = this.getActivity();
-        // END_INCLUDE (relaunch_activity)
-
-        // BEGIN_INCLUDE (check_results)
-        // Verify that the spinner was saved at position 1
-        final Spinner spinner2 = (Spinner) activity.findViewById(R.id.spinner);
-        int currentPosition = spinner2.getSelectedItemPosition();
-        assertEquals(TEST_SPINNER_POSITION_1, currentPosition);
-        // END_INCLUDE (check_results)
-
-        // Since this is a stateful test, we need to make sure that the activity isn't simply
-        // echoing a previously-stored value that (coincidently) matches position 1
-        final int TEST_SPINNER_POSITION_2 = MainActivity.WEATHER_SNOW;
-
-        // Set spinner to test position 2
-        activity.runOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                spinner2.requestFocus();
-                spinner2.setSelection(TEST_SPINNER_POSITION_2);
-            }
-        });
-
-        // Close the activity
-        activity.finish();
-        setActivity(null);
-
-        // Relaunch the activity
-        activity = this.getActivity();
-
-        // Verify that the spinner was saved at position 2
-        final Spinner spinner3 = (Spinner) activity.findViewById(R.id.spinner);
-        currentPosition = spinner3.getSelectedItemPosition();
-        assertEquals(TEST_SPINNER_POSITION_2, currentPosition);
-    }
-}
diff --git a/testing/ActivityInstrumentation/build.gradle b/testing/ActivityInstrumentation/build.gradle
deleted file mode 100644
index c7a137e..0000000
--- a/testing/ActivityInstrumentation/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../build"
-  pathToSamplesCommon "../../common"
-}
-apply from: "../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/testing/ActivityInstrumentation/buildSrc/build.gradle b/testing/ActivityInstrumentation/buildSrc/build.gradle
deleted file mode 100644
index 29282af..0000000
--- a/testing/ActivityInstrumentation/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar b/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties b/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 5c22dec..0000000
--- a/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/testing/ActivityInstrumentation/gradlew b/testing/ActivityInstrumentation/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/testing/ActivityInstrumentation/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/testing/ActivityInstrumentation/gradlew.bat b/testing/ActivityInstrumentation/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/testing/ActivityInstrumentation/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/testing/ActivityInstrumentation/settings.gradle b/testing/ActivityInstrumentation/settings.gradle
deleted file mode 100644
index 0f010ba..0000000
--- a/testing/ActivityInstrumentation/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-include 'ActivityInstrumentationSample'
diff --git a/testing/ActivityInstrumentation/template-params.xml b/testing/ActivityInstrumentation/template-params.xml
deleted file mode 100644
index 4856a82..0000000
--- a/testing/ActivityInstrumentation/template-params.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>ActivityInstrumentation</name>
-    <group>Testing</group>
-    <package>com.example.android.com.example.android.activityinstrumentation</package>
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample provides a basic example of using an InstrumentationTest to probe the
-            internal state of an Activity.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/testing/ActivityInstrumentationSample/AndroidManifest.xml b/testing/ActivityInstrumentationSample/AndroidManifest.xml
new file mode 100644
index 0000000..783fc0c
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/AndroidManifest.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright 2013 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.
+  -->
+
+<!--
+     This manifest describes the application which we'll be testing. The actual instrumentation
+     tests are build a second APK, loaded alongside this one on the device.
+
+     See also: //tests/AndroidManifest.xml
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.example.android.activityinstrumentation"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="7"/>
+
+    <!-- This is just a standard activity. -->
+    <application
+            android:label="@string/app_name"
+            android:icon="@drawable/ic_launcher"
+            android:theme="@style/AppTheme">
+        <activity
+                android:name="MainActivity"
+                android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
diff --git a/testing/ActivityInstrumentationSample/proguard-project.txt b/testing/ActivityInstrumentationSample/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-hdpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-hdpi/ic_launcher.png
old mode 100755
new mode 100644
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to testing/ActivityInstrumentationSample/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png
new file mode 100644
index 0000000..9923872
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-mdpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-mdpi/ic_launcher.png
old mode 100755
new mode 100644
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to testing/ActivityInstrumentationSample/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-xhdpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-xhdpi/ic_launcher.png
old mode 100755
new mode 100644
similarity index 100%
copy from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to testing/ActivityInstrumentationSample/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml b/testing/ActivityInstrumentationSample/res/layout/activity_main.xml
similarity index 100%
rename from testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml
rename to testing/ActivityInstrumentationSample/res/layout/activity_main.xml
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml b/testing/ActivityInstrumentationSample/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml
rename to testing/ActivityInstrumentationSample/res/values-sw720dp-land/dimens.xml
diff --git a/testing/ActivityInstrumentationSample/res/values-v11/styles.xml b/testing/ActivityInstrumentationSample/res/values-v11/styles.xml
new file mode 100644
index 0000000..1b39428
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/res/values-v11/styles.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/testing/ActivityInstrumentationSample/res/values-v14/styles.xml b/testing/ActivityInstrumentationSample/res/values-v14/styles.xml
new file mode 100644
index 0000000..219b706
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/res/values-v14/styles.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml b/testing/ActivityInstrumentationSample/res/values/dimens.xml
similarity index 100%
rename from testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml
rename to testing/ActivityInstrumentationSample/res/values/dimens.xml
diff --git a/testing/ActivityInstrumentationSample/res/values/strings.xml b/testing/ActivityInstrumentationSample/res/values/strings.xml
new file mode 100644
index 0000000..8bf4747
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Activity Instrumentation Sample</string>
+    <string name="instructions">The value of the spinner below should be persisted when this activity is destroyed.</string>
+</resources>
diff --git a/testing/ActivityInstrumentationSample/res/values/styles.xml b/testing/ActivityInstrumentationSample/res/values/styles.xml
new file mode 100644
index 0000000..bdd3ba5
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/res/values/styles.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
diff --git a/testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java b/testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java
new file mode 100644
index 0000000..39a7e37
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2013 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.activityinstrumentation;
+
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.app.Activity;
+import android.preference.PreferenceManager;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.Spinner;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * Basic activity with a spinner. The spinner should persist its position to disk every time a
+ * new selection is made.
+ */
+public class MainActivity extends Activity {
+
+    /** Shared preferences key: Holds spinner position. Must not be negative. */
+    private static final String PREF_SPINNER_POS = "spinner_pos";
+    /** Magic constant to indicate that no value is stored for PREF_SPINNER_POS. */
+    private static final int PREF_SPINNER_VALUE_ISNULL = -1;
+    /** Values for display in spinner. */
+    private static final String[] SPINNER_VALUES = new String[] {
+            "Select Weather...", "Sunny", "Partly Cloudy", "Cloudy", "Rain", "Snow", "Hurricane"};
+
+    // Constants representing each of the options in SPINNER_VALUES. Declared package-private
+    // so that they can be accessed from our test suite.
+    static final int WEATHER_NOSELECTION = 0;
+    static final int WEATHER_SUNNY = 1;
+    static final int WEATHER_PARTLY_CLOUDY = 2;
+    static final int WEATHER_CLOUDY = 3;
+    static final int WEATHER_RAIN = 4;
+    static final int WEATHER_SNOW = 5;
+    static final int WEATHER_HURRICANE = 6;
+
+    /** Handle to default shared preferences for this activity. */
+    private SharedPreferences mPrefs;
+    /** Handle to the spinner in this Activity's layout. */
+    private Spinner mSpinner;
+
+    /**
+     * Setup activity state.
+     *
+     * @param savedInstanceState
+     */
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Inflate UI from res/layout/activity_main.xml
+        setContentView(R.layout.activity_main);
+
+        // Get handle to default shared preferences for this activity
+        mPrefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
+
+        // Populate spinner with sample values from an array
+        mSpinner = (Spinner) findViewById(R.id.spinner);
+        mSpinner.setAdapter(
+                new ArrayAdapter<String>(
+                        this,                                                   // Context
+                        android.R.layout.simple_list_item_1,                    // Layout
+                        new ArrayList<String>(Arrays.asList(SPINNER_VALUES))    // Data source
+                ));
+
+        // Read in a sample value, if it's not set.
+        int selection = mPrefs.getInt(PREF_SPINNER_POS, PREF_SPINNER_VALUE_ISNULL);
+        if (selection != PREF_SPINNER_VALUE_ISNULL) {
+            mSpinner.setSelection(selection);
+        }
+
+        // Callback to persist spinner data whenever a new value is selected. This will be the
+        // focus of our sample unit test.
+        mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+
+            // The methods below commit the ID of the currently selected item in the spinner
+            // to disk, using a SharedPreferences file.
+            //
+            // Note: A common mistake here is to forget to call .commit(). Try removing this
+            // statement and running the tests to watch them fail.
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                mPrefs.edit().putInt(PREF_SPINNER_POS, position);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+                mPrefs.edit().remove(PREF_SPINNER_POS).commit();
+            }
+        });
+    }
+}
diff --git a/testing/ActivityInstrumentationSample/tests/AndroidManifest.xml b/testing/ActivityInstrumentationSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..1547109
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/tests/AndroidManifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Copyright 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.example.android.activityinstrumentation.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+    <!--
+    This declares that this application uses the instrumentation test runner targeting
+    the package of com.example.android.foohe tests use the command:
+    "adb shell am instrument -w com.example.android.foooid.test.InstrumentationTestRunner"
+    -->
+    <instrumentation android:name="android.test.InstrumentationTestRunner"
+                     android:targetPackage="com.example.android.activityinstrumentation"
+                     android:label="Tests for com.example.android.UnitTestSample"/>
+</manifest>
diff --git a/testing/ActivityInstrumentationSample/tests/proguard-project.txt b/testing/ActivityInstrumentationSample/tests/proguard-project.txt
new file mode 100644
index 0000000..f2fe155
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/tests/proguard-project.txt
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
diff --git a/testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java b/testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java
new file mode 100644
index 0000000..fcffb01
--- /dev/null
+++ b/testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2013 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.activityinstrumentation;
+
+import android.app.Activity;
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.Spinner;
+
+/**
+ * This is a simple framework for a test of an Application.  See
+ * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on
+ * how to write and extend Application tests.
+ *
+ * <p>To run this test, you can type:
+ * adb shell am instrument -w \
+ * -e class com.example.android.activityinstrumentation.MainActivityTest \
+ * com.example.android.activityinstrumentation.tests/android.test.InstrumentationTestRunner
+ *
+ * <p>Individual tests are defined as any method beginning with 'test'.
+ *
+ * <p>ActivityInstrumentationTestCase2 allows these tests to run alongside a running
+ * copy of the application under inspection. Calling getActivity() will return a
+ * handle to this activity (launching it if needed).
+ */
+public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    public MainActivityTest() {
+        super("com.example.android.activityinstrumentation", MainActivity.class);
+    }
+
+    /**
+     * Test to make sure that spinner values are persisted across activity restarts.
+     *
+     * <p>Launches the main activity, sets a spinner value, closes the activity, then relaunches
+     * that activity. Checks to make sure that the spinner values match what we set them to.
+     */
+    // BEGIN_INCLUDE (test_name)
+    public void testSpinnerValuePersistedBetweenLaunches() {
+    // END_INCLUDE (test_name)
+        final int TEST_SPINNER_POSITION_1 = MainActivity.WEATHER_PARTLY_CLOUDY;
+
+        // BEGIN_INCLUDE (launch_activity)
+        // Launch the activity
+        Activity activity = getActivity();
+        // END_INCLUDE (launch_activity)
+
+        // BEGIN_INCLUDE (write_to_ui)
+        // Set spinner to test position 1
+        final Spinner spinner1 = (Spinner) activity.findViewById(R.id.spinner);
+        activity.runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                // Attempts to manipulate the UI must be performed on a UI thread.
+                // Calling this outside runOnUiThread() will cause an exception.
+                //
+                // You could also use @UiThreadTest, but activity lifecycle methods
+                // cannot be called if this annotation is used.
+                spinner1.requestFocus();
+                spinner1.setSelection(TEST_SPINNER_POSITION_1);
+            }
+        });
+        // END_INCLUDE (write_to_ui)
+
+        // BEGIN_INCLUDE (relaunch_activity)
+        // Close the activity
+        activity.finish();
+        setActivity(null);  // Required to force creation of a new activity
+
+        // Relaunch the activity
+        activity = this.getActivity();
+        // END_INCLUDE (relaunch_activity)
+
+        // BEGIN_INCLUDE (check_results)
+        // Verify that the spinner was saved at position 1
+        final Spinner spinner2 = (Spinner) activity.findViewById(R.id.spinner);
+        int currentPosition = spinner2.getSelectedItemPosition();
+        assertEquals(TEST_SPINNER_POSITION_1, currentPosition);
+        // END_INCLUDE (check_results)
+
+        // Since this is a stateful test, we need to make sure that the activity isn't simply
+        // echoing a previously-stored value that (coincidently) matches position 1
+        final int TEST_SPINNER_POSITION_2 = MainActivity.WEATHER_SNOW;
+
+        // Set spinner to test position 2
+        activity.runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                spinner2.requestFocus();
+                spinner2.setSelection(TEST_SPINNER_POSITION_2);
+            }
+        });
+
+        // Close the activity
+        activity.finish();
+        setActivity(null);
+
+        // Relaunch the activity
+        activity = this.getActivity();
+
+        // Verify that the spinner was saved at position 2
+        final Spinner spinner3 = (Spinner) activity.findViewById(R.id.spinner);
+        currentPosition = spinner3.getSelectedItemPosition();
+        assertEquals(TEST_SPINNER_POSITION_2, currentPosition);
+    }
+}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/build.gradle b/ui/accessibility/BasicAccessibility/BasicAccessibility/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..3c0e66a
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.ui.accessibility.BasicAccessibility"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="11"
+        android:targetSdkVersion="16" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/ic_launcher-web.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/ic_launcher-web.png
new file mode 100644
index 0000000..6967d3e
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/ic_launcher-web.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/DialView.java b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/DialView.java
new file mode 100644
index 0000000..1fc5e0c
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/DialView.java
@@ -0,0 +1,237 @@
+/*
+ * Copyright (C) 2013 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.ui.accessibility.BasicAccessibility;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.accessibility.AccessibilityEvent;
+
+/**
+ * Custom view to demonstrate accessibility.
+ *
+ * <p>This view does not use any framework widgets, so does not get any accessibility features
+ * automatically. Instead, we use {@link AccessibilityEvent} to provide accessibility hints to
+ * the OS.
+ *
+ * <p>For example, if TalkBack is enabled, users will be able to receive spoken feedback as they
+ * interact with this view.
+ *
+ * <p>More generally, this view renders a multi-position "dial" that can be used to select a value
+ * between 1 and 4. Each time the dial is clicked, the next position will be selected (modulo
+ * the maximum number of positions).
+ */
+public class DialView extends View {
+    private static int SELECTION_COUNT = 4;
+
+    private static float FONT_SIZE = 40f;
+    private float mWidth;
+    private float mHeight;
+    private float mWidthPadded;
+    private float mHeightPadded;
+    private Paint mTextPaint;
+    private Paint mDialPaint;
+    private float mRadius;
+    private int mActiveSelection;
+
+    /**
+     * Constructor that is called when inflating a view from XML. This is called
+     * when a view is being constructed from an XML file, supplying attributes
+     * that were specified in the XML file.
+     *
+     * <p>In our case, this constructor just calls init().
+     *
+     * @param context The Context the view is running in, through which it can
+     *                access the current theme, resources, etc.
+     * @param attrs   The attributes of the XML tag that is inflating the view.
+     * @see #View(android.content.Context, android.util.AttributeSet, int)
+     */
+    public DialView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init();
+    }
+
+    /**
+     * Helper method to initialize instance variables. Called by constructor.
+     */
+    private void init() {
+        // Paint styles used for rendering are created here, rather than at render-time. This
+        // is a performance optimization, since onDraw() will get called frequently.
+        mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+        mTextPaint.setColor(Color.BLACK);
+        mTextPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+        mTextPaint.setTextAlign(Paint.Align.CENTER);
+        mTextPaint.setTextSize(FONT_SIZE);
+
+        mDialPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
+        mDialPaint.setColor(Color.GRAY);
+
+        // Initialize current selection. This will store where the dial's "indicator" is pointing.
+        mActiveSelection = 0;
+
+        // Setup onClick listener for this view. Rotates between each of the different selection
+        // states on each click.
+        //
+        // Notice that we call sendAccessibilityEvent here. Some AccessibilityEvents are generated
+        // by the system. However, custom views will typically need to send events manually as the
+        // user interacts with the view. The type of event sent will vary, depending on the nature
+        // of the view and how the user interacts with it.
+        //
+        // In this case, we are sending TYPE_VIEW_SELECTED rather than TYPE_VIEW_CLICKED, because
+        // clicking on this view selects a new value.
+        //
+        // We will give our AccessibilityEvent further information about the state of the view in
+        // onPopulateAccessibilityEvent(), which will be called automatically by the system
+        // for each AccessibilityEvent.
+        setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                // Rotate selection to the next valid choice.
+                mActiveSelection = (mActiveSelection + 1) % SELECTION_COUNT;
+                // Send an AccessibilityEvent, since the user has interacted with the view.
+                sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
+                // Redraw the entire view. (Inefficient, but this is sufficient for demonstration
+                // purposes.)
+                invalidate();
+            }
+        });
+    }
+
+    /**
+     * This is where a View should populate outgoing accessibility events with its text content.
+     * While this method is free to modify event attributes other than text content, doing so
+     * should normally be performed in
+     * {@link #onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)}.
+     * <p/>
+     * <p>Note that the behavior of this method will typically vary, depending on the type of
+     * accessibility event is passed into it. The allowed values also very, and are documented
+     * in {@link android.view.accessibility.AccessibilityEvent}.
+     * <p/>
+     * <p>Typically, this is where you'll describe the state of your custom view. You may also
+     * want to provide custom directions when the user has focused your view.
+     *
+     * @param event The accessibility event which to populate.
+     */
+    // BEGIN_INCLUDE (on_populate_accessibility_event)
+    @Override
+    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
+    public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
+        super.onPopulateAccessibilityEvent(event);
+
+        // Detect what type of accessibility event is being passed in.
+        int eventType = event.getEventType();
+
+        // Common case: The user has interacted with our view in some way. State may or may not
+        // have been changed. Read out the current status of the view.
+        //
+        // We also set some other metadata which is not used by TalkBack, but could be used by
+        // other TTS engines.
+        if (eventType == AccessibilityEvent.TYPE_VIEW_SELECTED ||
+                eventType == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
+            event.getText().add("Mode selected: " + Integer.toString(mActiveSelection + 1) + ".");
+            event.setItemCount(SELECTION_COUNT);
+            event.setCurrentItemIndex(mActiveSelection);
+        }
+
+        // When a user first focuses on our view, we'll also read out some simple instructions to
+        // make it clear that this is an interactive element.
+        if (eventType == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
+            event.getText().add("Tap to change.");
+        }
+    }
+    // END_INCLUDE (on_populate_accessibility_event)
+
+    /**
+     * This is called during layout when the size of this view has changed. If
+     * you were just added to the view hierarchy, you're called with the old
+     * values of 0.
+     *
+     * <p>This is where we determine the drawing bounds for our custom view.
+     *
+     * @param w    Current width of this view.
+     * @param h    Current height of this view.
+     * @param oldw Old width of this view.
+     * @param oldh Old height of this view.
+     */
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        // Account for padding
+        float xPadding = (float) (getPaddingLeft() + getPaddingRight());
+        float yPadding = (float) (getPaddingTop() + getPaddingBottom());
+
+        // Compute available width/height
+        mWidth = w;
+        mHeight = h;
+        mWidthPadded = w - xPadding;
+        mHeightPadded = h - yPadding;
+        mRadius = (float) (Math.min(mWidth, mHeight) / 2 * 0.8);
+    }
+
+    /**
+     * Render view content.
+     *
+     * <p>We render an outer grey circle to serve as our "dial", and then render a smaller black
+     * circle to server as our indicator. The position for the indicator is determined based
+     * on mActiveSelection.
+     *
+     * @param canvas the canvas on which the background will be drawn
+     */
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+        // Draw dial
+        canvas.drawCircle(mWidth / 2, mHeight / 2, (float) mRadius, mDialPaint);
+
+        // Draw text labels
+        final float labelRadius = mRadius + 10;
+        for (int i = 0; i < SELECTION_COUNT; i++) {
+            float[] xyData = computeXYForPosition(i, labelRadius);
+            float x = xyData[0];
+            float y = xyData[1];
+            canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint);
+        }
+
+        // Draw indicator mark
+        final float markerRadius = mRadius - 35;
+        float[] xyData = computeXYForPosition(mActiveSelection, markerRadius);
+        float x = xyData[0];
+        float y = xyData[1];
+        canvas.drawCircle(x, y, 20, mTextPaint);
+    }
+
+    /**
+     * Compute the X/Y-coordinates for a label or indicator, given the position number and radius
+     * where the label should be drawn.
+     *
+     * @param pos    Zero based position index
+     * @param radius Radius where label/indicator is to be drawn.
+     * @return 2-element array. Element 0 is X-coordinate, element 1 is Y-coordinate.
+     */
+    private float[] computeXYForPosition(final int pos, final float radius) {
+        float[] result = new float[2];
+        Double startAngle = Math.PI * (9 / 8d);   // Angles are in radiansq
+        Double angle = startAngle + (pos * (Math.PI / 4));
+        result[0] = (float) (radius * Math.cos(angle)) + (mWidth / 2);
+        result[1] = (float) (radius * Math.sin(angle)) + (mHeight / 2);
+        return result;
+    }
+}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/MainActivity.java b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/MainActivity.java
new file mode 100644
index 0000000..869301d
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/MainActivity.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2013 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.ui.accessibility.BasicAccessibility;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+/**
+ * Basic activity class.
+ *
+ * <p>Responsible for rendering layout, and displaying some toasts to give buttons feedback.
+ * There's nothing terribly interesting in this class. All the interesting stuff is in
+ * res/layout/activity_main.xml and {@link DialView}.
+ */
+public class MainActivity extends Activity {
+
+    /**
+     * Standard onCreate() implementation. Sets R.layout.activity_main as the layout.
+     */
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+    }
+}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_discard.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_discard.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_discard.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_discard.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_info.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_info.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_info.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_info.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/partly_cloudy.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/partly_cloudy.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/partly_cloudy.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/partly_cloudy.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_discard.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_discard.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_discard.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_discard.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_info.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_info.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_info.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_info.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_discard.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_discard.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_discard.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_discard.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_info.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_info.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_info.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_info.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/layout/activity_main.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..394c72f
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/layout/activity_main.xml
@@ -0,0 +1,206 @@
+<!--
+Copyright (C) 2013 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              xmlns:tools="http://schemas.android.com/tools"
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:gravity="center_horizontal">
+    <ScrollView
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:fillViewport="false">
+        <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:paddingLeft="@dimen/activity_horizontal_margin"
+                android:paddingRight="@dimen/activity_horizontal_margin"
+                android:paddingTop="@dimen/activity_vertical_margin"
+                android:paddingBottom="@dimen/activity_vertical_margin"
+                tools:context=".MainActivity"
+                >
+
+            <!-- Notice the presence of nextFocusDown/nextFocusUp on the elements below. You can
+            also use nextFocusLeft/nextFocusRight. This tells the system in what order elements
+            should be navigated through. If not present, the system will make a guess based on
+            element location in the layout. -->
+            <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="Buttons"
+                    android:id="@+id/buttonsLabel"
+                    android:layout_alignParentTop="true"
+                    android:layout_alignParentLeft="true"
+                    android:nextFocusDown="@+id/composeButton"/>
+
+            <!-- This is a regular, text-based button. No contentDescription is needed, since the
+                 text field sufficiently describes the action performed. -->
+            <Button
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/composeButtonLabel"
+                    android:id="@+id/composeButton"
+                    android:layout_below="@+id/buttonsLabel"
+                    android:layout_alignLeft="@+id/buttonsLabel"
+                    android:nextFocusUp="@+id/buttonsLabel"
+                    android:nextFocusDown="@+id/checkboxesLabel"
+                    />
+
+            <!-- The next two buttons are different types of image-based buttons. -->
+
+            <!-- BEGIN_INCLUDE (image_content_description) -->
+            <!-- Adding a contentDescription is needed for accessibility, since no text is present.
+            Since the contentDescription is read verbatim, you may want to be a bit more
+            descriptive than usual, such as adding "button" to the end of your description, if
+            appropriate. -->
+            <ImageButton
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/discardButton"
+                    android:layout_alignTop="@+id/composeButton"
+                    android:layout_toRightOf="@+id/composeButton"
+                    android:src="@drawable/ic_action_discard"
+                    android:layout_alignBottom="@+id/composeButton"
+                    android:contentDescription="@string/discardButtonDescription"
+                    android:scaleType="fitCenter"
+                    android:nextFocusUp="@+id/buttonsLabel"
+                    android:nextFocusDown="@+id/checkboxesLabel"
+                    />
+            <!-- END_INCLUDE (image_content_description) -->
+
+            <ImageButton
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/infoButton"
+                    android:layout_alignTop="@+id/discardButton"
+                    android:layout_toRightOf="@+id/discardButton"
+                    android:src="@drawable/ic_action_info"
+                    android:layout_alignBottom="@+id/discardButton"
+                    android:layout_alignRight="@+id/hyperspaceCheckbox"
+                    android:scaleType="fitCenter"
+                    android:background="?android:selectableItemBackground"
+                    android:padding="5dp"
+                    android:contentDescription="@string/infoButtonDescription"
+                    android:nextFocusUp="@+id/buttonsLabel"
+                    android:nextFocusDown="@+id/checkboxesLabel"
+            />
+
+            <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/checkboxesLabel"
+                    android:id="@+id/checkboxesLabel"
+                    android:layout_below="@+id/composeButton"
+                    android:layout_alignLeft="@+id/composeButton"
+                    android:nextFocusUp="@+id/composeButton"
+                    android:nextFocusDown="@+id/jetpackCheckbox"
+                    />
+
+            <!-- Like a text-based button, checkboxes with text will often work correctly as-is.
+                 If your checkboxes do not have a text attribute, you will need to add a
+                 contentDescriptoin. -->
+            <CheckBox
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/jetpackCheckboxLabel"
+                    android:id="@+id/jetpackCheckbox"
+                    android:layout_below="@+id/checkboxesLabel"
+                    android:layout_alignLeft="@+id/checkboxesLabel"
+                    android:checked="false"
+                    android:nextFocusUp="@+id/checkboxesLabel"
+                    android:nextFocusDown="@+id/hyperspaceCheckbox"
+                    />
+
+            <CheckBox
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/hyperspaceCheckboxLabel"
+                    android:id="@+id/hyperspaceCheckbox"
+                    android:layout_below="@+id/jetpackCheckbox"
+                    android:layout_alignLeft="@+id/jetpackCheckbox"
+                    android:checked="false"
+                    android:nextFocusUp="@+id/jetpackCheckbox"
+                    android:nextFocusDown="@+id/imagesAndTextLabel"
+                    />
+
+            <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/imagesAndTextLabel"
+                    android:id="@+id/imagesAndTextLabel"
+                    android:layout_below="@+id/hyperspaceCheckbox"
+                    android:layout_alignLeft="@+id/hyperspaceCheckbox"
+                    android:nextFocusUp="@+id/hyperspaceCheckbox"
+                    android:nextFocusDown="@+id/partlyCloudImage"
+                    />
+
+            <!-- Images should have a contentDescription if they convey any meaningful
+                 information. Images that are purely decorative may not need a contentDescription,
+                 however. -->
+            <ImageView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:id="@+id/partlyCloudyImage"
+                    android:layout_below="@+id/imagesAndTextLabel"
+                    android:layout_alignLeft="@+id/imagesAndTextLabel"
+                    android:src="@drawable/partly_cloudy"
+                    android:contentDescription="@string/partlyCloudyDescription"
+                    android:layout_alignRight="@+id/discardButton"
+                    android:nextFocusUp="@+id/imagesAndTextLabel"
+                    android:nextFocusDown="@+id/customViewLabel"
+                    />
+
+            <!-- TextViews are typically self describing, so do not need extra modifications. -->
+            <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textAppearance="?android:attr/textAppearanceLarge"
+                    android:text="@string/temperature"
+                    android:textSize="60sp"
+                    android:id="@+id/temperatureText"
+                    android:layout_alignTop="@+id/partlyCloudyImage"
+                    android:layout_toRightOf="@+id/partlyCloudyImage"
+                    android:layout_alignBottom="@+id/partlyCloudyImage"
+                    android:gravity="center_vertical"
+                    android:nextFocusUp="@+id/imagesAndTextLabel"
+                    android:nextFocusDown="@+id/customViewLabel"
+                    />
+
+            <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/customViewLabel"
+                    android:id="@+id/customViewLabel"
+                    android:layout_below="@+id/partlyCloudyImage"
+                    android:layout_alignLeft="@+id/partlyCloudyImage"
+                    android:nextFocusUp="@+id/partlyCloudImage"
+                    android:nextFocusDown="@+id/dialView"
+                    />
+
+            <!-- Custom views require additonal code changes. See DialView.java for more
+                 details. -->
+            <com.example.android.ui.accessibility.BasicAccessibility.DialView
+                    android:layout_width="200dp"
+                    android:layout_height="200dp"
+                    android:id="@+id/dialView"
+                    android:layout_below="@+id/customViewLabel"
+                    android:layout_alignLeft="@+id/partlyCloudyImage"
+                    android:nextFocusUp="@+id/customViewLabel"
+                    />
+
+        </RelativeLayout>
+    </ScrollView>
+</LinearLayout>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw600dp/dimens.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..d0946b3
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,20 @@
+<!--
+Copyright (C) 2013 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.
+-->
+
+<resources>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values-sw720dp-land/dimens.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v11/styles.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..5b1a3f2
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v11/styles.xml
@@ -0,0 +1,27 @@
+<!--
+Copyright (C) 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v14/styles.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..b16c97b
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v14/styles.xml
@@ -0,0 +1,28 @@
+<!--
+Copyright (C) 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/dimens.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/dimens.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/dimens.xml
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/strings.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/strings.xml
new file mode 100644
index 0000000..57b8e49
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/strings.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (C) 2013 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.
+-->
+
+<resources>
+
+    <string name="app_name" >Accessibility Sample</string>
+    <string name="composeButtonPressed">(Compose button pressed.)</string>
+    <string name="discardButtonPressed">(Discard button pressed.)</string>
+    <string name="infoButtonPressed">(Info button pressed.)</string>
+    <string name="composeButtonLabel">Compose</string>
+    <string name="discardButtonDescription">Discard Button</string>
+    <string name="infoButtonDescription">Info Button</string>
+    <string name="partlyCloudyDescription">Partly Cloudy</string>
+    <string name="checkboxesLabel">Checkboxes</string>
+    <string name="jetpackCheckboxLabel">Enable Jetpack</string>
+    <string name="hyperspaceCheckboxLabel">Enable Hyperspace Engines</string>
+    <string name="imagesAndTextLabel">Images &amp; Text</string>
+    <string name="temperature">53 °F</string>
+    <string name="customViewLabel">Custom View</string>
+</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/styles.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/styles.xml
new file mode 100644
index 0000000..b0e6075
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/styles.xml
@@ -0,0 +1,36 @@
+<!--
+Copyright (C) 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/.gitignore b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/proguard-project.txt b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/AndroidManifest.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/AndroidManifest.xml
deleted file mode 100644
index d61d789..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicaccessibility"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/DialView.java b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/DialView.java
deleted file mode 100644
index efdb449..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/DialView.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (C) 2013 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.basicaccessibility;
-
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.os.Build;
-import android.util.AttributeSet;
-import android.view.View;
-import android.view.accessibility.AccessibilityEvent;
-
-/**
- * Custom view to demonstrate accessibility.
- *
- * <p>This view does not use any framework widgets, so does not get any accessibility features
- * automatically. Instead, we use {@link android.view.accessibility.AccessibilityEvent} to provide accessibility hints to
- * the OS.
- *
- * <p>For example, if TalkBack is enabled, users will be able to receive spoken feedback as they
- * interact with this view.
- *
- * <p>More generally, this view renders a multi-position "dial" that can be used to select a value
- * between 1 and 4. Each time the dial is clicked, the next position will be selected (modulo
- * the maximum number of positions).
- */
-public class DialView extends View {
-    private static int SELECTION_COUNT = 4;
-
-    private static float FONT_SIZE = 40f;
-    private float mWidth;
-    private float mHeight;
-    private float mWidthPadded;
-    private float mHeightPadded;
-    private Paint mTextPaint;
-    private Paint mDialPaint;
-    private float mRadius;
-    private int mActiveSelection;
-
-    /**
-     * Constructor that is called when inflating a view from XML. This is called
-     * when a view is being constructed from an XML file, supplying attributes
-     * that were specified in the XML file.
-     *
-     * <p>In our case, this constructor just calls init().
-     *
-     * @param context The Context the view is running in, through which it can
-     *                access the current theme, resources, etc.
-     * @param attrs   The attributes of the XML tag that is inflating the view.
-     * @see #View(android.content.Context, android.util.AttributeSet, int)
-     */
-    public DialView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        init();
-    }
-
-    /**
-     * Helper method to initialize instance variables. Called by constructor.
-     */
-    private void init() {
-        // Paint styles used for rendering are created here, rather than at render-time. This
-        // is a performance optimization, since onDraw() will get called frequently.
-        mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
-        mTextPaint.setColor(Color.BLACK);
-        mTextPaint.setStyle(Paint.Style.FILL_AND_STROKE);
-        mTextPaint.setTextAlign(Paint.Align.CENTER);
-        mTextPaint.setTextSize(FONT_SIZE);
-
-        mDialPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
-        mDialPaint.setColor(Color.GRAY);
-
-        // Initialize current selection. This will store where the dial's "indicator" is pointing.
-        mActiveSelection = 0;
-
-        // Setup onClick listener for this view. Rotates between each of the different selection
-        // states on each click.
-        //
-        // Notice that we call sendAccessibilityEvent here. Some AccessibilityEvents are generated
-        // by the system. However, custom views will typically need to send events manually as the
-        // user interacts with the view. The type of event sent will vary, depending on the nature
-        // of the view and how the user interacts with it.
-        //
-        // In this case, we are sending TYPE_VIEW_SELECTED rather than TYPE_VIEW_CLICKED, because
-        // clicking on this view selects a new value.
-        //
-        // We will give our AccessibilityEvent further information about the state of the view in
-        // onPopulateAccessibilityEvent(), which will be called automatically by the system
-        // for each AccessibilityEvent.
-        setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                // Rotate selection to the next valid choice.
-                mActiveSelection = (mActiveSelection + 1) % SELECTION_COUNT;
-                // Send an AccessibilityEvent, since the user has interacted with the view.
-                sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SELECTED);
-                // Redraw the entire view. (Inefficient, but this is sufficient for demonstration
-                // purposes.)
-                invalidate();
-            }
-        });
-    }
-
-    /**
-     * This is where a View should populate outgoing accessibility events with its text content.
-     * While this method is free to modify event attributes other than text content, doing so
-     * should normally be performed in
-     * {@link #onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)}.
-     * <p/>
-     * <p>Note that the behavior of this method will typically vary, depending on the type of
-     * accessibility event is passed into it. The allowed values also very, and are documented
-     * in {@link android.view.accessibility.AccessibilityEvent}.
-     * <p/>
-     * <p>Typically, this is where you'll describe the state of your custom view. You may also
-     * want to provide custom directions when the user has focused your view.
-     *
-     * @param event The accessibility event which to populate.
-     */
-    // BEGIN_INCLUDE (on_populate_accessibility_event)
-    @Override
-    @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
-    public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
-        super.onPopulateAccessibilityEvent(event);
-
-        // Detect what type of accessibility event is being passed in.
-        int eventType = event.getEventType();
-
-        // Common case: The user has interacted with our view in some way. State may or may not
-        // have been changed. Read out the current status of the view.
-        //
-        // We also set some other metadata which is not used by TalkBack, but could be used by
-        // other TTS engines.
-        if (eventType == AccessibilityEvent.TYPE_VIEW_SELECTED ||
-                eventType == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
-            event.getText().add("Mode selected: " + Integer.toString(mActiveSelection + 1) + ".");
-            event.setItemCount(SELECTION_COUNT);
-            event.setCurrentItemIndex(mActiveSelection);
-        }
-
-        // When a user first focuses on our view, we'll also read out some simple instructions to
-        // make it clear that this is an interactive element.
-        if (eventType == AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED) {
-            event.getText().add("Tap to change.");
-        }
-    }
-    // END_INCLUDE (on_populate_accessibility_event)
-
-    /**
-     * This is called during layout when the size of this view has changed. If
-     * you were just added to the view hierarchy, you're called with the old
-     * values of 0.
-     *
-     * <p>This is where we determine the drawing bounds for our custom view.
-     *
-     * @param w    Current width of this view.
-     * @param h    Current height of this view.
-     * @param oldw Old width of this view.
-     * @param oldh Old height of this view.
-     */
-    @Override
-    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
-        // Account for padding
-        float xPadding = (float) (getPaddingLeft() + getPaddingRight());
-        float yPadding = (float) (getPaddingTop() + getPaddingBottom());
-
-        // Compute available width/height
-        mWidth = w;
-        mHeight = h;
-        mWidthPadded = w - xPadding;
-        mHeightPadded = h - yPadding;
-        mRadius = (float) (Math.min(mWidth, mHeight) / 2 * 0.8);
-    }
-
-    /**
-     * Render view content.
-     *
-     * <p>We render an outer grey circle to serve as our "dial", and then render a smaller black
-     * circle to server as our indicator. The position for the indicator is determined based
-     * on mActiveSelection.
-     *
-     * @param canvas the canvas on which the background will be drawn
-     */
-    @Override
-    protected void onDraw(Canvas canvas) {
-        super.onDraw(canvas);
-        // Draw dial
-        canvas.drawCircle(mWidth / 2, mHeight / 2, (float) mRadius, mDialPaint);
-
-        // Draw text labels
-        final float labelRadius = mRadius + 10;
-        for (int i = 0; i < SELECTION_COUNT; i++) {
-            float[] xyData = computeXYForPosition(i, labelRadius);
-            float x = xyData[0];
-            float y = xyData[1];
-            canvas.drawText(Integer.toString(i + 1), x, y, mTextPaint);
-        }
-
-        // Draw indicator mark
-        final float markerRadius = mRadius - 35;
-        float[] xyData = computeXYForPosition(mActiveSelection, markerRadius);
-        float x = xyData[0];
-        float y = xyData[1];
-        canvas.drawCircle(x, y, 20, mTextPaint);
-    }
-
-    /**
-     * Compute the X/Y-coordinates for a label or indicator, given the position number and radius
-     * where the label should be drawn.
-     *
-     * @param pos    Zero based position index
-     * @param radius Radius where label/indicator is to be drawn.
-     * @return 2-element array. Element 0 is X-coordinate, element 1 is Y-coordinate.
-     */
-    private float[] computeXYForPosition(final int pos, final float radius) {
-        float[] result = new float[2];
-        Double startAngle = Math.PI * (9 / 8d);   // Angles are in radiansq
-        Double angle = startAngle + (pos * (Math.PI / 4));
-        result[0] = (float) (radius * Math.cos(angle)) + (mWidth / 2);
-        result[1] = (float) (radius * Math.sin(angle)) + (mHeight / 2);
-        return result;
-    }
-}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/MainActivity.java b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/MainActivity.java
deleted file mode 100644
index 2777ad7..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/MainActivity.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2013 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.basicaccessibility;
-
-import android.app.Activity;
-import android.os.Bundle;
-
-/**
- * Basic activity class.
- *
- * <p>Responsible for rendering layout, and displaying some toasts to give buttons feedback.
- * There's nothing terribly interesting in this class. All the interesting stuff is in
- * res/layout/activity_main.xml and {@link DialView}.
- */
-public class MainActivity extends Activity {
-
-    /**
-     * Standard onCreate() implementation. Sets R.layout.activity_main as the layout.
-     */
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-    }
-}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/layout/sample_main.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/layout/sample_main.xml
deleted file mode 100644
index 64f4f38..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/layout/sample_main.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-<!--
-Copyright (C) 2013 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              xmlns:tools="http://schemas.android.com/tools"
-              android:layout_width="match_parent"
-              android:layout_height="match_parent"
-              android:gravity="center_horizontal">
-    <ScrollView
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:fillViewport="false">
-        <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:paddingLeft="@dimen/activity_horizontal_margin"
-                android:paddingRight="@dimen/activity_horizontal_margin"
-                android:paddingTop="@dimen/activity_vertical_margin"
-                android:paddingBottom="@dimen/activity_vertical_margin"
-                tools:context=".MainActivity"
-                >
-
-            <!-- Notice the presence of nextFocusDown/nextFocusUp on the elements below. You can
-            also use nextFocusLeft/nextFocusRight. This tells the system in what order elements
-            should be navigated through. If not present, the system will make a guess based on
-            element location in the layout. -->
-            <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="Buttons"
-                    android:id="@+id/buttonsLabel"
-                    android:layout_alignParentTop="true"
-                    android:layout_alignParentLeft="true"
-                    android:nextFocusDown="@+id/composeButton"/>
-
-            <!-- This is a regular, text-based button. No contentDescription is needed, since the
-                 text field sufficiently describes the action performed. -->
-            <Button
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/composeButtonLabel"
-                    android:id="@+id/composeButton"
-                    android:layout_below="@+id/buttonsLabel"
-                    android:layout_alignLeft="@+id/buttonsLabel"
-                    android:nextFocusUp="@+id/buttonsLabel"
-                    android:nextFocusDown="@+id/checkboxesLabel"
-                    />
-
-            <!-- The next two buttons are different types of image-based buttons. -->
-
-            <!-- BEGIN_INCLUDE (image_content_description) -->
-            <!-- Adding a contentDescription is needed for accessibility, since no text is present.
-            Since the contentDescription is read verbatim, you may want to be a bit more
-            descriptive than usual, such as adding "button" to the end of your description, if
-            appropriate. -->
-            <ImageButton
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/discardButton"
-                    android:layout_alignTop="@+id/composeButton"
-                    android:layout_toRightOf="@+id/composeButton"
-                    android:src="@drawable/ic_action_discard"
-                    android:layout_alignBottom="@+id/composeButton"
-                    android:contentDescription="@string/discardButtonDescription"
-                    android:scaleType="fitCenter"
-                    android:nextFocusUp="@+id/buttonsLabel"
-                    android:nextFocusDown="@+id/checkboxesLabel"
-                    />
-            <!-- END_INCLUDE (image_content_description) -->
-
-            <ImageButton
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/infoButton"
-                    android:layout_alignTop="@+id/discardButton"
-                    android:layout_toRightOf="@+id/discardButton"
-                    android:src="@drawable/ic_action_info"
-                    android:layout_alignBottom="@+id/discardButton"
-                    android:layout_alignRight="@+id/hyperspaceCheckbox"
-                    android:scaleType="fitCenter"
-                    android:background="?android:selectableItemBackground"
-                    android:padding="5dp"
-                    android:contentDescription="@string/infoButtonDescription"
-                    android:nextFocusUp="@+id/buttonsLabel"
-                    android:nextFocusDown="@+id/checkboxesLabel"
-            />
-
-            <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/checkboxesLabel"
-                    android:id="@+id/checkboxesLabel"
-                    android:layout_below="@+id/composeButton"
-                    android:layout_alignLeft="@+id/composeButton"
-                    android:nextFocusUp="@+id/composeButton"
-                    android:nextFocusDown="@+id/jetpackCheckbox"
-                    />
-
-            <!-- Like a text-based button, checkboxes with text will often work correctly as-is.
-                 If your checkboxes do not have a text attribute, you will need to add a
-                 contentDescriptoin. -->
-            <CheckBox
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/jetpackCheckboxLabel"
-                    android:id="@+id/jetpackCheckbox"
-                    android:layout_below="@+id/checkboxesLabel"
-                    android:layout_alignLeft="@+id/checkboxesLabel"
-                    android:checked="false"
-                    android:nextFocusUp="@+id/checkboxesLabel"
-                    android:nextFocusDown="@+id/hyperspaceCheckbox"
-                    />
-
-            <CheckBox
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/hyperspaceCheckboxLabel"
-                    android:id="@+id/hyperspaceCheckbox"
-                    android:layout_below="@+id/jetpackCheckbox"
-                    android:layout_alignLeft="@+id/jetpackCheckbox"
-                    android:checked="false"
-                    android:nextFocusUp="@+id/jetpackCheckbox"
-                    android:nextFocusDown="@+id/imagesAndTextLabel"
-                    />
-
-            <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/imagesAndTextLabel"
-                    android:id="@+id/imagesAndTextLabel"
-                    android:layout_below="@+id/hyperspaceCheckbox"
-                    android:layout_alignLeft="@+id/hyperspaceCheckbox"
-                    android:nextFocusUp="@+id/hyperspaceCheckbox"
-                    android:nextFocusDown="@+id/partlyCloudImage"
-                    />
-
-            <!-- Images should have a contentDescription if they convey any meaningful
-                 information. Images that are purely decorative may not need a contentDescription,
-                 however. -->
-            <ImageView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:id="@+id/partlyCloudyImage"
-                    android:layout_below="@+id/imagesAndTextLabel"
-                    android:layout_alignLeft="@+id/imagesAndTextLabel"
-                    android:src="@drawable/partly_cloudy"
-                    android:contentDescription="@string/partlyCloudyDescription"
-                    android:layout_alignRight="@+id/discardButton"
-                    android:nextFocusUp="@+id/imagesAndTextLabel"
-                    android:nextFocusDown="@+id/customViewLabel"
-                    />
-
-            <!-- TextViews are typically self describing, so do not need extra modifications. -->
-            <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textAppearance="?android:attr/textAppearanceLarge"
-                    android:text="@string/temperature"
-                    android:textSize="60sp"
-                    android:id="@+id/temperatureText"
-                    android:layout_alignTop="@+id/partlyCloudyImage"
-                    android:layout_toRightOf="@+id/partlyCloudyImage"
-                    android:layout_alignBottom="@+id/partlyCloudyImage"
-                    android:gravity="center_vertical"
-                    android:nextFocusUp="@+id/imagesAndTextLabel"
-                    android:nextFocusDown="@+id/customViewLabel"
-                    />
-
-            <TextView
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/customViewLabel"
-                    android:id="@+id/customViewLabel"
-                    android:layout_below="@+id/partlyCloudyImage"
-                    android:layout_alignLeft="@+id/partlyCloudyImage"
-                    android:nextFocusUp="@+id/partlyCloudImage"
-                    android:nextFocusDown="@+id/dialView"
-                    />
-
-            <!-- Custom views require additonal code changes. See DialView.java for more
-                 details. -->
-            <com.example.android.basicaccessibility.DialView
-                    android:layout_width="200dp"
-                    android:layout_height="200dp"
-                    android:id="@+id/dialView"
-                    android:layout_below="@+id/customViewLabel"
-                    android:layout_alignLeft="@+id/partlyCloudyImage"
-                    android:nextFocusUp="@+id/customViewLabel"
-                    />
-
-        </RelativeLayout>
-    </ScrollView>
-</LinearLayout>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/strings.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/strings.xml
deleted file mode 100644
index 8340682..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright (C) 2013 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.
--->
-
-<resources>
-    <string name="composeButtonPressed">(Compose button pressed.)</string>
-    <string name="discardButtonPressed">(Discard button pressed.)</string>
-    <string name="infoButtonPressed">(Info button pressed.)</string>
-    <string name="composeButtonLabel">Compose</string>
-    <string name="discardButtonDescription">Discard Button</string>
-    <string name="infoButtonDescription">Info Button</string>
-    <string name="partlyCloudyDescription">Partly Cloudy</string>
-    <string name="checkboxesLabel">Checkboxes</string>
-    <string name="jetpackCheckboxLabel">Enable Jetpack</string>
-    <string name="hyperspaceCheckboxLabel">Enable Hyperspace Engines</string>
-    <string name="imagesAndTextLabel">Images &amp; Text</string>
-    <string name="temperature">53 °F</string>
-    <string name="customViewLabel">Custom View</string>
-</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/AndroidManifest.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/AndroidManifest.xml
deleted file mode 100644
index 8dc47be..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicaccessibility.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicaccessibility"
-            android:label="Tests for com.example.android.basicaccessibility" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/src/com/example/android/basicaccessibility/tests/SampleTests.java b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/src/com/example/android/basicaccessibility/tests/SampleTests.java
deleted file mode 100644
index 0c9a152..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/src/com/example/android/basicaccessibility/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicaccessibility.tests;
-
-import com.example.android.basicaccessibility.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicAccessibility sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicAccessibilityFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicAccessibilityFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/accessibility/BasicAccessibility/README.txt b/ui/accessibility/BasicAccessibility/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/accessibility/BasicAccessibility/build.gradle b/ui/accessibility/BasicAccessibility/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/accessibility/BasicAccessibility/build.gradle
+++ b/ui/accessibility/BasicAccessibility/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/accessibility/BasicAccessibility/buildSrc/build.gradle b/ui/accessibility/BasicAccessibility/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/accessibility/BasicAccessibility/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties b/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..055ba6f 100644
--- a/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties
@@ -1,4 +1,5 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/ui/accessibility/BasicAccessibility/settings.gradle b/ui/accessibility/BasicAccessibility/settings.gradle
index 7900b3d..1c4fa86 100644
--- a/ui/accessibility/BasicAccessibility/settings.gradle
+++ b/ui/accessibility/BasicAccessibility/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicAccessibilitySample'
+include ':BasicAccessibility'
diff --git a/ui/accessibility/BasicAccessibility/template-params.xml b/ui/accessibility/BasicAccessibility/template-params.xml
deleted file mode 100644
index af9d815..0000000
--- a/ui/accessibility/BasicAccessibility/template-params.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicAccessibility</name>
-    <group>UI</group>
-    <package>com.example.android.basicaccessibility</package>
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>11</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates how to create an accessible application, using a mix of different widgets demonstrating different ways of adding accessibility markup to a UI.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/ui/actionbar/DoneBar/DoneBar/build.gradle b/ui/actionbar/DoneBar/DoneBar/build.gradle
new file mode 100644
index 0000000..945e1f5
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/AndroidManifest.xml b/ui/actionbar/DoneBar/DoneBar/src/main/AndroidManifest.xml
new file mode 100755
index 0000000..cce4d5e
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/AndroidManifest.xml
@@ -0,0 +1,45 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.donebar"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample"
+        android:allowBackup="true">
+
+        <activity android:name=".SampleDashboardActivity"
+            android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name=".DoneBarActivity"
+            android:parentActivityName=".MainActivity" />
+
+        <activity android:name=".DoneButtonActivity"
+            android:parentActivityName=".MainActivity" />
+
+    </application>
+
+</manifest>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/big_icon.png b/ui/actionbar/DoneBar/DoneBar/src/main/big_icon.png
new file mode 100644
index 0000000..78bb426
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/big_icon.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneBarActivity.java b/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneBarActivity.java
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneBarActivity.java
rename to ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneBarActivity.java
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneButtonActivity.java b/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneButtonActivity.java
new file mode 100755
index 0000000..303d1ed
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneButtonActivity.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2013 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.donebar;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+
+/**
+ * A sample activity demonstrating the "done button" alternative action bar presentation. For a more
+ * detailed description see {@link R.string.done_button_description}.
+ */
+public class DoneButtonActivity extends Activity {
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // BEGIN_INCLUDE (inflate_set_custom_view)
+        // Inflate a "Done" custom action bar view to serve as the "Up" affordance.
+        final LayoutInflater inflater = (LayoutInflater) getActionBar().getThemedContext()
+                .getSystemService(LAYOUT_INFLATER_SERVICE);
+        final View customActionBarView = inflater.inflate(
+                R.layout.actionbar_custom_view_done, null);
+        customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(
+                new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        // "Done"
+                        finish();
+                    }
+                });
+
+        // Show the custom action bar view and hide the normal Home icon and title.
+        final ActionBar actionBar = getActionBar();
+        actionBar.setDisplayOptions(
+                ActionBar.DISPLAY_SHOW_CUSTOM,
+                ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME
+                        | ActionBar.DISPLAY_SHOW_TITLE);
+        actionBar.setCustomView(customActionBarView);
+        // END_INCLUDE (inflate_set_custom_view)
+
+        setContentView(R.layout.activity_done_button);
+    }
+
+    // BEGIN_INCLUDE (handle_cancel)
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+        getMenuInflater().inflate(R.menu.cancel, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.cancel:
+                // "Cancel"
+                finish();
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+    // END_INCLUDE (handle_cancel)
+}
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/SampleDashboardActivity.java b/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/SampleDashboardActivity.java
new file mode 100755
index 0000000..e86e6fc
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/SampleDashboardActivity.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2013 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.donebar;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.GridView;
+import android.widget.TextView;
+
+/**
+ * A simple launcher activity offering access to the individual samples in this project.
+ */
+public class SampleDashboardActivity extends Activity implements AdapterView.OnItemClickListener {
+    /**
+     * The collection of samples that will be used to populate the 'dashboard' grid.
+     */
+    private Sample[] mSamples;
+
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_sample_dashboard);
+
+        // Prepare list of samples in this dashboard.
+        mSamples = new Sample[]{
+                new Sample(R.string.done_bar_title, R.string.done_bar_description,
+                        DoneBarActivity.class),
+                new Sample(R.string.done_button_title, R.string.done_button_description,
+                        DoneButtonActivity.class),
+        };
+
+        // Use the custom adapter in the GridView and hook up a click listener to handle
+        // selection of individual samples.
+        GridView gridView = (GridView) findViewById(android.R.id.list);
+        gridView.setAdapter(new SampleAdapter());
+        gridView.setOnItemClickListener(this);
+    }
+
+    @Override
+    public void onItemClick(AdapterView<?> container, View view, int position, long id) {
+        // A sample was selected in the dashboard; open it.
+        startActivity(mSamples[position].intent);
+    }
+
+    /**
+     * A custom array-based adapter, designed for use with a {@link GridView}.
+     */
+    private class SampleAdapter extends BaseAdapter {
+        @Override
+        public int getCount() {
+            return mSamples.length;
+        }
+
+        @Override
+        public Sample getItem(int position) {
+            return mSamples[position];
+        }
+
+        @Override
+        public long getItemId(int position) {
+            // The title string ID should be unique per sample, so use it as an ID.
+            return mSamples[position].titleResId;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup container) {
+            if (convertView == null) {
+                // If there was no re-usable view that can be simply repopulated, create
+                // a new root view for this grid item.
+                convertView = getLayoutInflater().inflate(
+                        R.layout.sample_dashboard_item, container, false);
+            }
+
+            // Populate the view's children with real data about this sample.
+            ((TextView) convertView.findViewById(android.R.id.text1)).setText(
+                    mSamples[position].titleResId);
+            ((TextView) convertView.findViewById(android.R.id.text2)).setText(
+                    mSamples[position].descriptionResId);
+            return convertView;
+        }
+    }
+
+    /**
+     * A simple class that stores information about a sample: a title, description, and
+     * the intent to call
+     * {@link android.content.Context#startActivity(android.content.Intent) startActivity}
+     * with in order to open the sample.
+     */
+    private class Sample {
+        int titleResId;
+        int descriptionResId;
+        Intent intent;
+
+        /**
+         * Instantiate a new sample object with a title, description, and intent.
+         */
+        private Sample(int titleResId, int descriptionResId, Intent intent) {
+            this.intent = intent;
+            this.titleResId = titleResId;
+            this.descriptionResId = descriptionResId;
+        }
+
+        /**
+         * Instantiate a new sample object with a title, description, and {@link Activity}
+         * subclass. An intent will automatically be created for the given activity.
+         */
+        private Sample(int titleResId, int descriptionResId,
+                Class<? extends Activity> activityClass) {
+            this(titleResId, descriptionResId,
+                    new Intent(SampleDashboardActivity.this, activityClass));
+        }
+    }
+}
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_cancel.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_cancel.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_done.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_done.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_done.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_cancel.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_cancel.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_done.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_done.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_done.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_cancel.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_cancel.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_done.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_done.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_done.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/sample_dashboard_item_background.9.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/sample_dashboard_item_background.9.png
new file mode 100644
index 0000000..1358628
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/sample_dashboard_item_background.9.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done.xml
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done.xml
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done_cancel.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done_cancel.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done_cancel.xml
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done_cancel.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_bar.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_bar.xml
new file mode 100755
index 0000000..cb8980f
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_bar.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout style="@style/Widget.SampleContentContainer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/done_bar_description" />
+
+    </LinearLayout>
+</ScrollView>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_button.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_button.xml
new file mode 100755
index 0000000..3e20455
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_button.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout style="@style/Widget.SampleContentContainer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/done_button_description" />
+
+    </LinearLayout>
+</ScrollView>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_sample_dashboard.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_sample_dashboard.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_sample_dashboard.xml
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_sample_dashboard.xml
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_cancel_button.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_cancel_button.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_cancel_button.xml
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_cancel_button.xml
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_done_button.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_done_button.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_done_button.xml
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_done_button.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/sample_dashboard_item.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/sample_dashboard_item.xml
new file mode 100644
index 0000000..38987ee
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/sample_dashboard_item.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="@style/Widget.SampleDashboard.Item"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <TextView android:id="@android:id/text1"
+        style="@style/Widget.SampleDashboard.Item.Title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+
+    <TextView android:id="@android:id/text2"
+        style="@style/Widget.SampleDashboard.Item.Description"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+</LinearLayout>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/menu/cancel.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/menu/cancel.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBarSample/src/main/res/menu/cancel.xml
rename to ui/actionbar/DoneBar/DoneBar/src/main/res/menu/cancel.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/dimens.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..22074a2
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,24 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Semantic definitions -->
+
+    <dimen name="horizontal_page_margin">@dimen/margin_huge</dimen>
+    <dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/styles.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..401e7aa
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/styles.xml
@@ -0,0 +1,24 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <style name="Widget.SampleMessage">
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
+    </style>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/dimens.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..39e710b
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/dimens.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_tiny">4dp</dimen>
+    <dimen name="margin_small">8dp</dimen>
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_large">32dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+    <!-- Semantic definitions -->
+
+    <dimen name="horizontal_page_margin">@dimen/margin_medium</dimen>
+    <dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/strings.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/strings.xml
new file mode 100755
index 0000000..b56d75a
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/strings.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Done Bar</string>
+
+    <!-- Sample UI messages -->
+    <string name="intro_message">This sample demonstrates two alternative presentations of the action bar that are well-suited for <b>simple data entry scenarios</b>.</string>
+
+    <string name="done_bar_title">Done bar</string>
+    <string name="done_bar_description">In this presentation, a <b>done bar</b> replaces the action bar entirely, providing two direct actions to persist or dismiss changes. This is suitable for cases where no additional view details or actions are needed in the action bar.</string>
+
+    <string name="done_button_title">Done button</string>
+    <string name="done_button_description">In this presentation, a <b>done button</b> replaces the action bar\'s <i>Up</i> affordance and app icon, while the cancel action is made available in the action overflow. This is well-suited to scenarios where additional view details or actions may be needed in the action bar.</string>
+
+    <!-- Done bar strings -->
+    <string name="done">Done</string>
+    <string name="cancel">Cancel</string>
+</resources>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/styles.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/styles.xml
new file mode 100644
index 0000000..f3841bd
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/styles.xml
@@ -0,0 +1,71 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleContentContainer">
+        <item name="android:paddingTop">@dimen/vertical_page_margin</item>
+        <item name="android:paddingBottom">@dimen/vertical_page_margin</item>
+        <item name="android:paddingLeft">@dimen/horizontal_page_margin</item>
+        <item name="android:paddingRight">@dimen/horizontal_page_margin</item>
+    </style>
+
+    <style name="Widget.SampleMessage">
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+    <style name="Widget.SampleDashboard.Grid" parent="Widget">
+        <item name="android:stretchMode">columnWidth</item>
+        <item name="android:columnWidth">200dp</item>
+        <item name="android:numColumns">auto_fit</item>
+        <item name="android:drawSelectorOnTop">true</item>
+        <item name="android:horizontalSpacing">@dimen/margin_medium</item>
+        <item name="android:verticalSpacing">@dimen/margin_medium</item>
+    </style>
+
+    <style name="Widget.SampleDashboard.Item" parent="Widget">
+        <item name="android:background">@drawable/sample_dashboard_item_background</item>
+        <item name="android:paddingTop">@dimen/margin_small</item>
+        <item name="android:paddingLeft">@dimen/margin_medium</item>
+        <item name="android:paddingRight">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+    </style>
+
+    <style name="Widget.SampleDashboard.Item.Title" parent="Widget">
+        <item name="android:layout_marginBottom">@dimen/margin_tiny</item>
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:textColor">#09c</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textSize">24sp</item>
+    </style>
+
+    <style name="Widget.SampleDashboard.Item.Description" parent="Widget">
+        <item name="android:textAppearance">?android:textAppearanceSmall</item>
+        <item name="android:fontFamily">sans-serif-light</item>
+    </style>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/.gitignore b/ui/actionbar/DoneBar/DoneBarSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/actionbar/DoneBar/DoneBarSample/proguard-project.txt b/ui/actionbar/DoneBar/DoneBarSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/AndroidManifest.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 4731114..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.donebar"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
-
-    <application android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/Theme.Sample"
-        android:allowBackup="true">
-
-        <activity android:name=".MainActivity"
-            android:label="@string/app_name">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-        <activity android:name=".DoneBarActivity"
-            android:parentActivityName=".MainActivity" />
-
-        <activity android:name=".DoneButtonActivity"
-            android:parentActivityName=".MainActivity" />
-
-    </application>
-
-</manifest>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneButtonActivity.java b/ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneButtonActivity.java
deleted file mode 100755
index 3b1e37d..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneButtonActivity.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright 2013 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.donebar;
-
-import android.app.ActionBar;
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-
-/**
- * A sample activity demonstrating the "done button" alternative action bar presentation. For a more
- * detailed description see {@link R.string.done_button_description}.
- */
-public class DoneButtonActivity extends Activity {
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // BEGIN_INCLUDE (inflate_set_custom_view)
-        // Inflate a "Done" custom action bar view to serve as the "Up" affordance.
-        final LayoutInflater inflater = (LayoutInflater) getActionBar().getThemedContext()
-                .getSystemService(LAYOUT_INFLATER_SERVICE);
-        final View customActionBarView = inflater.inflate(
-                R.layout.actionbar_custom_view_done, null);
-        customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(
-                new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        // "Done"
-                        finish();
-                    }
-                });
-
-        // Show the custom action bar view and hide the normal Home icon and title.
-        final ActionBar actionBar = getActionBar();
-        actionBar.setDisplayOptions(
-                ActionBar.DISPLAY_SHOW_CUSTOM,
-                ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME
-                        | ActionBar.DISPLAY_SHOW_TITLE);
-        actionBar.setCustomView(customActionBarView);
-        // END_INCLUDE (inflate_set_custom_view)
-
-        setContentView(R.layout.activity_done_button);
-    }
-
-    // BEGIN_INCLUDE (handle_cancel)
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-        getMenuInflater().inflate(R.menu.cancel, menu);
-        return true;
-    }
-
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.cancel:
-                // "Cancel"
-                finish();
-                return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-    // END_INCLUDE (handle_cancel)
-}
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_bar.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_bar.xml
deleted file mode 100755
index 0d0272d..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_bar.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <LinearLayout style="@style/Widget.SampleContentContainer"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
-
-        <TextView style="@style/Widget.SampleMessage"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@string/donebaractivity_description" />
-
-    </LinearLayout>
-</ScrollView>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_button.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_button.xml
deleted file mode 100755
index 7fc2274..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_button.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <LinearLayout style="@style/Widget.SampleContentContainer"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical">
-
-        <TextView style="@style/Widget.SampleMessage"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:text="@string/donebuttonactivity_description" />
-
-    </LinearLayout>
-</ScrollView>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/values/strings.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/values/strings.xml
deleted file mode 100755
index df66a95..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <!-- Done bar strings -->
-    <string name="done">Done</string>
-    <string name="cancel">Cancel</string>
-</resources>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/tests/AndroidManifest.xml b/ui/actionbar/DoneBar/DoneBarSample/tests/AndroidManifest.xml
deleted file mode 100644
index 40eb5e1..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.donebar.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.donebar"
-            android:label="Tests for com.example.android.donebar" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbar/DoneBar/DoneBarSample/tests/src/com/example/android/donebar/tests/SampleTests.java b/ui/actionbar/DoneBar/DoneBarSample/tests/src/com/example/android/donebar/tests/SampleTests.java
deleted file mode 100644
index c019ef8..0000000
--- a/ui/actionbar/DoneBar/DoneBarSample/tests/src/com/example/android/donebar/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.donebar.tests;
-
-import com.example.android.donebar.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for DoneBar sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private DoneBarFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (DoneBarFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/actionbar/DoneBar/build.gradle b/ui/actionbar/DoneBar/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/actionbar/DoneBar/build.gradle
+++ b/ui/actionbar/DoneBar/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/actionbar/DoneBar/buildSrc/build.gradle b/ui/actionbar/DoneBar/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/actionbar/DoneBar/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties b/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/actionbar/DoneBar/settings.gradle b/ui/actionbar/DoneBar/settings.gradle
index d060dc7..28b5ccd 100644
--- a/ui/actionbar/DoneBar/settings.gradle
+++ b/ui/actionbar/DoneBar/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'DoneBarSample'
+include ':DoneBar'
diff --git a/ui/actionbar/DoneBar/template-params.xml b/ui/actionbar/DoneBar/template-params.xml
deleted file mode 100644
index c5d1741..0000000
--- a/ui/actionbar/DoneBar/template-params.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<sample>
-    <name>DoneBar</name>
-    <group>UI</group>
-    <package>com.example.android.donebar</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>14</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                This sample demonstrates two alternative presentations of the
-                action bar that are well-suited for simple data entry scenarios.
-
-                In this presentation, a done bar replaces the action
-                bar entirely, providing two direct actions to persist or dismiss changes. This is
-                suitable for cases where no additional view details or actions are needed in the
-                action bar.
-            ]]>
-        </intro>
-    </strings>
-
-    <activity>
-        <class>DoneBarActivity</class>
-        <title>Done Bar</title>
-        <description>In this presentation, a done bar replaces the action bar entirely, providing
-            two direct actions to persist or dismiss changes. This is suitable for cases where no
-            additional view details or actions are needed in the action bar.</description>
-    </activity>
-
-    <activity>
-        <class>DoneButtonActivity</class>
-        <title>Done Button</title>
-        <description>In this presentation, a done button replaces the action bar\'s "Up" affordance
-            and app icon, while the cancel action is made available in the action overflow. This is
-            well-suited to scenarios where additional view details or
-            actions may be needed in the action bar.</description>
-    </activity>
-
-    <template src="base"/>
-    <template src="ActivityCards"/>
-</sample>
diff --git a/ui/actionbarcompat/Basic/Basic/build.gradle b/ui/actionbarcompat/Basic/Basic/build.gradle
new file mode 100644
index 0000000..8e76487
--- /dev/null
+++ b/ui/actionbarcompat/Basic/Basic/build.gradle
@@ -0,0 +1,11 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+    compile "com.android.support:appcompat-v7:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/AndroidManifest.xml b/ui/actionbarcompat/Basic/Basic/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..f0243ac
--- /dev/null
+++ b/ui/actionbarcompat/Basic/Basic/src/main/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.actionbarcompat.basic"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <!-- ActionBarCompat provides an Action Bar from API v7 onwards -->
+    <uses-sdk
+        android:minSdkVersion="7"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/Theme.AppCompat"
+        android:allowBackup="true">
+
+        <activity android:name=".MainActivity">
+            <!-- Launcher Intent filter -->
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_location.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_location.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_refresh.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_settings.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_settings.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_location.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_location.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_refresh.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_settings.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_settings.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_location.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_location.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_refresh.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_settings.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_settings.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/Basic/Basic/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..47619e0
--- /dev/null
+++ b/ui/actionbarcompat/Basic/Basic/src/main/res/layout/activity_main.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:padding="16dp"
+    android:text="@string/main_description"
+    android:gravity="center" />
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/menu/main.xml b/ui/actionbarcompat/Basic/Basic/src/main/res/menu/main.xml
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/menu/main.xml
rename to ui/actionbarcompat/Basic/Basic/src/main/res/menu/main.xml
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/ids.xml b/ui/actionbarcompat/Basic/Basic/src/main/res/values/ids.xml
similarity index 100%
rename from ui/actionbarcompat/Basic/BasicSample/src/main/res/values/ids.xml
rename to ui/actionbarcompat/Basic/Basic/src/main/res/values/ids.xml
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/values/strings.xml b/ui/actionbarcompat/Basic/Basic/src/main/res/values/strings.xml
new file mode 100644
index 0000000..5421e64
--- /dev/null
+++ b/ui/actionbarcompat/Basic/Basic/src/main/res/values/strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+<resources>
+
+    <string name="app_name">ABC Basic</string>
+    <string name="menu_refresh">Refresh</string>
+    <string name="menu_location">Location</string>
+    <string name="menu_settings">Settings</string>
+    <string name="main_description">This is a basic Activity showing an
+        Action Bar. Items that are not shown as action items on the Action Bar are displayed in
+        the action bar overflow.</string>
+
+</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/src/com/example/android/actionbarcompat/basic/MainActivity.java b/ui/actionbarcompat/Basic/Basic/src/main/src/com/example/android/actionbarcompat/basic/MainActivity.java
new file mode 100644
index 0000000..eb63827
--- /dev/null
+++ b/ui/actionbarcompat/Basic/Basic/src/main/src/com/example/android/actionbarcompat/basic/MainActivity.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2013 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.actionbarcompat.basic;
+
+import android.os.Bundle;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+import android.view.MenuItem;
+
+/**
+ * This sample shows you how to use ActionBarCompat to create a basic Activity which displays
+ * action items. It covers inflating items from a menu resource, as well as adding an item in code.
+ *
+ * This Activity extends from {@link ActionBarActivity}, which provides all of the function
+ * necessary to display a compatible Action Bar on devices running Android v2.1+.
+ */
+public class MainActivity extends ActionBarActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+    }
+
+    // BEGIN_INCLUDE(create_menu)
+    /**
+     * Use this method to instantiate your menu, and add your items to it. You
+     * should return true if you have added items to it and want the menu to be displayed.
+     */
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate our menu from the resources by using the menu inflater.
+        getMenuInflater().inflate(R.menu.main, menu);
+
+        // It is also possible add items here. Use a generated id from
+        // resources (ids.xml) to ensure that all menu ids are distinct.
+        MenuItem locationItem = menu.add(0, R.id.menu_location, 0, R.string.menu_location);
+        locationItem.setIcon(R.drawable.ic_action_location);
+
+        // Need to use MenuItemCompat methods to call any action item related methods
+        MenuItemCompat.setShowAsAction(locationItem, MenuItem.SHOW_AS_ACTION_IF_ROOM);
+
+        return true;
+    }
+    // END_INCLUDE(create_menu)
+
+    // BEGIN_INCLUDE(menu_item_selected)
+    /**
+     * This method is called when one of the menu items to selected. These items
+     * can be on the Action Bar, the overflow menu, or the standard options menu. You
+     * should return true if you handle the selection.
+     */
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.menu_refresh:
+                // Here we might start a background refresh task
+                return true;
+
+            case R.id.menu_location:
+                // Here we might call LocationManager.requestLocationUpdates()
+                return true;
+
+            case R.id.menu_settings:
+                // Here we would open up our settings activity
+                return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+    // END_INCLUDE(menu_item_selected)
+}
diff --git a/ui/actionbarcompat/Basic/BasicSample/.gitignore b/ui/actionbarcompat/Basic/BasicSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/actionbarcompat/Basic/BasicSample/proguard-project.txt b/ui/actionbarcompat/Basic/BasicSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/AndroidManifest.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 332c055..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.basic"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!-- ActionBarCompat provides an Action Bar from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
-
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/java/com/example/android/actionbarcompat/basic/MainActivity.java b/ui/actionbarcompat/Basic/BasicSample/src/main/java/com/example/android/actionbarcompat/basic/MainActivity.java
deleted file mode 100644
index 8d3506f..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/src/main/java/com/example/android/actionbarcompat/basic/MainActivity.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.basic;
-
-import android.os.Bundle;
-import android.support.v4.view.MenuItemCompat;
-import android.support.v7.app.ActionBarActivity;
-import android.view.Menu;
-import android.view.MenuItem;
-
-/**
- * This sample shows you how to use ActionBarCompat to create a basic Activity which displays
- * action items. It covers inflating items from a menu resource, as well as adding an item in code.
- *
- * This Activity extends from {@link ActionBarActivity}, which provides all of the function
- * necessary to display a compatible Action Bar on devices running Android v2.1+.
- */
-public class MainActivity extends ActionBarActivity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-    }
-
-    // BEGIN_INCLUDE(create_menu)
-    /**
-     * Use this method to instantiate your menu, and add your items to it. You
-     * should return true if you have added items to it and want the menu to be displayed.
-     */
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate our menu from the resources by using the menu inflater.
-        getMenuInflater().inflate(R.menu.main, menu);
-
-        // It is also possible add items here. Use a generated id from
-        // resources (ids.xml) to ensure that all menu ids are distinct.
-        MenuItem locationItem = menu.add(0, R.id.menu_location, 0, R.string.menu_location);
-        locationItem.setIcon(R.drawable.ic_action_location);
-
-        // Need to use MenuItemCompat methods to call any action item related methods
-        MenuItemCompat.setShowAsAction(locationItem, MenuItem.SHOW_AS_ACTION_IF_ROOM);
-
-        return true;
-    }
-    // END_INCLUDE(create_menu)
-
-    // BEGIN_INCLUDE(menu_item_selected)
-    /**
-     * This method is called when one of the menu items to selected. These items
-     * can be on the Action Bar, the overflow menu, or the standard options menu. You
-     * should return true if you handle the selection.
-     */
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.menu_refresh:
-                // Here we might start a background refresh task
-                return true;
-
-            case R.id.menu_location:
-                // Here we might call LocationManager.requestLocationUpdates()
-                return true;
-
-            case R.id.menu_settings:
-                // Here we would open up our settings activity
-                return true;
-        }
-
-        return super.onOptionsItemSelected(item);
-    }
-    // END_INCLUDE(menu_item_selected)
-}
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/layout/sample_main.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/res/layout/sample_main.xml
deleted file mode 100644
index ff589e1..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/src/main/res/layout/sample_main.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:padding="16dp"
-    android:text="@string/intro_message"
-    android:gravity="center" />
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/strings.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/strings.xml
deleted file mode 100644
index 7867410..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-    <string name="menu_refresh">Refresh</string>
-    <string name="menu_location">Location</string>
-    <string name="menu_settings">Settings</string>
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/tests/AndroidManifest.xml b/ui/actionbarcompat/Basic/BasicSample/tests/AndroidManifest.xml
deleted file mode 100644
index a2f7cfc..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.actionbarcompat.basic.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.actionbarcompat.basic"
-            android:label="Tests for com.example.android.actionbarcompat.basic" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/tests/src/com/example/android/actionbarcompat/basic/tests/SampleTests.java b/ui/actionbarcompat/Basic/BasicSample/tests/src/com/example/android/actionbarcompat/basic/tests/SampleTests.java
deleted file mode 100644
index 8c1b2be..0000000
--- a/ui/actionbarcompat/Basic/BasicSample/tests/src/com/example/android/actionbarcompat/basic/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.actionbarcompat.basic.tests;
-
-import com.example.android.actionbarcompat.basic.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for Basic sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/README.txt b/ui/actionbarcompat/Basic/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/actionbarcompat/Basic/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/big_icon.png b/ui/actionbarcompat/Basic/big_icon.png
new file mode 100644
index 0000000..20f585a
--- /dev/null
+++ b/ui/actionbarcompat/Basic/big_icon.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/build.gradle b/ui/actionbarcompat/Basic/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/actionbarcompat/Basic/build.gradle
+++ b/ui/actionbarcompat/Basic/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/actionbarcompat/Basic/buildSrc/build.gradle b/ui/actionbarcompat/Basic/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/actionbarcompat/Basic/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/actionbarcompat/Basic/settings.gradle b/ui/actionbarcompat/Basic/settings.gradle
index 2f3a557..56d763b 100644
--- a/ui/actionbarcompat/Basic/settings.gradle
+++ b/ui/actionbarcompat/Basic/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicSample'
+include ':Basic'
diff --git a/ui/actionbarcompat/Basic/template-params.xml b/ui/actionbarcompat/Basic/template-params.xml
deleted file mode 100644
index e940d2d..0000000
--- a/ui/actionbarcompat/Basic/template-params.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>Basic</name>
-    <group>UI</group>
-    <package>com.example.android.actionbarcompat.basic</package>
-
-    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
-
-    <!-- change minSdk if needed-->
-    <minSdk>7</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample shows you how to use ActionBarCompat to create a basic Activity which
-            displays action items. It covers inflating items from a menu resource, as well as adding
-            an item in code. Items that are not shown as action items on the Action Bar are
-            displayed in the action bar overflow.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/build.gradle b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/build.gradle
new file mode 100644
index 0000000..8e76487
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/build.gradle
@@ -0,0 +1,11 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+    compile "com.android.support:appcompat-v7:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..7e9a861
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.actionbarcompat.listpopupmenu"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
+    <uses-sdk
+        android:minSdkVersion="7"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/Theme.AppCompat"
+        android:allowBackup="true">
+
+        <activity android:name=".MainActivity">
+            <!-- Launcher Intent filter -->
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_overflow.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_overflow.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_overflow.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_overflow.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_overflow.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_overflow.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_overflow.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_overflow.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_overflow.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_overflow.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_overflow.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_overflow.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/sample_main.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/sample_main.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/activity_main.xml
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/list_item.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/list_item.xml
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/list_item.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/list_item.xml
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/menu/popup.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/menu/popup.xml
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/menu/popup.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/menu/popup.xml
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/values/strings.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/values/strings.xml
new file mode 100644
index 0000000..36233c9
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/values/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+<resources>
+
+    <string name="app_name">ABC List Popup Menu</string>
+    <string name="menu_remove">Remove</string>
+    <string name="content_open_popup">Open Popup Menu</string>
+
+</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
new file mode 100644
index 0000000..7fd05cc
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2013 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.actionbarcompat.listpopupmenu;
+
+import android.os.Bundle;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+import android.view.MenuItem;
+
+/**
+ * This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu} from
+ * ActionBarCompat to create a list, with each item having a dropdown menu.
+ * <p>
+ * The interesting part of this sample is in {@link PopupListFragment}.
+ *
+ * This Activity extends from {@link ActionBarActivity}, which provides all of the function
+ * necessary to display a compatible Action Bar on devices running Android v2.1+.
+ */
+public class MainActivity extends ActionBarActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Set content view (which contains a PopupListFragment)
+        setContentView(R.layout.activity_main);
+    }
+
+}
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/.gitignore b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/proguard-project.txt b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/AndroidManifest.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 114053e..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.listpopupmenu"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
-
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
deleted file mode 100644
index 13a77f3..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.listpopupmenu;
-
-import android.os.Bundle;
-import android.support.v7.app.ActionBarActivity;
-
-/**
- * This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu} from
- * ActionBarCompat to create a list, with each item having a dropdown menu.
- * <p>
- * The interesting part of this sample is in {@link PopupListFragment}.
- *
- * This Activity extends from {@link ActionBarActivity}, which provides all of the function
- * necessary to display a compatible Action Bar on devices running Android v2.1+.
- */
-public class MainActivity extends ActionBarActivity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Set content view (which contains a PopupListFragment)
-        setContentView(R.layout.sample_main);
-    }
-
-}
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/values/strings.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/values/strings.xml
deleted file mode 100644
index e5784a9..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-
-    <string name="menu_remove">Remove</string>
-    <string name="content_open_popup">Open Popup Menu</string>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/AndroidManifest.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/AndroidManifest.xml
deleted file mode 100644
index d23ab10..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.actionbarcompat.listpopupmenu.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.actionbarcompat.listpopupmenu"
-            android:label="Tests for com.example.android.actionbarcompat.listpopupmenu" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/src/com/example/android/actionbarcompat/listpopupmenu/tests/SampleTests.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/src/com/example/android/actionbarcompat/listpopupmenu/tests/SampleTests.java
deleted file mode 100644
index c91ae2e..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/src/com/example/android/actionbarcompat/listpopupmenu/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.actionbarcompat.listpopupmenu.tests;
-
-import com.example.android.actionbarcompat.listpopupmenu.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for ListPopupMenu sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private ListPopupMenuFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (ListPopupMenuFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/README.txt b/ui/actionbarcompat/ListPopupMenu/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/big_icon.png b/ui/actionbarcompat/ListPopupMenu/big_icon.png
new file mode 100644
index 0000000..6968ae8
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/big_icon.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/build.gradle b/ui/actionbarcompat/ListPopupMenu/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/actionbarcompat/ListPopupMenu/build.gradle
+++ b/ui/actionbarcompat/ListPopupMenu/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/actionbarcompat/ListPopupMenu/buildSrc/build.gradle b/ui/actionbarcompat/ListPopupMenu/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/actionbarcompat/ListPopupMenu/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/actionbarcompat/ListPopupMenu/settings.gradle b/ui/actionbarcompat/ListPopupMenu/settings.gradle
index c0f83ff..b354d69 100644
--- a/ui/actionbarcompat/ListPopupMenu/settings.gradle
+++ b/ui/actionbarcompat/ListPopupMenu/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'ListPopupMenuSample'
+include ':ListPopupMenu'
diff --git a/ui/actionbarcompat/ListPopupMenu/template-params.xml b/ui/actionbarcompat/ListPopupMenu/template-params.xml
deleted file mode 100644
index 0d23829..0000000
--- a/ui/actionbarcompat/ListPopupMenu/template-params.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>ListPopupMenu</name>
-    <group>UI</group>
-    <package>com.example.android.actionbarcompat.listpopupmenu</package>
-
-    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
-
-    <!-- change minSdk if needed-->
-    <minSdk>7</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu}
-            from ActionBarCompat to create a list, with each item having a dropdown menu.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/ui/actionbarcompat/ListViewModalSelect/big_icon.png b/ui/actionbarcompat/ListViewModalSelect/big_icon.png
deleted file mode 100644
index 0f47486..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ListViewModalSelect/build.gradle b/ui/actionbarcompat/ListViewModalSelect/build.gradle
deleted file mode 100644
index 5161a84..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/build.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-    compile "com.android.support:appcompat-v7:18.0.+"
-}
-
-android {
-    compileSdkVersion 17
-    buildToolsVersion "18.0.1"
-
-    defaultConfig {
-        minSdkVersion 7
-        targetSdkVersion 16
-    }
-}
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/AndroidManifest.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/AndroidManifest.xml
deleted file mode 100644
index 1ca1c5d..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.listviewmodalselect"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!--
-        ActionBarCompat provides an Action Bar from API v7 onwards
-    -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
-
-        <activity
-            android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-    </application>
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index a3d6711..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f488bbc..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 0651b33..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index ac8a199..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable/background_checked.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable/background_checked.xml
deleted file mode 100644
index 9d8bef3..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/drawable/background_checked.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_checked="true" android:drawable="@color/translucent_blue" />
-    <item android:drawable="@android:color/transparent" />
-</selector>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 456cd19..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <fragment
-        android:id="@+id/frag_app_list"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"
-        android:name="com.example.android.actionbarcompat.listviewmodalselect.CheeseListFragment" />
-
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/intro_message"
-        android:padding="16dp"
-        android:textAppearance="?android:textAppearanceMedium"
-        android:lineSpacingMultiplier="1.1"
-        android:background="#fb3"/>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/layout/simple_selectable_list_item.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/res/layout/simple_selectable_list_item.xml
deleted file mode 100644
index 5f82f4b..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/layout/simple_selectable_list_item.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 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.
--->
-
-<!--
-  The layout which is used in our ListView items. We use a CheckedTextView so we can
-  simulate the activated state (added in available from API v11) with the checked
-  state, which is available from API v1.
--->
-<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@android:id/text1"
-    android:layout_width="match_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
-    android:textAppearance="?android:attr/textAppearanceLarge"
-    android:gravity="center_vertical"
-    android:background="@drawable/background_checked"
-    android:paddingLeft="6dip"
-    android:paddingRight="9dip"/>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/menu/context_cheeses.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/res/menu/context_cheeses.xml
deleted file mode 100644
index e845a4d..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/menu/context_cheeses.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<!--
-  As we're using ActionBarCompat, any action item attributes come from ActionBarCompat's XML
-  namespace instead of the android namespace. Here we've added a new support namespace added to
-  the menu element allowing us to use the 'showAsAction' attribute in a backwards compatible way.
-  Any other action item attributes used should be referenced from this namespace too
-  (actionProviderClass, actionViewClass, actionLayout).
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:support="http://schemas.android.com/apk/res-auto">
-
-    <item
-        android:id="@+id/menu_remove"
-        android:title="@string/menu_remove"
-        support:showAsAction="ifRoom"/>
-
-</menu>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/values/colors.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/res/values/colors.xml
deleted file mode 100644
index c4e8b3a..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/values/colors.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-
-    <!-- A translucent holo blue -->
-    <color name="translucent_blue">#9033B5E5</color>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/res/values/strings.xml b/ui/actionbarcompat/ListViewModalSelect/src/main/res/values/strings.xml
deleted file mode 100644
index 1987fab..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-
-    <string name="app_name">ABC ListView Modal</string>
-    <string name="intro_message">This sample demonstrates how to provide a
-        <em>MULTIPLE_MODAL</em> ListView choice mode, compatible from API v7.
-    </string>
-    <string name="menu_remove">Remove</string>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/src/com/example/android/actionbarcompat/listviewmodalselect/CheeseListFragment.java b/ui/actionbarcompat/ListViewModalSelect/src/main/src/com/example/android/actionbarcompat/listviewmodalselect/CheeseListFragment.java
deleted file mode 100644
index 2ea9638..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/src/com/example/android/actionbarcompat/listviewmodalselect/CheeseListFragment.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.listviewmodalselect;
-
-import com.example.android.common.actionbarcompat.MultiSelectionUtil;
-import com.example.android.common.dummydata.Cheeses;
-
-import android.os.Bundle;
-import android.support.v4.app.ListFragment;
-import android.support.v7.app.ActionBarActivity;
-import android.support.v7.view.ActionMode;
-import android.util.SparseBooleanArray;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.widget.ArrayAdapter;
-import android.widget.BaseAdapter;
-import android.widget.ListView;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * This ListFragment displays a list of cheeses, allowing the user to select multiple items
- * in a modal selection mode. In this example, the user can remove multiple items via the displayed
- * action mode.
- */
-public class CheeseListFragment extends ListFragment {
-
-    // ArrayList containing the cheese name Strings
-    private ArrayList<String> mItems;
-
-    // The Controller which provides CHOICE_MODE_MULTIPLE_MODAL-like functionality
-    private MultiSelectionUtil.Controller mMultiSelectController;
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-
-        // The items which will be displayed
-        mItems = Cheeses.asList();
-
-        // Set the ListAdapter so that the ListView displays the items
-        setListAdapter(new ArrayAdapter<String>(getActivity(), R.layout.simple_selectable_list_item,
-                        android.R.id.text1, mItems));
-
-        // BEGIN_INCLUDE(attach_controller)
-        // Attach a MultiSelectionUtil.Controller to the ListView, giving it an instance of
-        // ModalChoiceListener (see below)
-        mMultiSelectController = MultiSelectionUtil
-                .attachMultiSelectionController(getListView(), (ActionBarActivity) getActivity(),
-                        new ModalChoiceListener());
-
-        // Allow the Controller to restore itself
-        mMultiSelectController.restoreInstanceState(savedInstanceState);
-        // END_INCLUDE(attach_controller)
-    }
-
-    @Override
-    public void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        // BEGIN_INCLUDE(save_instance)
-        // Allow the Controller to save it's instance state so that any checked items are
-        // stored
-        if (mMultiSelectController != null) {
-            mMultiSelectController.saveInstanceState(outState);
-        }
-        // END_INCLUDE(save_instance)
-    }
-
-    /**
-     * The listener which is provided to MultiSelectionUtil to handle any multi-selection actions.
-     * It is responsible for providing the menu to display on the action mode, and handling any
-     * action item clicks.
-     */
-    private class ModalChoiceListener implements MultiSelectionUtil.MultiChoiceModeListener {
-
-        @Override
-        public void onItemCheckedStateChanged(ActionMode mode, int position, long id,
-                boolean checked) {
-        }
-
-        @Override
-        public boolean onCreateActionMode(ActionMode actionMode, Menu menu) {
-            // Inflate the menu resource (res/menu/context_cheeses.xml) which will be displayed
-            // in the action mode
-            actionMode.getMenuInflater().inflate(R.menu.context_cheeses, menu);
-            return true;
-        }
-
-        @Override
-        public boolean onPrepareActionMode(ActionMode actionMode, Menu menu) {
-            return true;
-        }
-
-        @Override
-        public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
-            // We switch on the menu item's id, so we know which is clicked
-            switch (menuItem.getItemId()) {
-
-                // Our item with the menu_remove ID is used to remove the item(s) from the list.
-                // Here we retrieve which positions are currently checked, then iterate through the
-                // list and remove the checked items. Once finished we notify the adapter to update
-                // the ListView contents and finish the action mode.
-                case R.id.menu_remove:
-                    // Retrieve which positions are currently checked
-                    final ListView listView = getListView();
-                    SparseBooleanArray checkedPositions = listView.getCheckedItemPositions();
-
-                    // Check to see if there are any checked items
-                    if (checkedPositions.size() == 0) {
-                        return false;
-                    }
-
-                    // Iterate through the items and remove any which are checked
-                    final Iterator<String> iterator = mItems.iterator();
-                    int i = 0;
-                    while (iterator.hasNext()) {
-                        // Call next() so that the iterator index moves
-                        iterator.next();
-
-                        // Remove the item if it is checked (and increment position)
-                        if (checkedPositions.get(i++)) {
-                            iterator.remove();
-                        }
-                    }
-
-                    // Clear the ListView's checked items
-                    listView.clearChoices();
-
-                    // Finally, notify the adapter so that it updates the ListView
-                    ((BaseAdapter) getListAdapter()).notifyDataSetChanged();
-
-                    // As we're removing all of checked items, we'll close the action mode
-                    actionMode.finish();
-
-                    // We return true to signify that we have handled the action item click
-                    return true;
-            }
-
-            return false;
-        }
-
-        @Override
-        public void onDestroyActionMode(ActionMode actionMode) {
-        }
-    }
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListViewModalSelect/src/main/src/com/example/android/actionbarcompat/listviewmodalselect/MainActivity.java b/ui/actionbarcompat/ListViewModalSelect/src/main/src/com/example/android/actionbarcompat/listviewmodalselect/MainActivity.java
deleted file mode 100644
index 72afc56..0000000
--- a/ui/actionbarcompat/ListViewModalSelect/src/main/src/com/example/android/actionbarcompat/listviewmodalselect/MainActivity.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.listviewmodalselect;
-
-import android.os.Bundle;
-import android.support.v7.app.ActionBarActivity;
-
-/**
- * This sample shows you how a provide a ListView which allows the user to select multiple items
- * in a modal selection mode with ActionBarCompat, backwards compatible to API v7.
- * <p>
- * This Activity extends from {@link ActionBarActivity}, which provides all of the function
- * necessary to display a compatible Action Bar on devices running Android v2.1+.
- * <p>
- * The interesting part of this sample is in {@link CheeseListFragment}.
- */
-public class MainActivity extends ActionBarActivity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Set content view (which contains a CheeseListFragment)
-        setContentView(R.layout.activity_main);
-    }
-
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/SearchView/big_icon.png b/ui/actionbarcompat/SearchView/big_icon.png
deleted file mode 100644
index e4c6ee2..0000000
--- a/ui/actionbarcompat/SearchView/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/build.gradle b/ui/actionbarcompat/SearchView/build.gradle
deleted file mode 100644
index 5161a84..0000000
--- a/ui/actionbarcompat/SearchView/build.gradle
+++ /dev/null
@@ -1,26 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-    compile "com.android.support:appcompat-v7:18.0.+"
-}
-
-android {
-    compileSdkVersion 17
-    buildToolsVersion "18.0.1"
-
-    defaultConfig {
-        minSdkVersion 7
-        targetSdkVersion 16
-    }
-}
diff --git a/ui/actionbarcompat/SearchView/src/main/AndroidManifest.xml b/ui/actionbarcompat/SearchView/src/main/AndroidManifest.xml
deleted file mode 100644
index b2554d6..0000000
--- a/ui/actionbarcompat/SearchView/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.searchview"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!--
-        ActionBarCompat provides an Action Bar with compatible SearchView
-        from API v7 onwards
-    -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme"
-        android:allowBackup="true">
-
-        <activity
-            android:name=".SearchActivity">
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-    </application>
-
-</manifest>
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-hdpi/ic_action_search.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-hdpi/ic_action_search.png
deleted file mode 100644
index 9839a13..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-hdpi/ic_action_search.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 45afb7d..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-mdpi/ic_action_search.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-mdpi/ic_action_search.png
deleted file mode 100644
index 076085c..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-mdpi/ic_action_search.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 57f2527..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-xhdpi/ic_action_search.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-xhdpi/ic_action_search.png
deleted file mode 100644
index f9272df..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-xhdpi/ic_action_search.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 478f739..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/SearchView/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 2e14315..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/SearchView/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/SearchView/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 9158690..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<fragment xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/frag_app_list"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:name="com.example.android.actionbarcompat.searchview.AppListFragment" />
diff --git a/ui/actionbarcompat/SearchView/src/main/res/layout/list_item.xml b/ui/actionbarcompat/SearchView/src/main/res/layout/list_item.xml
deleted file mode 100644
index 893796c..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/layout/list_item.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="match_parent"
-    android:layout_height="?android:listPreferredItemHeight"
-    android:padding="8dp"
-    android:gravity="center_vertical">
-
-    <ImageView
-        android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:layout_marginRight="8dp"
-        android:scaleType="fitCenter"
-        android:contentDescription="@string/content_item_icon"/>
-
-    <TextView
-        android:id="@android:id/text1"
-        android:layout_width="0dp"
-        android:layout_weight="1"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:textAppearanceMedium"
-        android:maxLines="1"
-        android:ellipsize="end"/>
-
-</LinearLayout>
\ No newline at end of file
diff --git a/ui/actionbarcompat/SearchView/src/main/res/menu/main.xml b/ui/actionbarcompat/SearchView/src/main/res/menu/main.xml
deleted file mode 100644
index 1709e8b..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/menu/main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<!--
-  As we're using ActionBarCompat, any action item attributes come from ActionBarCompat's XML
-  namespace instead of the android namespace. Here we've added a new support namespace added to
-  the menu element allowing us to use the 'showAsAction' attribute in a backwards compatible way.
-  Any other action item attributes used should be referenced from this namespace too
-  (actionProviderClass, actionViewClass, actionLayout).
--->
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:support="http://schemas.android.com/apk/res-auto">
-
-    <!--
-        Here we create an item, setting the actionViewClass attribute to point to ActionBarCompat's
-        SearchView. We add the collapseActionView flag to showAsAction so that the SearchView is
-        collapsed until the user clicks on the action item.
-    -->
-    <item
-        android:id="@+id/menu_search"
-        android:title="@string/menu_search"
-        android:icon="@drawable/ic_action_search"
-        support:actionViewClass="android.support.v7.widget.SearchView"
-        support:showAsAction="ifRoom|collapseActionView"/>
-
-</menu>
\ No newline at end of file
diff --git a/ui/actionbarcompat/SearchView/src/main/res/values/strings.xml b/ui/actionbarcompat/SearchView/src/main/res/values/strings.xml
deleted file mode 100644
index 4a5ab36..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-
-    <string name="app_name">ABC Search Demo</string>
-    <string name="applist_empty_text">Search for an app above.</string>
-    <string name="search_hint">Search applications</string>
-    <string name="menu_search">Search</string>
-    <string name="content_item_icon">Item Icon</string>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/SearchView/src/main/res/values/styles.xml b/ui/actionbarcompat/SearchView/src/main/res/values/styles.xml
deleted file mode 100644
index d9a47e3..0000000
--- a/ui/actionbarcompat/SearchView/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-
-    <!-- Application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat"></style>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/SearchView/src/main/src/com/example/android/actionbarcompat/searchview/AppListFragment.java b/ui/actionbarcompat/SearchView/src/main/src/com/example/android/actionbarcompat/searchview/AppListFragment.java
deleted file mode 100644
index 981eb37..0000000
--- a/ui/actionbarcompat/SearchView/src/main/src/com/example/android/actionbarcompat/searchview/AppListFragment.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.searchview;
-
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.support.v4.app.ListFragment;
-import android.text.TextUtils;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Pattern;
-
-/**
- * A ListFragment which displays a list of applications currently on the device, with
- * filtering functionality.
- */
-public class AppListFragment extends ListFragment {
-
-    // Stores the full list of applications installed on the device
-    private final List<ApplicationItem> mInstalledApps = new ArrayList<ApplicationItem>();
-
-    // Stores the result of the last query
-    private final  List<ApplicationItem> mFilteredApps = new ArrayList<ApplicationItem>();
-
-    private PackageManager mPackageManager;
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Retrieve all of the applications installed on this device
-        mPackageManager = getActivity().getPackageManager();
-
-        // Start an AsyncTask to load the application's installed on the device
-        new LoadApplicationsTask().execute();
-    }
-
-    @Override
-    public void onViewCreated(View view, Bundle savedInstanceState) {
-        super.onViewCreated(view, savedInstanceState);
-
-        // Set the ListView's Adapter to display the filtered applications
-        setListAdapter(new AppAdapter());
-
-        // Set the text which displays when the ListView is empty
-        setEmptyText(getString(R.string.applist_empty_text));
-
-        // If the installed applications is not loaded yet, hide the list
-        if (mInstalledApps.isEmpty()) {
-            setListShown(false);
-        }
-    }
-
-    /**
-     * Set the query used to filter the installed application's names.
-     * @param query Query to filter against.
-     */
-    public void setFilterQuery(String query) {
-        // Fail-fast if the installed apps has not been loaded yet
-        if (mInstalledApps.isEmpty()) {
-            return;
-        }
-
-        // Clear current filtered apps and hide ListView
-        mFilteredApps.clear();
-
-        if (TextUtils.isEmpty(query)) {
-            // If the query is empty, show all install apps
-            mFilteredApps.addAll(mInstalledApps);
-        } else {
-            // Compile Regex Pattern which will match if the app name contains the query
-            final Pattern p = Pattern.compile(".*" + query + ".*", Pattern.CASE_INSENSITIVE);
-
-            // Iterate through the installed apps to see if their label matches the query
-            for (ApplicationItem application : mInstalledApps) {
-                // If the app label matches the query, add it to the filtered apps list
-                if (p.matcher(application.label).matches()) {
-                    mFilteredApps.add(application);
-                }
-            }
-        }
-
-        // Notify the adapter so that it updates the ListView's contents
-        AppAdapter adapter = (AppAdapter) getListAdapter();
-        adapter.notifyDataSetChanged();
-    }
-
-    private class AppAdapter extends BaseAdapter {
-        private final LayoutInflater mInflater;
-
-        AppAdapter() {
-            mInflater = LayoutInflater.from(getActivity());
-        }
-
-        @Override
-        public int getCount() {
-            return mFilteredApps.size();
-        }
-
-        @Override
-        public ApplicationItem getItem(int position) {
-            return mFilteredApps.get(position);
-        }
-
-        @Override
-        public long getItemId(int position) {
-            return position;
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup parent) {
-            if (convertView == null) {
-                convertView = mInflater.inflate(R.layout.list_item, parent, false);
-            }
-
-            final ApplicationItem item = getItem(position);
-
-            // Set the application's label on the TextView
-            ((TextView) convertView.findViewById(android.R.id.text1))
-                    .setText(item.label);
-
-            // ImageView to display the application's icon
-            ImageView imageView = (ImageView) convertView.findViewById(R.id.icon);
-
-            // Check the item's drawable reference to see if it is available already
-            Drawable icon = item.drawable != null ? item.drawable.get() : null;
-
-            if (icon != null) {
-                imageView.setImageDrawable(icon);
-            } else {
-                // Start a new AsyncTask which will retrieve the application icon and display it in
-                // the ImageView
-                new ApplicationIconTask(imageView).execute(item);
-            }
-
-            return convertView;
-        }
-    }
-
-    /**
-     * Our model object for each application item. Allows us to load the label async and store the
-     * result for use later (filtering and displaying in the adapter).
-     */
-    private static class ApplicationItem {
-        final ApplicationInfo applicationInfo;
-        final CharSequence label;
-        WeakReference<Drawable> drawable;
-
-        ApplicationItem(PackageManager packageManager, ApplicationInfo applicationInfo) {
-            this.applicationInfo = applicationInfo;
-
-            // Load and store the app's label using the PackageManager
-            this.label = applicationInfo.loadLabel(packageManager);
-        }
-    }
-
-    /**
-     * Simple AsyncTask which retrieves the installed applications from the {@link PackageManager}
-     * and stores them locally.
-     */
-    private class LoadApplicationsTask extends AsyncTask<Void, Void, List<ApplicationItem>> {
-
-        @Override
-        protected List<ApplicationItem> doInBackground(Void... voids) {
-            // Load all installed applications on the device
-            List<ApplicationInfo> apps = mPackageManager.getInstalledApplications(0);
-            // Create an ArrayList used to store the result
-            ArrayList<ApplicationItem> loadedApps = new ArrayList<ApplicationItem>();
-
-            // Iterate through the results and create an ApplicationItem instance for each one,
-            // adding them to the returned List.
-            for (ApplicationInfo info : apps) {
-                loadedApps.add(new ApplicationItem(mPackageManager, info));
-            }
-
-            return loadedApps;
-        }
-
-        @Override
-        protected void onPostExecute(List<ApplicationItem> loadedApps) {
-            super.onPostExecute(loadedApps);
-
-            // Add the results to the install apps list
-            mInstalledApps.addAll(loadedApps);
-
-            // Reset the query to update the ListView
-            setFilterQuery(null);
-
-            // Make sure the list is shown
-            setListShown(true);
-        }
-    }
-
-    /**
-     * Simple AsyncTask which loads the given application's logo from the {@link PackageManager} and
-     * displays it in the given {@link ImageView}
-     */
-    private class ApplicationIconTask extends AsyncTask<ApplicationItem, Void, Drawable> {
-        private final ImageView mImageView;
-
-        ApplicationIconTask(ImageView imageView) {
-            mImageView = imageView;
-        }
-
-        @Override
-        protected Drawable doInBackground(ApplicationItem... params) {
-            Drawable icon = null;
-
-            // Check to see that we've been provided one item
-            if (params.length == 1) {
-                ApplicationItem item = params[0];
-
-                // Load the icon from the PackageManager
-                icon = item.applicationInfo.loadIcon(mPackageManager);
-
-                // Store the icon in a WeakReference so we do not cause a OutOfMemoryError.
-                item.drawable = new WeakReference<Drawable>(icon);
-            }
-
-            return icon;
-        }
-
-        @Override
-        protected void onPostExecute(Drawable icon) {
-            super.onPostExecute(icon);
-            // Display the icon in the ImageView
-            mImageView.setImageDrawable(icon);
-        }
-    }
-
-}
diff --git a/ui/actionbarcompat/SearchView/src/main/src/com/example/android/actionbarcompat/searchview/SearchActivity.java b/ui/actionbarcompat/SearchView/src/main/src/com/example/android/actionbarcompat/searchview/SearchActivity.java
deleted file mode 100644
index c0cbdda..0000000
--- a/ui/actionbarcompat/SearchView/src/main/src/com/example/android/actionbarcompat/searchview/SearchActivity.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.searchview;
-
-import android.os.Bundle;
-import android.support.v4.view.MenuItemCompat;
-import android.support.v7.app.ActionBarActivity;
-import android.support.v7.widget.SearchView;
-import android.view.Menu;
-import android.view.MenuItem;
-
-/**
- * This sample shows you how to use {@link SearchView} to provide a search function in a single
- * Activity, when utilizing ActionBarCompat.
- *
- * This Activity extends from {@link ActionBarActivity}, which provides all of the function
- * necessary to display a compatible Action Bar on devices running Android v2.1+.
- */
-public class SearchActivity extends ActionBarActivity {
-
-    private AppListFragment mAppListFragment;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
-
-        // Retrieve the AppListFragment from the layout
-        mAppListFragment = (AppListFragment) getSupportFragmentManager()
-                .findFragmentById(R.id.frag_app_list);
-    }
-
-    // BEGIN_INCLUDE(create_menu)
-    /**
-     * Use this method to instantiate your menu, inflating our {@code main} menu resource.
-     */
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate our menu from the resources by using the menu inflater.
-        getMenuInflater().inflate(R.menu.main, menu);
-
-        return super.onCreateOptionsMenu(menu);
-    }
-    // END_INCLUDE(create_menu)
-
-
-    /**
-     * This is called just before the menu is about to be displayed. You should
-     * use this method to modify your menu or its items. In this example, we
-     * retrieve the SearchView.
-     */
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        // BEGIN_INCLUDE(retrieve_view)
-        // First we retrieve the searchable menu item
-        MenuItem searchItem = menu.findItem(R.id.menu_search);
-
-        // Now we get the SearchView from the item
-        final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
-        // END_INCLUDE(retrieve_view)
-
-        // Set the hint text which displays when the SearchView is empty
-        searchView.setQueryHint(getString(R.string.search_hint));
-
-        // BEGIN_INCLUDE(action_expand_listener)
-        // We now set OnActionExpandListener on the menu item so we can reset SearchView's query
-        // when it is collapsed.
-        MenuItemCompat.setOnActionExpandListener(searchItem,
-                new MenuItemCompat.OnActionExpandListener() {
-                    @Override
-                    public boolean onMenuItemActionExpand(MenuItem menuItem) {
-                        // Return true to allow the action view to expand
-                        return true;
-                    }
-
-                    @Override
-                    public boolean onMenuItemActionCollapse(MenuItem menuItem) {
-                        // When the action view is collapsed, reset the query
-                        searchView.setQuery(null, true);
-
-                        // Return true to allow the action view to collapse
-                        return true;
-                    }
-                });
-        // END_INCLUDE(action_expand_listener)
-
-        // BEGIN_INCLUDE(query_text_listener)
-        // We now set a OnQueryTextListener so we are notified when the query has changed
-        searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
-            @Override
-            public boolean onQueryTextSubmit(String s) {
-                // Propagate query to our AppListFragment
-                mAppListFragment.setFilterQuery(s);
-
-                // Return true to signify that we have handled the query submit
-                return true;
-            }
-
-            @Override
-            public boolean onQueryTextChange(String s) {
-                // Propagate query to our AppListFragment
-                mAppListFragment.setFilterQuery(s);
-
-                // Return true to signify that we have handled the query change
-                return true;
-            }
-        });
-        // END_INCLUDE(query_text_listener)
-
-        return super.onPrepareOptionsMenu(menu);
-    }
-}
diff --git a/ui/actionbarcompat/ShareActionProvider/README.txt b/ui/actionbarcompat/ShareActionProvider/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/build.gradle b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/build.gradle
new file mode 100644
index 0000000..8e76487
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/build.gradle
@@ -0,0 +1,11 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+    compile "com.android.support:appcompat-v7:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/AndroidManifest.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..8a5af4f
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/AndroidManifest.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.actionbarcompat.shareactionprovider"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <!--
+        ActionBarCompat provides an Action Bar from API v7 onwards
+    -->
+    <uses-sdk
+        android:minSdkVersion="7"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/Theme.AppCompat"
+        android:allowBackup="true">
+
+        <activity
+            android:name=".MainActivity">
+            <!-- Launcher Intent filter -->
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <!-- ContentProvider which serves files from this application's asset folder -->
+        <provider
+            android:name=".content.AssetProvider"
+            android:authorities="com.example.android.actionbarcompat.shareactionprovider"
+            android:grantUriPermissions="true"
+            android:exported="true" />
+
+    </application>
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_1.jpg b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_1.jpg
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_1.jpg
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_1.jpg
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_2.jpg b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_2.jpg
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_2.jpg
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_2.jpg
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_3.jpg b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_3.jpg
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_3.jpg
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_3.jpg
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/sample_main.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/sample_main.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/activity_main.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_image.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_image.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_image.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_image.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_text.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_text.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_text.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_text.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/menu/main_menu.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/menu/main_menu.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/menu/main_menu.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/menu/main_menu.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/values/strings.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/values/strings.xml
new file mode 100644
index 0000000..d2b7ef8
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/values/strings.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+<resources>
+
+    <string name="app_name">ABC ShareActionProvider</string>
+    <string name="intro_message">This sample demonstrates how to show a
+        <i>ShareActionProvider</i>, updated for the selected content.</string>
+    <string name="menu_share">Share</string>
+
+    <string name="quote_1">Expectation is the root of all heartache - William Shakespeare</string>
+    <string name="quote_2">The true sign of intelligence is not knowledge but imagination - Albert
+        Einstein</string>
+    <string name="quote_3">As for me, all I know is that I know nothing - Socrates</string>
+
+</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
new file mode 100644
index 0000000..c651b39
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright (C) 2013 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.actionbarcompat.shareactionprovider;
+
+import com.example.android.actionbarcompat.shareactionprovider.content.ContentItem;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.view.MenuItemCompat;
+import android.support.v4.view.PagerAdapter;
+import android.support.v4.view.ViewPager;
+import android.support.v7.app.ActionBarActivity;
+import android.support.v7.widget.ShareActionProvider;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+/**
+ * This sample shows you how a provide a {@link ShareActionProvider} with ActionBarCompat,
+ * backwards compatible to API v7.
+ * <p>
+ * The sample contains a {@link ViewPager} which displays content of differing types: image and
+ * text. When a new item is selected in the ViewPager, the ShareActionProvider is updated with
+ * a share intent specific to that content.
+ * <p>
+ * This Activity extends from {@link ActionBarActivity}, which provides all of the function
+ * necessary to display a compatible Action Bar on devices running Android v2.1+.
+ */
+public class MainActivity extends ActionBarActivity {
+
+    // The items to be displayed in the ViewPager
+    private final ArrayList<ContentItem> mItems = getSampleContent();
+
+    // Keep reference to the ShareActionProvider from the menu
+    private ShareActionProvider mShareActionProvider;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Set content view (which contains a CheeseListFragment)
+        setContentView(R.layout.activity_main);
+
+        // Retrieve the ViewPager from the content view
+        ViewPager vp = (ViewPager) findViewById(R.id.viewpager);
+
+        // Set an OnPageChangeListener so we are notified when a new item is selected
+        vp.setOnPageChangeListener(mOnPageChangeListener);
+
+        // Finally set the adapter so the ViewPager can display items
+        vp.setAdapter(mPagerAdapter);
+    }
+
+    // BEGIN_INCLUDE(get_sap)
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu resource
+        getMenuInflater().inflate(R.menu.main_menu, menu);
+
+        // Retrieve the share menu item
+        MenuItem shareItem = menu.findItem(R.id.menu_share);
+
+        // Now get the ShareActionProvider from the item
+        mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);
+
+        return super.onCreateOptionsMenu(menu);
+    }
+    // END_INCLUDE(get_sap)
+
+    /**
+     * A PagerAdapter which instantiates views based on the ContentItem's content type.
+     */
+    private final PagerAdapter mPagerAdapter = new PagerAdapter() {
+        LayoutInflater mInflater;
+
+        @Override
+        public int getCount() {
+            return mItems.size();
+        }
+
+        @Override
+        public boolean isViewFromObject(View view, Object o) {
+            return view == o;
+        }
+
+        @Override
+        public void destroyItem(ViewGroup container, int position, Object object) {
+            // Just remove the view from the ViewPager
+            container.removeView((View) object);
+        }
+
+        @Override
+        public Object instantiateItem(ViewGroup container, int position) {
+            // Ensure that the LayoutInflater is instantiated
+            if (mInflater == null) {
+                mInflater = LayoutInflater.from(MainActivity.this);
+            }
+
+            // Get the item for the requested position
+            final ContentItem item = mItems.get(position);
+
+            // The view we need to inflate changes based on the type of content
+            switch (item.contentType) {
+                case ContentItem.CONTENT_TYPE_TEXT: {
+                    // Inflate item layout for text
+                    TextView tv = (TextView) mInflater
+                            .inflate(R.layout.item_text, container, false);
+
+                    // Set text content using it's resource id
+                    tv.setText(item.contentResourceId);
+
+                    // Add the view to the ViewPager
+                    container.addView(tv);
+                    return tv;
+                }
+                case ContentItem.CONTENT_TYPE_IMAGE: {
+                    // Inflate item layout for images
+                    ImageView iv = (ImageView) mInflater
+                            .inflate(R.layout.item_image, container, false);
+
+                    // Load the image from it's content URI
+                    iv.setImageURI(item.getContentUri());
+
+                    // Add the view to the ViewPager
+                    container.addView(iv);
+                    return iv;
+                }
+            }
+
+            return null;
+        }
+    };
+
+    /**
+     * A OnPageChangeListener used to update the ShareActionProvider's share intent when a new item
+     * is selected in the ViewPager.
+     */
+    private final ViewPager.OnPageChangeListener mOnPageChangeListener
+            = new ViewPager.OnPageChangeListener() {
+
+        @Override
+        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
+            // NO-OP
+        }
+
+        @Override
+        public void onPageSelected(int position) {
+            // BEGIN_INCLUDE(update_sap)
+            if (mShareActionProvider != null) {
+                // Get the currently selected item, and retrieve it's share intent
+                ContentItem item = mItems.get(position);
+                Intent shareIntent = item.getShareIntent(MainActivity.this);
+
+                // Now update the ShareActionProvider with the new share intent
+                mShareActionProvider.setShareIntent(shareIntent);
+            }
+            // END_INCLUDE(update_sap)
+        }
+
+        @Override
+        public void onPageScrollStateChanged(int state) {
+            // NO-OP
+        }
+    };
+
+    /**
+     * @return An ArrayList of ContentItem's to be displayed in this sample
+     */
+    static ArrayList<ContentItem> getSampleContent() {
+        ArrayList<ContentItem> items = new ArrayList<ContentItem>();
+
+        items.add(new ContentItem(ContentItem.CONTENT_TYPE_IMAGE, "photo_1.jpg"));
+        items.add(new ContentItem(ContentItem.CONTENT_TYPE_TEXT, R.string.quote_1));
+        items.add(new ContentItem(ContentItem.CONTENT_TYPE_TEXT, R.string.quote_2));
+        items.add(new ContentItem(ContentItem.CONTENT_TYPE_IMAGE, "photo_2.jpg"));
+        items.add(new ContentItem(ContentItem.CONTENT_TYPE_TEXT, R.string.quote_3));
+        items.add(new ContentItem(ContentItem.CONTENT_TYPE_IMAGE, "photo_3.jpg"));
+
+        return items;
+    }
+
+}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
new file mode 100644
index 0000000..09f8003
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2013 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.actionbarcompat.shareactionprovider.content;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.text.TextUtils;
+
+/**
+ * This class encapsulates a content item. Referencing the content's type, and the differing way
+ * to reference the content (asset URI or resource id).
+ */
+public class ContentItem {
+    // Used to signify an image content type
+    public static final int CONTENT_TYPE_IMAGE = 0;
+    // Used to signify a text/string content type
+    public static final int CONTENT_TYPE_TEXT = 1;
+
+    public final int contentType;
+    public final int contentResourceId;
+    public final String contentAssetFilePath;
+
+    /**
+     * Creates a ContentItem with the specified type, referencing a resource id.
+     *
+     * @param type - One of {@link #CONTENT_TYPE_IMAGE} or {@link #CONTENT_TYPE_TEXT}
+     * @param resourceId - Resource ID to use for this item's content
+     */
+    public ContentItem(int type, int resourceId) {
+        contentType = type;
+        contentResourceId = resourceId;
+        contentAssetFilePath = null;
+    }
+
+    /**
+     * Creates a ContentItem with the specified type, referencing an asset file path.
+     *
+     * @param type - One of {@link #CONTENT_TYPE_IMAGE} or {@link #CONTENT_TYPE_TEXT}
+     * @param assetFilePath - File path from the application's asset for this item's content
+     */
+    public ContentItem(int type, String assetFilePath) {
+        contentType = type;
+        contentAssetFilePath = assetFilePath;
+        contentResourceId = 0;
+    }
+
+    /**
+     * @return Uri to the content
+     */
+    public Uri getContentUri() {
+        if (!TextUtils.isEmpty(contentAssetFilePath)) {
+            // If this content has an asset, then return a AssetProvider Uri
+            return Uri.parse("content://" + AssetProvider.CONTENT_URI + "/" + contentAssetFilePath);
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Returns an {@link Intent} which can be used to share this item's content with other
+     * applications.
+     *
+     * @param context - Context to be used for fetching resources if needed
+     * @return Intent to be given to a ShareActionProvider.
+     */
+    public Intent getShareIntent(Context context) {
+        Intent intent = new Intent(Intent.ACTION_SEND);
+
+        switch (contentType) {
+            case CONTENT_TYPE_IMAGE:
+                intent.setType("image/jpg");
+                // Bundle the asset content uri as the EXTRA_STREAM uri
+                intent.putExtra(Intent.EXTRA_STREAM, getContentUri());
+                break;
+
+            case CONTENT_TYPE_TEXT:
+                intent.setType("text/plain");
+                // Get the string resource and bundle it as an intent extra
+                intent.putExtra(Intent.EXTRA_TEXT, context.getString(contentResourceId));
+                break;
+        }
+
+        return intent;
+    }
+
+}
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/.gitignore b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/proguard-project.txt b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/AndroidManifest.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/AndroidManifest.xml
deleted file mode 100644
index be1ed49..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.shareactionprovider"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!--
-        ActionBarCompat provides an Action Bar from API v7 onwards
-    -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
-
-        <activity
-            android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-        <!-- ContentProvider which serves files from this application's asset folder -->
-        <provider
-            android:name=".content.AssetProvider"
-            android:authorities="com.example.android.actionbarcompat.shareactionprovider"
-            android:grantUriPermissions="true"
-            android:exported="true" />
-
-    </application>
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
deleted file mode 100644
index b8cc900..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.shareactionprovider;
-
-import android.content.Intent;
-import android.os.Bundle;
-import android.support.v4.view.MenuItemCompat;
-import android.support.v4.view.PagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.support.v7.app.ActionBarActivity;
-import android.support.v7.widget.ShareActionProvider;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.example.android.actionbarcompat.shareactionprovider.content.ContentItem;
-
-import java.util.ArrayList;
-
-/**
- * This sample shows you how a provide a {@link ShareActionProvider} with ActionBarCompat,
- * backwards compatible to API v7.
- * <p>
- * The sample contains a {@link ViewPager} which displays content of differing types: image and
- * text. When a new item is selected in the ViewPager, the ShareActionProvider is updated with
- * a share intent specific to that content.
- * <p>
- * This Activity extends from {@link ActionBarActivity}, which provides all of the function
- * necessary to display a compatible Action Bar on devices running Android v2.1+.
- */
-public class MainActivity extends ActionBarActivity {
-
-    // The items to be displayed in the ViewPager
-    private final ArrayList<ContentItem> mItems = getSampleContent();
-
-    // Keep reference to the ShareActionProvider from the menu
-    private ShareActionProvider mShareActionProvider;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Set content view (which contains a CheeseListFragment)
-        setContentView(R.layout.sample_main);
-
-        // Retrieve the ViewPager from the content view
-        ViewPager vp = (ViewPager) findViewById(R.id.viewpager);
-
-        // Set an OnPageChangeListener so we are notified when a new item is selected
-        vp.setOnPageChangeListener(mOnPageChangeListener);
-
-        // Finally set the adapter so the ViewPager can display items
-        vp.setAdapter(mPagerAdapter);
-    }
-
-    // BEGIN_INCLUDE(get_sap)
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu resource
-        getMenuInflater().inflate(R.menu.main_menu, menu);
-
-        // Retrieve the share menu item
-        MenuItem shareItem = menu.findItem(R.id.menu_share);
-
-        // Now get the ShareActionProvider from the item
-        mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);
-
-        return super.onCreateOptionsMenu(menu);
-    }
-    // END_INCLUDE(get_sap)
-
-    /**
-     * A PagerAdapter which instantiates views based on the ContentItem's content type.
-     */
-    private final PagerAdapter mPagerAdapter = new PagerAdapter() {
-        LayoutInflater mInflater;
-
-        @Override
-        public int getCount() {
-            return mItems.size();
-        }
-
-        @Override
-        public boolean isViewFromObject(View view, Object o) {
-            return view == o;
-        }
-
-        @Override
-        public void destroyItem(ViewGroup container, int position, Object object) {
-            // Just remove the view from the ViewPager
-            container.removeView((View) object);
-        }
-
-        @Override
-        public Object instantiateItem(ViewGroup container, int position) {
-            // Ensure that the LayoutInflater is instantiated
-            if (mInflater == null) {
-                mInflater = LayoutInflater.from(MainActivity.this);
-            }
-
-            // Get the item for the requested position
-            final ContentItem item = mItems.get(position);
-
-            // The view we need to inflate changes based on the type of content
-            switch (item.contentType) {
-                case ContentItem.CONTENT_TYPE_TEXT: {
-                    // Inflate item layout for text
-                    TextView tv = (TextView) mInflater
-                            .inflate(R.layout.item_text, container, false);
-
-                    // Set text content using it's resource id
-                    tv.setText(item.contentResourceId);
-
-                    // Add the view to the ViewPager
-                    container.addView(tv);
-                    return tv;
-                }
-                case ContentItem.CONTENT_TYPE_IMAGE: {
-                    // Inflate item layout for images
-                    ImageView iv = (ImageView) mInflater
-                            .inflate(R.layout.item_image, container, false);
-
-                    // Load the image from it's content URI
-                    iv.setImageURI(item.getContentUri());
-
-                    // Add the view to the ViewPager
-                    container.addView(iv);
-                    return iv;
-                }
-            }
-
-            return null;
-        }
-    };
-
-    /**
-     * A OnPageChangeListener used to update the ShareActionProvider's share intent when a new item
-     * is selected in the ViewPager.
-     */
-    private final ViewPager.OnPageChangeListener mOnPageChangeListener
-            = new ViewPager.OnPageChangeListener() {
-
-        @Override
-        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
-            // NO-OP
-        }
-
-        @Override
-        public void onPageSelected(int position) {
-            // BEGIN_INCLUDE(update_sap)
-            if (mShareActionProvider != null) {
-                // Get the currently selected item, and retrieve it's share intent
-                ContentItem item = mItems.get(position);
-                Intent shareIntent = item.getShareIntent(MainActivity.this);
-
-                // Now update the ShareActionProvider with the new share intent
-                mShareActionProvider.setShareIntent(shareIntent);
-            }
-            // END_INCLUDE(update_sap)
-        }
-
-        @Override
-        public void onPageScrollStateChanged(int state) {
-            // NO-OP
-        }
-    };
-
-    /**
-     * @return An ArrayList of ContentItem's to be displayed in this sample
-     */
-    static ArrayList<ContentItem> getSampleContent() {
-        ArrayList<ContentItem> items = new ArrayList<ContentItem>();
-
-        items.add(new ContentItem(ContentItem.CONTENT_TYPE_IMAGE, "photo_1.jpg"));
-        items.add(new ContentItem(ContentItem.CONTENT_TYPE_TEXT, R.string.quote_1));
-        items.add(new ContentItem(ContentItem.CONTENT_TYPE_TEXT, R.string.quote_2));
-        items.add(new ContentItem(ContentItem.CONTENT_TYPE_IMAGE, "photo_2.jpg"));
-        items.add(new ContentItem(ContentItem.CONTENT_TYPE_TEXT, R.string.quote_3));
-        items.add(new ContentItem(ContentItem.CONTENT_TYPE_IMAGE, "photo_3.jpg"));
-
-        return items;
-    }
-
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
deleted file mode 100644
index 756a9e6..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.shareactionprovider.content;
-
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.text.TextUtils;
-
-/**
- * This class encapsulates a content item. Referencing the content's type, and the differing way
- * to reference the content (asset URI or resource id).
- */
-public class ContentItem {
-    // Used to signify an image content type
-    public static final int CONTENT_TYPE_IMAGE = 0;
-    // Used to signify a text/string content type
-    public static final int CONTENT_TYPE_TEXT = 1;
-
-    public final int contentType;
-    public final int contentResourceId;
-    public final String contentAssetFilePath;
-
-    /**
-     * Creates a ContentItem with the specified type, referencing a resource id.
-     *
-     * @param type - One of {@link #CONTENT_TYPE_IMAGE} or {@link #CONTENT_TYPE_TEXT}
-     * @param resourceId - Resource ID to use for this item's content
-     */
-    public ContentItem(int type, int resourceId) {
-        contentType = type;
-        contentResourceId = resourceId;
-        contentAssetFilePath = null;
-    }
-
-    /**
-     * Creates a ContentItem with the specified type, referencing an asset file path.
-     *
-     * @param type - One of {@link #CONTENT_TYPE_IMAGE} or {@link #CONTENT_TYPE_TEXT}
-     * @param assetFilePath - File path from the application's asset for this item's content
-     */
-    public ContentItem(int type, String assetFilePath) {
-        contentType = type;
-        contentAssetFilePath = assetFilePath;
-        contentResourceId = 0;
-    }
-
-    /**
-     * @return Uri to the content
-     */
-    public Uri getContentUri() {
-        if (!TextUtils.isEmpty(contentAssetFilePath)) {
-            // If this content has an asset, then return a AssetProvider Uri
-            return Uri.parse("content://" + AssetProvider.CONTENT_URI + "/" + contentAssetFilePath);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Returns an {@link android.content.Intent} which can be used to share this item's content with other
-     * applications.
-     *
-     * @param context - Context to be used for fetching resources if needed
-     * @return Intent to be given to a ShareActionProvider.
-     */
-    public Intent getShareIntent(Context context) {
-        Intent intent = new Intent(Intent.ACTION_SEND);
-
-        switch (contentType) {
-            case CONTENT_TYPE_IMAGE:
-                intent.setType("image/jpg");
-                // Bundle the asset content uri as the EXTRA_STREAM uri
-                intent.putExtra(Intent.EXTRA_STREAM, getContentUri());
-                break;
-
-            case CONTENT_TYPE_TEXT:
-                intent.setType("text/plain");
-                // Get the string resource and bundle it as an intent extra
-                intent.putExtra(Intent.EXTRA_TEXT, context.getString(contentResourceId));
-                break;
-        }
-
-        return intent;
-    }
-
-}
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/values/strings.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/values/strings.xml
deleted file mode 100644
index 298596f..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-    <string name="menu_share">Share</string>
-    <string name="quote_1">Expectation is the root of all heartache - William Shakespeare</string>
-    <string name="quote_2">The true sign of intelligence is not knowledge but imagination - Albert
-        Einstein</string>
-    <string name="quote_3">As for me, all I know is that I know nothing - Socrates</string>
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/AndroidManifest.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/AndroidManifest.xml
deleted file mode 100644
index c52949c..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.actionbarcompat.shareactionprovider.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.actionbarcompat.shareactionprovider"
-            android:label="Tests for com.example.android.actionbarcompat.shareactionprovider" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/src/com/example/android/actionbarcompat/shareactionprovider/tests/SampleTests.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/src/com/example/android/actionbarcompat/shareactionprovider/tests/SampleTests.java
deleted file mode 100644
index e655bcf..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/src/com/example/android/actionbarcompat/shareactionprovider/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.actionbarcompat.shareactionprovider.tests;
-
-import com.example.android.actionbarcompat.shareactionprovider.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for ShareActionProvider sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private ShareActionProviderFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (ShareActionProviderFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/big_icon.png b/ui/actionbarcompat/ShareActionProvider/big_icon.png
new file mode 100644
index 0000000..7da0b23
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/big_icon.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/build.gradle b/ui/actionbarcompat/ShareActionProvider/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/actionbarcompat/ShareActionProvider/build.gradle
+++ b/ui/actionbarcompat/ShareActionProvider/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/actionbarcompat/ShareActionProvider/buildSrc/build.gradle b/ui/actionbarcompat/ShareActionProvider/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/actionbarcompat/ShareActionProvider/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/actionbarcompat/ShareActionProvider/settings.gradle b/ui/actionbarcompat/ShareActionProvider/settings.gradle
index 92cd602..38418ad 100644
--- a/ui/actionbarcompat/ShareActionProvider/settings.gradle
+++ b/ui/actionbarcompat/ShareActionProvider/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'ShareActionProviderSample'
+include ':ShareActionProvider'
diff --git a/ui/actionbarcompat/ShareActionProvider/template-params.xml b/ui/actionbarcompat/ShareActionProvider/template-params.xml
deleted file mode 100644
index cf6cb88..0000000
--- a/ui/actionbarcompat/ShareActionProvider/template-params.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>ShareActionProvider</name>
-    <group>UI</group>
-    <package>com.example.android.actionbarcompat.shareactionprovider</package>
-
-    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
-
-    <!-- change minSdk if needed-->
-    <minSdk>7</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample shows you how a provide a context-sensitive ShareActionProvider with
-            ActionBarCompat, backwards compatible to API v7.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/ui/actionbarcompat/Styled/README.txt b/ui/actionbarcompat/Styled/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/actionbarcompat/Styled/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/Styled/build.gradle b/ui/actionbarcompat/Styled/Styled/build.gradle
new file mode 100644
index 0000000..8e76487
--- /dev/null
+++ b/ui/actionbarcompat/Styled/Styled/build.gradle
@@ -0,0 +1,11 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+    compile "com.android.support:appcompat-v7:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/AndroidManifest.xml b/ui/actionbarcompat/Styled/Styled/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c51f234
--- /dev/null
+++ b/ui/actionbarcompat/Styled/Styled/src/main/AndroidManifest.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.actionbarcompat.styled"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="7"
+        android:targetSdkVersion="17" />
+
+    <!--
+        Theme is set on the application so that our custom theme is used by
+        default by all Activities
+    -->
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/Theme.Styled" >
+
+        <activity android:name=".MainActivity">
+
+            <!-- Launcher Intent filter -->
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+
+            <!--
+                In this example set the Activity to have a split action bar when the device's
+                display is narrow. In ActionBarCompat this is done by setting the
+                'android.support.UI_OPTIONS' metadata field to 'splitActionBarWhenNarrow'.
+            -->
+            <meta-data
+                android:name="android.support.UI_OPTIONS"
+                android:value="splitActionBarWhenNarrow" />
+
+        </activity>
+    </application>
+
+</manifest>
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_location.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_location.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_refresh.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_settings.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_settings.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/list_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/list_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/list_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/list_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_bg_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_bg_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_bg_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_bg_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_primary_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_primary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_primary_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_primary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_secondary_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_secondary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_secondary_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_secondary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_location.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_location.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_refresh.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_settings.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_settings.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/list_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/list_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/list_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/list_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_bg_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_bg_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_bg_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_bg_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_primary_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_primary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_primary_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_primary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_secondary_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_secondary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_secondary_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_secondary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_location.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_location.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_refresh.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_settings.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_settings.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/list_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/list_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/list_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/list_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_bg_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_bg_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_bg_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_bg_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_primary_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_primary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_primary_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_primary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/pressed_background.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/pressed_background.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/pressed_background.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable/pressed_background.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/progress_horizontal.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/progress_horizontal.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/progress_horizontal.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable/progress_horizontal.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/selectable_background.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/selectable_background.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/selectable_background.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable/selectable_background.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/spinner_background_ab.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/spinner_background_ab.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/spinner_background_ab.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable/spinner_background_ab.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/tab_indicator_ab.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/tab_indicator_ab.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/tab_indicator_ab.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/drawable/tab_indicator_ab.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/layout/sample_main.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/layout/sample_main.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/layout/activity_main.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/menu/main.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/menu/main.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/menu/main.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/menu/main.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/values-v14/styles.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/values-v14/styles.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/values-v14/styles.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/values-v14/styles.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/colors.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/values/colors.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/values/colors.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/values/colors.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml
new file mode 100644
index 0000000..63c7bb1
--- /dev/null
+++ b/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+<resources>
+
+    <string name="app_name">ABC Styled</string>
+    <string name="menu_refresh">Refresh</string>
+    <string name="menu_location">Location</string>
+    <string name="menu_settings">Settings</string>
+    <string name="main_description">This is a basic Activity showing an Action Bar which has been
+        styled.
+    </string>
+
+</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/styles.xml b/ui/actionbarcompat/Styled/Styled/src/main/res/values/styles.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/StyledSample/src/main/res/values/styles.xml
rename to ui/actionbarcompat/Styled/Styled/src/main/res/values/styles.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/src/com/example/android/actionbarcompat/styled/MainActivity.java b/ui/actionbarcompat/Styled/Styled/src/main/src/com/example/android/actionbarcompat/styled/MainActivity.java
new file mode 100644
index 0000000..c258827
--- /dev/null
+++ b/ui/actionbarcompat/Styled/Styled/src/main/src/com/example/android/actionbarcompat/styled/MainActivity.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2013 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.actionbarcompat.styled;
+
+import android.os.Bundle;
+import android.support.v4.app.FragmentTransaction;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.view.Menu;
+
+/**
+ * This sample shows you how to use ActionBarCompat with a customized theme. It utilizes a split
+ * action bar when running on a device with a narrow display, and show three tabs.
+ *
+ * This Activity extends from {@link ActionBarActivity}, which provides all of the function
+ * necessary to display a compatible Action Bar on devices running Android v2.1+.
+ *
+ * The interesting bits of this sample start in the theme files
+ * ('res/values/styles.xml' and 'res/values-v14</styles.xml').
+ *
+ * Many of the drawables used in this sample were generated with the
+ * 'Android Action Bar Style Generator': http://jgilfelt.github.io/android-actionbarstylegenerator
+ */
+public class MainActivity extends ActionBarActivity implements ActionBar.TabListener {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        // Set the Action Bar to use tabs for navigation
+        ActionBar ab = getSupportActionBar();
+        ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+
+        // Add three tabs to the Action Bar for display
+        ab.addTab(ab.newTab().setText("Tab 1").setTabListener(this));
+        ab.addTab(ab.newTab().setText("Tab 2").setTabListener(this));
+        ab.addTab(ab.newTab().setText("Tab 3").setTabListener(this));
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate menu from menu resource (res/menu/main)
+        getMenuInflater().inflate(R.menu.main, menu);
+
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    // Implemented from ActionBar.TabListener
+    @Override
+    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+        // This is called when a tab is selected.
+    }
+
+    // Implemented from ActionBar.TabListener
+    @Override
+    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+        // This is called when a previously selected tab is unselected.
+    }
+
+    // Implemented from ActionBar.TabListener
+    @Override
+    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+        // This is called when a previously selected tab is selected again.
+    }
+}
diff --git a/ui/actionbarcompat/Styled/StyledSample/.gitignore b/ui/actionbarcompat/Styled/StyledSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/actionbarcompat/Styled/StyledSample/proguard-project.txt b/ui/actionbarcompat/Styled/StyledSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/AndroidManifest.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 06394c7..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.styled"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <!--
-        Theme is set on the application so that our custom theme is used by
-        default by all Activities
-    -->
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.Styled" >
-
-        <activity android:name=".MainActivity">
-
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-
-            <!--
-                In this example set the Activity to have a split action bar when the device's
-                display is narrow. In ActionBarCompat this is done by setting the
-                'android.support.UI_OPTIONS' metadata field to 'splitActionBarWhenNarrow'.
-            -->
-            <meta-data
-                android:name="android.support.UI_OPTIONS"
-                android:value="splitActionBarWhenNarrow" />
-
-        </activity>
-    </application>
-
-</manifest>
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/java/com/example/android/actionbarcompat/styled/MainActivity.java b/ui/actionbarcompat/Styled/StyledSample/src/main/java/com/example/android/actionbarcompat/styled/MainActivity.java
deleted file mode 100644
index 19fe3a1..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/src/main/java/com/example/android/actionbarcompat/styled/MainActivity.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2013 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.actionbarcompat.styled;
-
-import android.os.Bundle;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v7.app.ActionBar;
-import android.support.v7.app.ActionBarActivity;
-import android.view.Menu;
-
-/**
- * This sample shows you how to use ActionBarCompat with a customized theme. It utilizes a split
- * action bar when running on a device with a narrow display, and show three tabs.
- *
- * This Activity extends from {@link ActionBarActivity}, which provides all of the function
- * necessary to display a compatible Action Bar on devices running Android v2.1+.
- *
- * The interesting bits of this sample start in the theme files
- * ('res/values/styles.xml' and 'res/values-v14</styles.xml').
- *
- * Many of the drawables used in this sample were generated with the
- * 'Android Action Bar Style Generator': http://jgilfelt.github.io/android-actionbarstylegenerator
- */
-public class MainActivity extends ActionBarActivity implements ActionBar.TabListener {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        // Set the Action Bar to use tabs for navigation
-        ActionBar ab = getSupportActionBar();
-        ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
-
-        // Add three tabs to the Action Bar for display
-        ab.addTab(ab.newTab().setText("Tab 1").setTabListener(this));
-        ab.addTab(ab.newTab().setText("Tab 2").setTabListener(this));
-        ab.addTab(ab.newTab().setText("Tab 3").setTabListener(this));
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate menu from menu resource (res/menu/main)
-        getMenuInflater().inflate(R.menu.main, menu);
-
-        return super.onCreateOptionsMenu(menu);
-    }
-
-    // Implemented from ActionBar.TabListener
-    @Override
-    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
-        // This is called when a tab is selected.
-    }
-
-    // Implemented from ActionBar.TabListener
-    @Override
-    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
-        // This is called when a previously selected tab is unselected.
-    }
-
-    // Implemented from ActionBar.TabListener
-    @Override
-    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
-        // This is called when a previously selected tab is selected again.
-    }
-}
diff --git a/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/strings.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/strings.xml
deleted file mode 100644
index de698d4..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-<resources>
-
-    <string name="menu_refresh">Refresh</string>
-    <string name="menu_location">Location</string>
-    <string name="menu_settings">Settings</string>
-    <string name="main_description">This is a basic Activity showing an Action Bar which has been
-        styled.
-    </string>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/StyledSample/tests/AndroidManifest.xml b/ui/actionbarcompat/Styled/StyledSample/tests/AndroidManifest.xml
deleted file mode 100644
index a990607..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.actionbarcompat.styled.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.actionbarcompat.styled"
-            android:label="Tests for com.example.android.actionbarcompat.styled" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/StyledSample/tests/src/com/example/android/actionbarcompat/styled/tests/SampleTests.java b/ui/actionbarcompat/Styled/StyledSample/tests/src/com/example/android/actionbarcompat/styled/tests/SampleTests.java
deleted file mode 100644
index 204afdc..0000000
--- a/ui/actionbarcompat/Styled/StyledSample/tests/src/com/example/android/actionbarcompat/styled/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.actionbarcompat.styled.tests;
-
-import com.example.android.actionbarcompat.styled.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for Styled sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private StyledFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (StyledFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/build.gradle b/ui/actionbarcompat/Styled/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/actionbarcompat/Styled/build.gradle
+++ b/ui/actionbarcompat/Styled/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/actionbarcompat/Styled/buildSrc/build.gradle b/ui/actionbarcompat/Styled/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/actionbarcompat/Styled/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/actionbarcompat/Styled/settings.gradle b/ui/actionbarcompat/Styled/settings.gradle
index 3e32af4..a515427 100644
--- a/ui/actionbarcompat/Styled/settings.gradle
+++ b/ui/actionbarcompat/Styled/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'StyledSample'
+include ':Styled'
diff --git a/ui/actionbarcompat/Styled/template-params.xml b/ui/actionbarcompat/Styled/template-params.xml
deleted file mode 100644
index 33577f0..0000000
--- a/ui/actionbarcompat/Styled/template-params.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>Styled</name>
-    <group>UI</group>
-    <package>com.example.android.actionbarcompat.styled</package>
-
-    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
-
-    <!-- change minSdk if needed-->
-    <minSdk>7</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample shows you how to use ActionBarCompat with a customized theme. It utilizes a
-            split action bar when running on a device with a narrow display, and show three tabs.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/build.gradle b/ui/holo/BorderlessButtons/BorderlessButtons/build.gradle
new file mode 100644
index 0000000..945e1f5
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/build.gradle
@@ -0,0 +1,6 @@
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/AndroidManifest.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/AndroidManifest.xml
old mode 100644
new mode 100755
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/AndroidManifest.xml
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/AndroidManifest.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/big_icon.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/big_icon.png
new file mode 100644
index 0000000..a8b32a9
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/big_icon.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/java/com/example/android/borderlessbuttons/MainActivity.java b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
new file mode 100755
index 0000000..9f27997
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2013 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.borderlessbuttons;
+
+import android.app.ListActivity;
+import android.content.ActivityNotFoundException;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.Toast;
+
+/**
+ * This activity demonstrates the <b>borderless button</b> styling from the Holo visual language.
+ * The most interesting bits in this sample are in the layout files (res/layout/).
+ * <p>
+ * See <a href="http://developer.android.com/design/building-blocks/buttons.html#borderless">
+ * borderless buttons</a> at the Android Design guide for a discussion of this visual style.
+ */
+public class MainActivity extends ListActivity {
+    private static final Uri DOCS_URI = Uri.parse(
+            "http://developer.android.com/design/building-blocks/buttons.html#borderless");
+
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        setListAdapter(mListAdapter);
+
+        findViewById(R.id.cancel_button).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                finish();
+            }
+        });
+
+        findViewById(R.id.ok_button).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                finish();
+            }
+        });
+    }
+
+    private BaseAdapter mListAdapter = new BaseAdapter() {
+        @Override
+        public int getCount() {
+            return 10;
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return null;
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return position + 1;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup container) {
+            if (convertView == null) {
+                convertView = getLayoutInflater().inflate(R.layout.list_item, container, false);
+            }
+
+            // Because the list item contains multiple touch targets, you should not override
+            // onListItemClick. Instead, set a click listener for each target individually.
+
+            convertView.findViewById(R.id.primary_target).setOnClickListener(
+                    new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            Toast.makeText(MainActivity.this,
+                                    R.string.touched_primary_message,
+                                    Toast.LENGTH_SHORT).show();
+                        }
+                    });
+
+            convertView.findViewById(R.id.secondary_action).setOnClickListener(
+                    new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            Toast.makeText(MainActivity.this,
+                                    R.string.touched_secondary_message,
+                                    Toast.LENGTH_SHORT).show();
+                        }
+                    });
+            return convertView;
+        }
+    };
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+        getMenuInflater().inflate(R.menu.main, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.docs_link:
+                try {
+                    startActivity(new Intent(Intent.ACTION_VIEW, DOCS_URI));
+                } catch (ActivityNotFoundException ignored) {
+                }
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+}
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_action_delete.png
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_action_delete.png
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..05591fd
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_action_delete.png
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_action_delete.png
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..ed81674
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_action_delete.png
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_action_delete.png
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..0fef898
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..cccd5d4
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/sample_main.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/sample_main.xml
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/activity_main.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/list_item.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/list_item.xml
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/list_item.xml
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/list_item.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/menu/main.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/menu/main.xml
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/menu/main.xml
rename to ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/menu/main.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..0e00174
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,21 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <dimen name="page_margin">@dimen/margin_huge</dimen>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..9ce5eb3
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml
@@ -0,0 +1,29 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <style name="Widget.DescriptionBar">
+        <item name="android:background">#fb3</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/page_margin</item>
+        <item name="android:paddingRight">@dimen/page_margin</item>
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
+    </style>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/dimens.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..be5bb40
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/dimens.xml
@@ -0,0 +1,33 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_tiny">4dp</dimen>
+    <dimen name="margin_small">8dp</dimen>
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_large">32dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+    <dimen name="standard_touch_target_size">48dp</dimen>
+
+    <!-- Meta-dimension that switches on screen size -->
+
+    <dimen name="page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/strings.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/strings.xml
new file mode 100755
index 0000000..c685088
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/strings.xml
@@ -0,0 +1,33 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Borderless Buttons</string>
+    <string name="intro_message">This sample demonstrates the use of <b>borderless buttons</b>, <b>bottom button bars</b> (<i>OK</i> and <i>Cancel</i>) and <b>dividers</b> to establish visual structure.</string>
+
+    <string name="cancel">Cancel</string>
+    <string name="ok">OK</string>
+
+    <string name="dummy_title">Dummy title</string>
+    <string name="dummy_subtitle">Dummy subtitle</string>
+
+    <string name="delete_content_description">Delete</string>
+
+    <string name="touched_primary_message">Touched primary list item target.</string>
+    <string name="touched_secondary_message">Touched secondary list item target (delete).</string>
+
+    <string name="docs_link_title">Design docs: borderless buttons</string>
+</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/styles.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/styles.xml
new file mode 100644
index 0000000..469816c
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.DescriptionBar">
+        <item name="android:background">#fb3</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/page_margin</item>
+        <item name="android:paddingRight">@dimen/page_margin</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/.gitignore b/ui/holo/BorderlessButtons/BorderlessButtonsSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/proguard-project.txt b/ui/holo/BorderlessButtons/BorderlessButtonsSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/java/com/example/android/borderlessbuttons/MainActivity.java b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
deleted file mode 100755
index 04105f4..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2013 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.borderlessbuttons;
-
-import android.app.ListActivity;
-import android.content.ActivityNotFoundException;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.Toast;
-
-/**
- * This activity demonstrates the <b>borderless button</b> styling from the Holo visual language.
- * The most interesting bits in this sample are in the layout files (res/layout/).
- * <p>
- * See <a href="http://developer.android.com/design/building-blocks/buttons.html#borderless">
- * borderless buttons</a> at the Android Design guide for a discussion of this visual style.
- */
-public class MainActivity extends ListActivity {
-    private static final Uri DOCS_URI = Uri.parse(
-            "http://developer.android.com/design/building-blocks/buttons.html#borderless");
-
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        setListAdapter(mListAdapter);
-
-        findViewById(R.id.cancel_button).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                finish();
-            }
-        });
-
-        findViewById(R.id.ok_button).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                finish();
-            }
-        });
-    }
-
-    private BaseAdapter mListAdapter = new BaseAdapter() {
-        @Override
-        public int getCount() {
-            return 10;
-        }
-
-        @Override
-        public Object getItem(int position) {
-            return null;
-        }
-
-        @Override
-        public long getItemId(int position) {
-            return position + 1;
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup container) {
-            if (convertView == null) {
-                convertView = getLayoutInflater().inflate(R.layout.list_item, container, false);
-            }
-
-            // Because the list item contains multiple touch targets, you should not override
-            // onListItemClick. Instead, set a click listener for each target individually.
-
-            convertView.findViewById(R.id.primary_target).setOnClickListener(
-                    new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            Toast.makeText(MainActivity.this,
-                                    R.string.touched_primary_message,
-                                    Toast.LENGTH_SHORT).show();
-                        }
-                    });
-
-            convertView.findViewById(R.id.secondary_action).setOnClickListener(
-                    new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            Toast.makeText(MainActivity.this,
-                                    R.string.touched_secondary_message,
-                                    Toast.LENGTH_SHORT).show();
-                        }
-                    });
-            return convertView;
-        }
-    };
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-        getMenuInflater().inflate(R.menu.main, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.docs_link:
-                try {
-                    startActivity(new Intent(Intent.ACTION_VIEW, DOCS_URI));
-                } catch (ActivityNotFoundException ignored) {
-                }
-                return true;
-        }
-        return super.onOptionsItemSelected(item);
-    }
-}
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/dimens.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/dimens.xml
deleted file mode 100644
index 71a1fc7..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-
-    <dimen name="standard_touch_target_size">48dp</dimen>
-
-    <!-- Meta-dimension that switches on screen size -->
-
-    <dimen name="page_margin">@dimen/margin_medium</dimen>
-
-</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/strings.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/strings.xml
deleted file mode 100755
index fb141d2..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <string name="cancel">Cancel</string>
-    <string name="ok">OK</string>
-
-    <string name="dummy_title">Dummy title</string>
-    <string name="dummy_subtitle">Dummy subtitle</string>
-
-    <string name="delete_content_description">Delete</string>
-
-    <string name="touched_primary_message">Touched primary list item target.</string>
-    <string name="touched_secondary_message">Touched secondary list item target (delete).</string>
-
-    <string name="docs_link_title">Design docs: borderless buttons</string>
-</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/styles.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/styles.xml
deleted file mode 100644
index 36e0445..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-
-    <!-- Widget styling -->
-
-    <style name="Widget.DescriptionBar">
-        <item name="android:background">#fb3</item>
-        <item name="android:paddingTop">@dimen/margin_medium</item>
-        <item name="android:paddingBottom">@dimen/margin_medium</item>
-        <item name="android:paddingLeft">@dimen/page_margin</item>
-        <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-</resources>
diff --git a/ui/holo/BorderlessButtons/README.txt b/ui/holo/BorderlessButtons/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/holo/BorderlessButtons/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/holo/BorderlessButtons/build.gradle b/ui/holo/BorderlessButtons/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/holo/BorderlessButtons/build.gradle
+++ b/ui/holo/BorderlessButtons/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/holo/BorderlessButtons/buildSrc/build.gradle b/ui/holo/BorderlessButtons/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/holo/BorderlessButtons/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties b/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/holo/BorderlessButtons/settings.gradle b/ui/holo/BorderlessButtons/settings.gradle
index f5220c4..d543498 100644
--- a/ui/holo/BorderlessButtons/settings.gradle
+++ b/ui/holo/BorderlessButtons/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BorderlessButtonsSample'
+include ':BorderlessButtons'
diff --git a/ui/holo/BorderlessButtons/template-params.xml b/ui/holo/BorderlessButtons/template-params.xml
deleted file mode 100644
index c0d9aeb..0000000
--- a/ui/holo/BorderlessButtons/template-params.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BorderlessButtons</name>
-    <group>UI</group>
-    <package>com.example.android.borderlessbuttons</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>14</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                This sample demonstrates the use of borderless buttons, bottom button bars
-                (OK and Cancel) and dividers to establish visual structure.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/build.gradle b/ui/lists/CustomChoiceList/CustomChoiceList/build.gradle
new file mode 100644
index 0000000..6083faa
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/build.gradle
@@ -0,0 +1,7 @@
+
+apply plugin: 'android'
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/AndroidManifest.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/AndroidManifest.xml
old mode 100644
new mode 100755
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/AndroidManifest.xml
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/AndroidManifest.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
new file mode 100644
index 0000000..97be8cb
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2013 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.customchoicelist;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+import android.widget.Checkable;
+import android.widget.LinearLayout;
+
+/**
+ * This is a simple wrapper for {@link LinearLayout} that implements the {@link Checkable}
+ * interface by keeping an internal 'checked' state flag.
+ * <p>
+ * This can be used as the root view for a custom list item layout for
+ * {@link android.widget.AbsListView} elements with a
+ * {@link android.widget.AbsListView#setChoiceMode(int) choiceMode} set.
+ */
+public class CheckableLinearLayout extends LinearLayout implements Checkable {
+    private static final int[] CHECKED_STATE_SET = {android.R.attr.state_checked};
+
+    private boolean mChecked = false;
+
+    public CheckableLinearLayout(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+
+    public boolean isChecked() {
+        return mChecked;
+    }
+
+    public void setChecked(boolean b) {
+        if (b != mChecked) {
+            mChecked = b;
+            refreshDrawableState();
+        }
+    }
+
+    public void toggle() {
+        setChecked(!mChecked);
+    }
+
+    @Override
+    public int[] onCreateDrawableState(int extraSpace) {
+        final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
+        if (isChecked()) {
+            mergeDrawableStates(drawableState, CHECKED_STATE_SET);
+        }
+        return drawableState;
+    }
+}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/Cheeses.java b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/Cheeses.java
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/Cheeses.java
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/Cheeses.java
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/MainActivity.java b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/MainActivity.java
new file mode 100755
index 0000000..e27ff97
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/MainActivity.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2013 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.customchoicelist;
+
+import android.app.ListActivity;
+import android.os.Bundle;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+/**
+ * This sample demonstrates how to create custom single- or multi-choice
+ * {@link android.widget.ListView} UIs. The most interesting bits are in
+ * the <code>res/layout/</code> directory of this sample.
+ */
+public class MainActivity extends ListActivity {
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+        setListAdapter(new MyAdapter());
+    }
+
+    /**
+     * A simple array adapter that creates a list of cheeses.
+     */
+    private class MyAdapter extends BaseAdapter {
+        @Override
+        public int getCount() {
+            return Cheeses.CHEESES.length;
+        }
+
+        @Override
+        public String getItem(int position) {
+            return Cheeses.CHEESES[position];
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return Cheeses.CHEESES[position].hashCode();
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup container) {
+            if (convertView == null) {
+                convertView = getLayoutInflater().inflate(R.layout.list_item, container, false);
+            }
+
+            ((TextView) convertView.findViewById(android.R.id.text1))
+                    .setText(getItem(position));
+            return convertView;
+        }
+    }
+}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/color/hideable_text_color.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/color/hideable_text_color.xml
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/color/hideable_text_color.xml
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/color/hideable_text_color.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable/ic_hideable_item.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable/ic_hideable_item.xml
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable/ic_hideable_item.xml
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable/ic_hideable_item.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/sample_main.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/sample_main.xml
rename to ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/activity_main.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/list_item.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/list_item.xml
new file mode 100644
index 0000000..ecbd63d
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/list_item.xml
@@ -0,0 +1,62 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<!--
+    The ListView from activity_main.xml has a choiceMode set, meaning that when a user
+    selects a list item, the ListView will set the state for that item's root view
+    (this CheckableLinearLayout) to "checked". Note that this requires that the root view
+    implements the Checkable interface. Once the root view is checked, any children that
+    have the duplicateParentState attribute set will inherit this "checked" state.
+-->
+<com.example.android.customchoicelist.CheckableLinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingLeft="8dp"
+    android:paddingRight="8dp"
+    android:minHeight="?android:listPreferredItemHeight"
+    android:gravity="center_vertical">
+
+    <!--
+        The duplicateParentState attribute on this TextView, along with the color state list
+        used in the textColor attribute causes its text color to change when its parent
+        is checked or unchecked.
+    -->
+    <TextView android:id="@android:id/text1"
+        android:duplicateParentState="true"
+        android:layout_width="0dp"
+        android:layout_weight="1"
+        android:layout_height="wrap_content"
+        android:textAppearance="?android:textAppearanceMedium"
+        android:textColor="@color/hideable_text_color" />
+
+    <!--
+        The duplicateParentState attribute on this ImageView, along with the state list
+        drawable in the src attribute causes its image to change when its parent
+        is checked or unchecked.
+
+        To use the standard radio or checkmark image, set the src to
+        ?android:listChoiceIndicatorMultiple or ?android:listChoiceIndicatorSingle. These
+        are system theme attributes that reference a state list drawable.
+    -->
+    <ImageView android:src="@drawable/ic_hideable_item"
+        android:duplicateParentState="true"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="16dp" />
+
+</com.example.android.customchoicelist.CheckableLinearLayout>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/dimens.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..0e00174
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,21 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <dimen name="page_margin">@dimen/margin_huge</dimen>
+
+</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..9ce5eb3
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/styles.xml
@@ -0,0 +1,29 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <style name="Widget.DescriptionBar">
+        <item name="android:background">#fb3</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/page_margin</item>
+        <item name="android:paddingRight">@dimen/page_margin</item>
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
+    </style>
+
+</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-v11/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..3dff32a
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-v11/styles.xml
@@ -0,0 +1,21 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+
+</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/dimens.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..8bb8753
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/dimens.xml
@@ -0,0 +1,31 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_tiny">4dp</dimen>
+    <dimen name="margin_small">8dp</dimen>
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_large">32dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+    <!-- Meta-dimension that switches on screen size -->
+
+    <dimen name="page_margin">@dimen/margin_medium</dimen>
+
+</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/strings.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/strings.xml
new file mode 100755
index 0000000..54389e2
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/strings.xml
@@ -0,0 +1,20 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Custom Choice List</string>
+    <string name="intro_message">This sample demonstrates how to create <b>custom checkable layouts</b>, for use with <i>ListView</i>\'s <i>choiceMode</i> attribute.</string>
+</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/styles.xml
new file mode 100644
index 0000000..e0a12d3
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.DescriptionBar">
+        <item name="android:background">#fb3</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/page_margin</item>
+        <item name="android:paddingRight">@dimen/page_margin</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/.gitignore b/ui/lists/CustomChoiceList/CustomChoiceListSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/proguard-project.txt b/ui/lists/CustomChoiceList/CustomChoiceListSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
deleted file mode 100644
index a30eb2a..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2013 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.customchoicelist;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.widget.Checkable;
-import android.widget.LinearLayout;
-
-/**
- * This is a simple wrapper for {@link android.widget.LinearLayout} that implements the {@link android.widget.Checkable}
- * interface by keeping an internal 'checked' state flag.
- * <p>
- * This can be used as the root view for a custom list item layout for
- * {@link android.widget.AbsListView} elements with a
- * {@link android.widget.AbsListView#setChoiceMode(int) choiceMode} set.
- */
-public class CheckableLinearLayout extends LinearLayout implements Checkable {
-    private static final int[] CHECKED_STATE_SET = {android.R.attr.state_checked};
-
-    private boolean mChecked = false;
-
-    public CheckableLinearLayout(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public boolean isChecked() {
-        return mChecked;
-    }
-
-    public void setChecked(boolean b) {
-        if (b != mChecked) {
-            mChecked = b;
-            refreshDrawableState();
-        }
-    }
-
-    public void toggle() {
-        setChecked(!mChecked);
-    }
-
-    @Override
-    public int[] onCreateDrawableState(int extraSpace) {
-        final int[] drawableState = super.onCreateDrawableState(extraSpace + 1);
-        if (isChecked()) {
-            mergeDrawableStates(drawableState, CHECKED_STATE_SET);
-        }
-        return drawableState;
-    }
-}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/MainActivity.java b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/MainActivity.java
deleted file mode 100755
index e4e89f2..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/MainActivity.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2013 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.customchoicelist;
-
-import android.app.ListActivity;
-import android.os.Bundle;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.BaseAdapter;
-import android.widget.TextView;
-
-/**
- * This sample demonstrates how to create custom single- or multi-choice
- * {@link android.widget.ListView} UIs. The most interesting bits are in
- * the <code>res/layout/</code> directory of this sample.
- */
-public class MainActivity extends ListActivity {
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-        setListAdapter(new MyAdapter());
-    }
-
-    /**
-     * A simple array adapter that creates a list of cheeses.
-     */
-    private class MyAdapter extends BaseAdapter {
-        @Override
-        public int getCount() {
-            return Cheeses.CHEESES.length;
-        }
-
-        @Override
-        public String getItem(int position) {
-            return Cheeses.CHEESES[position];
-        }
-
-        @Override
-        public long getItemId(int position) {
-            return Cheeses.CHEESES[position].hashCode();
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup container) {
-            if (convertView == null) {
-                convertView = getLayoutInflater().inflate(R.layout.list_item, container, false);
-            }
-
-            ((TextView) convertView.findViewById(android.R.id.text1))
-                    .setText(getItem(position));
-            return convertView;
-        }
-    }
-}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/list_item.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/list_item.xml
deleted file mode 100644
index 09a17ed..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/list_item.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<!--
-    The ListView from sample_main.xml has a choiceMode set, meaning that when a user
-    selects a list item, the ListView will set the state for that item's root view
-    (this CheckableLinearLayout) to "checked". Note that this requires that the root view
-    implements the Checkable interface. Once the root view is checked, any children that
-    have the duplicateParentState attribute set will inherit this "checked" state.
--->
-<com.example.android.customchoicelist.CheckableLinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingLeft="8dp"
-    android:paddingRight="8dp"
-    android:minHeight="?android:listPreferredItemHeight"
-    android:gravity="center_vertical">
-
-    <!--
-        The duplicateParentState attribute on this TextView, along with the color state list
-        used in the textColor attribute causes its text color to change when its parent
-        is checked or unchecked.
-    -->
-    <TextView android:id="@android:id/text1"
-        android:duplicateParentState="true"
-        android:layout_width="0dp"
-        android:layout_weight="1"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:textAppearanceMedium"
-        android:textColor="@color/hideable_text_color" />
-
-    <!--
-        The duplicateParentState attribute on this ImageView, along with the state list
-        drawable in the src attribute causes its image to change when its parent
-        is checked or unchecked.
-
-        To use the standard radio or checkmark image, set the src to
-        ?android:listChoiceIndicatorMultiple or ?android:listChoiceIndicatorSingle. These
-        are system theme attributes that reference a state list drawable.
-    -->
-    <ImageView android:src="@drawable/ic_hideable_item"
-        android:duplicateParentState="true"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="16dp" />
-
-</com.example.android.customchoicelist.CheckableLinearLayout>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/dimens.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/dimens.xml
deleted file mode 100644
index c22027e..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-
-    <!-- Meta-dimension that switches on screen size -->
-
-    <dimen name="page_margin">@dimen/margin_medium</dimen>
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/styles.xml
deleted file mode 100644
index 0851a81..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  Copyright 2013 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.
-  -->
-
-<resources>
-    <style name="Widget.DescriptionBar">
-        <item name="android:background">#fb3</item>
-        <item name="android:paddingTop">@dimen/margin_medium</item>
-        <item name="android:paddingBottom">@dimen/margin_medium</item>
-        <item name="android:paddingLeft">@dimen/page_margin</item>
-        <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/README.txt b/ui/lists/CustomChoiceList/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/lists/CustomChoiceList/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/lists/CustomChoiceList/build.gradle b/ui/lists/CustomChoiceList/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/lists/CustomChoiceList/build.gradle
+++ b/ui/lists/CustomChoiceList/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/lists/CustomChoiceList/buildSrc/build.gradle b/ui/lists/CustomChoiceList/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/lists/CustomChoiceList/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties b/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/lists/CustomChoiceList/settings.gradle b/ui/lists/CustomChoiceList/settings.gradle
index 6d876cf..0c9c7b4 100644
--- a/ui/lists/CustomChoiceList/settings.gradle
+++ b/ui/lists/CustomChoiceList/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'CustomChoiceListSample'
+include ':CustomChoiceList'
diff --git a/ui/lists/CustomChoiceList/template-params.xml b/ui/lists/CustomChoiceList/template-params.xml
deleted file mode 100644
index b58c0ac..0000000
--- a/ui/lists/CustomChoiceList/template-params.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>CustomChoiceList</name>
-    <group>UI</group>
-    <package>com.example.android.customchoicelist</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>3</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                This sample demonstrates how to create custom checkable layouts, for use with ListView\'s choiceMode
-                attribute.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/build.gradle b/ui/notifications/BasicNotifications/BasicNotifications/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..5193ae6
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.example.android.basicnotifications"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+        android:minSdkVersion="8"
+        android:targetSdkVersion="17"/>
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme">
+        <activity
+            android:name=".MainActivity"
+            android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png
new file mode 100644
index 0000000..38a25ae
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java b/ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java
new file mode 100644
index 0000000..50ac798
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java
@@ -0,0 +1,101 @@
+package com.example.android.basicnotifications;
+
+import android.app.Activity;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v4.app.NotificationCompat;
+import android.view.View;
+
+/**
+ * The entry point to the BasicNotification sample.
+ */
+public class MainActivity extends Activity {
+    /**
+     * A numeric value that identifies the notification that we'll be sending.
+     * This value needs to be unique within this app, but it doesn't need to be
+     * unique system-wide.
+     */
+    public static final int NOTIFICATION_ID = 1;
+
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.main_layout);
+
+    }
+
+    /**
+     * Send a sample notification using the NotificationCompat API.
+     */
+    public void sendNotification(View view) {
+
+        // BEGIN_INCLUDE(build_action)
+        /** Create an intent that will be fired when the user clicks the notification.
+         * The intent needs to be packaged into a {@link android.app.PendingIntent} so that the
+         * notification service can fire it on our behalf.
+         */
+        Intent intent = new Intent(Intent.ACTION_VIEW,
+                Uri.parse("http://developer.android.com/reference/android/app/Notification.html"));
+        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
+        // END_INCLUDE(build_action)
+
+        // BEGIN_INCLUDE (build_notification)
+        /**
+         * Use NotificationCompat.Builder to set up our notification.
+         */
+        NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
+
+        /** Set the icon that will appear in the notification bar. This icon also appears
+         * in the lower right hand corner of the notification itself.
+         *
+         * Important note: although you can use any drawable as the small icon, Android
+         * design guidelines state that the icon should be simple and monochrome. Full-color
+         * bitmaps or busy images don't render well on smaller screens and can end up
+         * confusing the user.
+         */
+        builder.setSmallIcon(R.drawable.ic_stat_notification);
+
+        // Set the intent that will fire when the user taps the notification.
+        builder.setContentIntent(pendingIntent);
+
+        // Set the notification to auto-cancel. This means that the notification will disappear
+        // after the user taps it, rather than remaining until it's explicitly dismissed.
+        builder.setAutoCancel(true);
+
+        /**
+         *Build the notification's appearance.
+         * Set the large icon, which appears on the left of the notification. In this
+         * sample we'll set the large icon to be the same as our app icon. The app icon is a
+         * reasonable default if you don't have anything more compelling to use as an icon.
+         */
+        builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));
+
+        /**
+         * Set the text of the notification. This sample sets the three most commononly used
+         * text areas:
+         * 1. The content title, which appears in large type at the top of the notification
+         * 2. The content text, which appears in smaller text below the title
+         * 3. The subtext, which appears under the text on newer devices. Devices running
+         *    versions of Android prior to 4.2 will ignore this field, so don't use it for
+         *    anything vital!
+         */
+        builder.setContentTitle("BasicNotifications Sample");
+        builder.setContentText("Time to learn about notifications!");
+        builder.setSubText("Tap to view documentation about notifications.");
+
+        // END_INCLUDE (build_notification)
+
+        // BEGIN_INCLUDE(send_notification)
+        /**
+         * Send the notification. This will immediately display the notification icon in the
+         * notification bar.
+         */
+        NotificationManager notificationManager = (NotificationManager) getSystemService(
+                NOTIFICATION_SERVICE);
+        notificationManager.notify(NOTIFICATION_ID, builder.build());
+        // END_INCLUDE(send_notification)
+    }
+}
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/layout/sample_layout.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/layout/main_layout.xml
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/layout/sample_layout.xml
rename to ui/notifications/BasicNotifications/BasicNotifications/src/main/res/layout/main_layout.xml
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..a55cffb
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/styles.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..e010230
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml
new file mode 100644
index 0000000..d9300ef
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+<resources>
+
+    <string name="app_name">Basic Notifications</string>
+    <string name="description">
+        Tap the button below to send a notification.\n\nThe notification\'s icon will immediately
+        appear in the notification bar. Drag the notification bar open to see the full
+        notification. Depending on which version of Android you\'re running, the full
+        notification will display an icon and two or three lines of text.
+        \n\nTap the notification to execute the notification\'s \"action,\" which is an intent
+        that we associate with the notification when it\'s created. This sample notification\'s
+        action is to send a browse intent with the url of the Notification docs on
+        developer.android.com.
+        \n\nThis sample uses the NotificationCompat API for maximum compatibility with versions
+        of Android from Froyo (Android 2.2) to the present. Try it on devices or AVDs that are
+        running different versions of Android. You\'ll see that while the presentation varies
+        slightly, the basic functionality is the same. NotificationCompat automatically takes
+        advantage of the expanded notification format in newer versions of Android, and
+        falls back gracefully to a reduced set of functionality on earlier versions.
+    </string>
+
+</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml
new file mode 100644
index 0000000..916d51a
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright 2013 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.
+-->
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+
+</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore b/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/proguard-project.txt b/ui/notifications/BasicNotifications/BasicNotificationsSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 1e37d0b..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicnotifications"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk
-        android:minSdkVersion="8"
-        android:targetSdkVersion="17"/>
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme">
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
-                <category android:name="android.intent.category.LAUNCHER"/>
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
deleted file mode 100644
index 3e78c34..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.example.android.basicnotifications;
-
-import android.app.Activity;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.Intent;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.os.Bundle;
-import android.support.v4.app.NotificationCompat;
-import android.view.View;
-
-/**
- * The entry point to the BasicNotification sample.
- */
-public class MainActivity extends Activity {
-    /**
-     * A numeric value that identifies the notification that we'll be sending.
-     * This value needs to be unique within this app, but it doesn't need to be
-     * unique system-wide.
-     */
-    public static final int NOTIFICATION_ID = 1;
-
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_layout);
-
-    }
-
-    /**
-     * Send a sample notification using the NotificationCompat API.
-     */
-    public void sendNotification(View view) {
-
-        // BEGIN_INCLUDE(build_action)
-        /** Create an intent that will be fired when the user clicks the notification.
-         * The intent needs to be packaged into a {@link android.app.PendingIntent} so that the
-         * notification service can fire it on our behalf.
-         */
-        Intent intent = new Intent(Intent.ACTION_VIEW,
-                Uri.parse("http://developer.android.com/reference/android/app/Notification.html"));
-        PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
-        // END_INCLUDE(build_action)
-
-        // BEGIN_INCLUDE (build_notification)
-        /**
-         * Use NotificationCompat.Builder to set up our notification.
-         */
-        NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
-
-        /** Set the icon that will appear in the notification bar. This icon also appears
-         * in the lower right hand corner of the notification itself.
-         *
-         * Important note: although you can use any drawable as the small icon, Android
-         * design guidelines state that the icon should be simple and monochrome. Full-color
-         * bitmaps or busy images don't render well on smaller screens and can end up
-         * confusing the user.
-         */
-        builder.setSmallIcon(R.drawable.ic_stat_notification);
-
-        // Set the intent that will fire when the user taps the notification.
-        builder.setContentIntent(pendingIntent);
-
-        // Set the notification to auto-cancel. This means that the notification will disappear
-        // after the user taps it, rather than remaining until it's explicitly dismissed.
-        builder.setAutoCancel(true);
-
-        /**
-         *Build the notification's appearance.
-         * Set the large icon, which appears on the left of the notification. In this
-         * sample we'll set the large icon to be the same as our app icon. The app icon is a
-         * reasonable default if you don't have anything more compelling to use as an icon.
-         */
-        builder.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));
-
-        /**
-         * Set the text of the notification. This sample sets the three most commononly used
-         * text areas:
-         * 1. The content title, which appears in large type at the top of the notification
-         * 2. The content text, which appears in smaller text below the title
-         * 3. The subtext, which appears under the text on newer devices. Devices running
-         *    versions of Android prior to 4.2 will ignore this field, so don't use it for
-         *    anything vital!
-         */
-        builder.setContentTitle("BasicNotifications Sample");
-        builder.setContentText("Time to learn about notifications!");
-        builder.setSubText("Tap to view documentation about notifications.");
-
-        // END_INCLUDE (build_notification)
-
-        // BEGIN_INCLUDE(send_notification)
-        /**
-         * Send the notification. This will immediately display the notification icon in the
-         * notification bar.
-         */
-        NotificationManager notificationManager = (NotificationManager) getSystemService(
-                NOTIFICATION_SERVICE);
-        notificationManager.notify(NOTIFICATION_ID, builder.build());
-        // END_INCLUDE(send_notification)
-    }
-}
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
deleted file mode 100644
index 075f681..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-Copyright 2013 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.
--->
-<resources>
-
-    <string name="description">
-        Tap the button below to send a notification.\n\nThe notification\'s icon will immediately
-        appear in the notification bar. Drag the notification bar open to see the full
-        notification. Depending on which version of Android you\'re running, the full
-        notification will display an icon and two or three lines of text.
-        \n\nTap the notification to execute the notification\'s \"action,\" which is an intent
-        that we associate with the notification when it\'s created. This sample notification\'s
-        action is to send a browse intent with the url of the Notification docs on
-        developer.android.com.
-        \n\nThis sample uses the NotificationCompat API for maximum compatibility with versions
-        of Android from Froyo (Android 2.2) to the present. Try it on devices or AVDs that are
-        running different versions of Android. You\'ll see that while the presentation varies
-        slightly, the basic functionality is the same. NotificationCompat automatically takes
-        advantage of the expanded notification format in newer versions of Android, and
-        falls back gracefully to a reduced set of functionality on earlier versions.
-    </string>
-
-</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml
deleted file mode 100644
index 62c01e8..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicnotifications.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicnotifications"
-            android:label="Tests for com.example.android.basicnotifications" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java
deleted file mode 100644
index ffe5840..0000000
--- a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.basicnotifications.tests;
-
-import com.example.android.basicnotifications.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for BasicNotifications sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicNotificationsFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicNotificationsFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/README.txt b/ui/notifications/BasicNotifications/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/notifications/BasicNotifications/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/build.gradle b/ui/notifications/BasicNotifications/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/notifications/BasicNotifications/build.gradle
+++ b/ui/notifications/BasicNotifications/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/notifications/BasicNotifications/buildSrc/build.gradle b/ui/notifications/BasicNotifications/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/notifications/BasicNotifications/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties b/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/notifications/BasicNotifications/settings.gradle b/ui/notifications/BasicNotifications/settings.gradle
index b33d67f..6f0df94 100644
--- a/ui/notifications/BasicNotifications/settings.gradle
+++ b/ui/notifications/BasicNotifications/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'BasicNotificationsSample'
+include ':BasicNotifications'
diff --git a/ui/notifications/BasicNotifications/template-params.xml b/ui/notifications/BasicNotifications/template-params.xml
deleted file mode 100644
index 7118c24..0000000
--- a/ui/notifications/BasicNotifications/template-params.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<sample>
-    <name>BasicNotifications</name>
-    <group>UI</group>
-    <package>com.example.android.basicnotifications</package>
-    <!-- change minSdk if needed-->
-    <minSdk>8</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates how to display events in the system\'s notification bar. The
-            NotificationCompat API is used for compatibility with older devices, running Android
-            2.2 (Froyo) or newer.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-</sample>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/build.gradle b/ui/notifications/CustomNotifications/CustomNotifications/build.gradle
new file mode 100644
index 0000000..47fc855
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile 'com.android.support:support-v4:18.0.0+'
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..8821b1a
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  * Copyright (C) 2013 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.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.customnotifications"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="4"
+        android:targetSdkVersion="18" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.customnotifications.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java b/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java
new file mode 100644
index 0000000..eae95f1
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2013 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.customnotifications;
+
+import android.app.Activity;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.v4.app.NotificationCompat;
+import android.view.View;
+import android.widget.RemoteViews;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+public class MainActivity extends Activity {
+    /**
+     * This sample demonstrates notifications with custom content views.
+     *
+     * <p>On API level 16 and above a big content view is also defined that is used for the
+     * 'expanded' notification. The notification is created by the NotificationCompat.Builder.
+     * The expanded content view is set directly on the {@link Notification} once it has been build.
+     * (See {@link Notification#bigContentView}.) </p>
+     *
+     * <p>The content views are inflated as {@link RemoteViews} directly from their XML layout
+     * definitions using {@link RemoteViews#RemoteViews(String, int)}.</p>
+     */
+    private void createNotification() {
+        // BEGIN_INCLUDE(notificationCompat)
+        NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
+        // END_INCLUDE(notificationCompat)
+
+        // BEGIN_INCLUDE(intent)
+        //Create Intent to launch this Activity again if the notification is clicked.
+        Intent i = new Intent(this, MainActivity.class);
+        i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        PendingIntent intent = PendingIntent.getActivity(this, 0, i,
+                PendingIntent.FLAG_UPDATE_CURRENT);
+        builder.setContentIntent(intent);
+        // END_INCLUDE(intent)
+
+        // BEGIN_INCLUDE(ticker)
+        // Sets the ticker text
+        builder.setTicker(getResources().getString(R.string.custom_notification));
+
+        // Sets the small icon for the ticker
+        builder.setSmallIcon(R.drawable.ic_stat_custom);
+        // END_INCLUDE(ticker)
+
+        // BEGIN_INCLUDE(buildNotification)
+        // Cancel the notification when clicked
+        builder.setAutoCancel(true);
+
+        // Build the notification
+        Notification notification = builder.build();
+        // END_INCLUDE(buildNotification)
+
+        // BEGIN_INCLUDE(customLayout)
+        // Inflate the notification layout as RemoteViews
+        RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.notification);
+
+        // Set text on a TextView in the RemoteViews programmatically.
+        final String time = DateFormat.getTimeInstance().format(new Date()).toString();
+        final String text = getResources().getString(R.string.collapsed, time);
+        contentView.setTextViewText(R.id.textView, text);
+
+        /* Workaround: Need to set the content view here directly on the notification.
+         * NotificationCompatBuilder contains a bug that prevents this from working on platform
+         * versions HoneyComb.
+         * See https://code.google.com/p/android/issues/detail?id=30495
+         */
+        notification.contentView = contentView;
+
+        // Add a big content view to the notification if supported.
+        // Support for expanded notifications was added in API level 16.
+        // (The normal contentView is shown when the notification is collapsed, when expanded the
+        // big content view set here is displayed.)
+        if (Build.VERSION.SDK_INT >= 16) {
+            // Inflate and set the layout for the expanded notification view
+            RemoteViews expandedView =
+                    new RemoteViews(getPackageName(), R.layout.notification_expanded);
+            notification.bigContentView = expandedView;
+        }
+        // END_INCLUDE(customLayout)
+
+        // START_INCLUDE(notify)
+        // Use the NotificationManager to show the notification
+        NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
+        nm.notify(0, notification);
+        // END_INCLUDE(notify)
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+    }
+
+    /**
+     * Create and show a notification with a custom layout.
+     * This callback is defined through the 'onClick' attribute of the
+     * 'Show Notification' button in the XML layout.
+     *
+     * @param v
+     */
+    public void showNotificationClicked(View v) {
+        createNotification();
+    }
+}
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-mdpi/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/robot.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/robot.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/robot_expanded.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot_expanded.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xhdpi/robot_expanded.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot_expanded.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/sample_main.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/sample_main.xml
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification.xml
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification_expanded.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification_expanded.xml
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..eb7d98a
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,19 @@
+<!--
+  * Copyright (C) 2013 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.
+  -->
+
+<resources>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-sw720dp-land/dimens.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..b454dee
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml
@@ -0,0 +1,26 @@
+<!--
+  * Copyright (C) 2013 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.
+  -->
+
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..1cf1112
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml
@@ -0,0 +1,27 @@
+<!--
+  * Copyright (C) 2013 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.
+  -->
+
+<resources>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-v9/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-v9/styles.xml
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/dimens.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/dimens.xml
rename to ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml
new file mode 100644
index 0000000..3247f39
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  * Copyright (C) 2013 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.
+  -->
+
+<resources>
+
+    <string name="app_name">CustomNotifications</string>
+    <string name="expanded">I\'m the expanded notification.\nCollapse me!</string>
+    <string name="collapsed">I\'m the collapsed notification.\nCreated at: %s</string>
+    <string name="show_notification">Show Notification</string>
+    <string name="custom_notification">I\'m a custom notification.</string>
+
+    <string name="intro_text">This sample demonstrates how a notification is created using the
+        <b>NotificationCompatBuilder</b>
+        with a custom content view. The layout of the notification is defined as a
+        layout resource and inflated as a <b>RemoteViews</b> object.
+        \n\nOn API level 16 and above, a different layout is inflated and set as
+        the <i>big content view</i>, which is used when the notification is expanded.
+        \n\n<b>Use the button below to create the notification.
+        \n\nIf your device is running Jelly Bean or above, try expanding or collapsing
+        the notification to see the different layouts.</b>
+    </string>
+    <string name="collapsed_image">A single Android robot waving. Symbolises a collapsed
+        notification.
+    </string>
+    <string name="expanded_image">Two Androids on top of each other. Symbolises an expanded
+        notification.
+    </string>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml
new file mode 100644
index 0000000..eca4340
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  * Copyright (C) 2013 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.
+  -->
+
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+    <style name="NotificationContent" parent="@android:style/TextAppearance.Small">
+        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+    </style>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/.gitignore b/ui/notifications/CustomNotifications/CustomNotificationsSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/notifications/CustomNotifications/CustomNotificationsSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/proguard-project.txt b/ui/notifications/CustomNotifications/CustomNotificationsSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/notifications/CustomNotifications/CustomNotificationsSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/AndroidManifest.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/AndroidManifest.xml
deleted file mode 100644
index b20a411..0000000
--- a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.customnotifications"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk
-        android:minSdkVersion="4"
-        android:targetSdkVersion="18" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name="com.example.android.customnotifications.MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/java/com/example/android/customnotifications/MainActivity.java b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/java/com/example/android/customnotifications/MainActivity.java
deleted file mode 100644
index 57a4315..0000000
--- a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/java/com/example/android/customnotifications/MainActivity.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (C) 2013 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.customnotifications;
-
-import android.app.Activity;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.Intent;
-import android.os.Build;
-import android.os.Bundle;
-import android.support.v4.app.NotificationCompat;
-import android.view.View;
-import android.widget.RemoteViews;
-
-import java.text.DateFormat;
-import java.util.Date;
-
-public class MainActivity extends Activity {
-    /**
-     * This sample demonstrates notifications with custom content views.
-     *
-     * <p>On API level 16 and above a big content view is also defined that is used for the
-     * 'expanded' notification. The notification is created by the NotificationCompat.Builder.
-     * The expanded content view is set directly on the {@link android.app.Notification} once it has been build.
-     * (See {@link android.app.Notification#bigContentView}.) </p>
-     *
-     * <p>The content views are inflated as {@link android.widget.RemoteViews} directly from their XML layout
-     * definitions using {@link android.widget.RemoteViews#RemoteViews(String, int)}.</p>
-     */
-    private void createNotification() {
-        // BEGIN_INCLUDE(notificationCompat)
-        NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
-        // END_INCLUDE(notificationCompat)
-
-        // BEGIN_INCLUDE(intent)
-        //Create Intent to launch this Activity again if the notification is clicked.
-        Intent i = new Intent(this, MainActivity.class);
-        i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
-        PendingIntent intent = PendingIntent.getActivity(this, 0, i,
-                PendingIntent.FLAG_UPDATE_CURRENT);
-        builder.setContentIntent(intent);
-        // END_INCLUDE(intent)
-
-        // BEGIN_INCLUDE(ticker)
-        // Sets the ticker text
-        builder.setTicker(getResources().getString(R.string.custom_notification));
-
-        // Sets the small icon for the ticker
-        builder.setSmallIcon(R.drawable.ic_stat_custom);
-        // END_INCLUDE(ticker)
-
-        // BEGIN_INCLUDE(buildNotification)
-        // Cancel the notification when clicked
-        builder.setAutoCancel(true);
-
-        // Build the notification
-        Notification notification = builder.build();
-        // END_INCLUDE(buildNotification)
-
-        // BEGIN_INCLUDE(customLayout)
-        // Inflate the notification layout as RemoteViews
-        RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.notification);
-
-        // Set text on a TextView in the RemoteViews programmatically.
-        final String time = DateFormat.getTimeInstance().format(new Date()).toString();
-        final String text = getResources().getString(R.string.collapsed, time);
-        contentView.setTextViewText(R.id.textView, text);
-
-        /* Workaround: Need to set the content view here directly on the notification.
-         * NotificationCompatBuilder contains a bug that prevents this from working on platform
-         * versions HoneyComb.
-         * See https://code.google.com/p/android/issues/detail?id=30495
-         */
-        notification.contentView = contentView;
-
-        // Add a big content view to the notification if supported.
-        // Support for expanded notifications was added in API level 16.
-        // (The normal contentView is shown when the notification is collapsed, when expanded the
-        // big content view set here is displayed.)
-        if (Build.VERSION.SDK_INT >= 16) {
-            // Inflate and set the layout for the expanded notification view
-            RemoteViews expandedView =
-                    new RemoteViews(getPackageName(), R.layout.notification_expanded);
-            notification.bigContentView = expandedView;
-        }
-        // END_INCLUDE(customLayout)
-
-        // START_INCLUDE(notify)
-        // Use the NotificationManager to show the notification
-        NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
-        nm.notify(0, notification);
-        // END_INCLUDE(notify)
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-    }
-
-    /**
-     * Create and show a notification with a custom layout.
-     * This callback is defined through the 'onClick' attribute of the
-     * 'Show Notification' button in the XML layout.
-     *
-     * @param v
-     */
-    public void showNotificationClicked(View v) {
-        createNotification();
-    }
-}
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/strings.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/strings.xml
deleted file mode 100644
index a766441..0000000
--- a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  * Copyright (C) 2013 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.
-  -->
-
-<resources>
-
-    <string name="expanded">I\'m the expanded notification.\nCollapse me!</string>
-    <string name="collapsed">I\'m the collapsed notification.\nCreated at: %s</string>
-    <string name="show_notification">Show Notification</string>
-    <string name="custom_notification">I\'m a custom notification.</string>
-
-    <string name="intro_text">This sample demonstrates how a notification is created using the
-        <b>NotificationCompatBuilder</b>
-        with a custom content view. The layout of the notification is defined as a
-        layout resource and inflated as a <b>RemoteViews</b> object.
-        \n\nOn API level 16 and above, a different layout is inflated and set as
-        the <i>big content view</i>, which is used when the notification is expanded.
-        \n\n<b>Use the button below to create the notification.
-        \n\nIf your device is running Jelly Bean or above, try expanding or collapsing
-        the notification to see the different layouts.</b>
-    </string>
-    <string name="collapsed_image">A single Android robot waving. Symbolises a collapsed
-        notification.
-    </string>
-    <string name="expanded_image">Two Androids on top of each other. Symbolises an expanded
-        notification.
-    </string>
-
-</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/styles.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/styles.xml
deleted file mode 100644
index 1d3d45b..0000000
--- a/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-  * Copyright (C) 2013 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.
-  -->
-
-<resources>
-
-    <style name="NotificationContent" parent="@android:style/TextAppearance.Small">
-        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
-    </style>
-
-</resources>
diff --git a/ui/notifications/CustomNotifications/build.gradle b/ui/notifications/CustomNotifications/build.gradle
index cca9ac3..5a6276f 100644
--- a/ui/notifications/CustomNotifications/build.gradle
+++ b/ui/notifications/CustomNotifications/build.gradle
@@ -1,10 +1,13 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+// Top-level build file where you can add configuration options common to all sub-projects/modules.     
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
+
+repositories {
+    mavenCentral()
+}
diff --git a/ui/notifications/CustomNotifications/buildSrc/build.gradle b/ui/notifications/CustomNotifications/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/notifications/CustomNotifications/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.jar b/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties b/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/notifications/CustomNotifications/gradlew b/ui/notifications/CustomNotifications/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/ui/notifications/CustomNotifications/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/ui/notifications/CustomNotifications/gradlew.bat b/ui/notifications/CustomNotifications/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/ui/notifications/CustomNotifications/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/ui/notifications/CustomNotifications/settings.gradle b/ui/notifications/CustomNotifications/settings.gradle
index 71d4992..f19c616 100644
--- a/ui/notifications/CustomNotifications/settings.gradle
+++ b/ui/notifications/CustomNotifications/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'CustomNotificationsSample'
+include ':CustomNotifications'
diff --git a/ui/notifications/CustomNotifications/template-params.xml b/ui/notifications/CustomNotifications/template-params.xml
deleted file mode 100644
index ff90ca3..0000000
--- a/ui/notifications/CustomNotifications/template-params.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>CustomNotifications</name>
-    <group>UI</group>
-    <package>com.example.android.customnotifications</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates notifications with custom content views.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/build.gradle b/ui/views/HorizontalPaging/HorizontalPaging/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..4359521
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/src/main/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.horizontalpaging"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <!-- While ViewPager will work on API 4 or above, tabs require an ActionBar. ActionBar is only
+         available in API 11 or above. -->
+    <uses-sdk
+        android:minSdkVersion="11"
+        android:targetSdkVersion="16" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+    <!-- This is a standard Activity invocation for MainActivity. -->
+    <activity
+        android:name="com.example.android.horizontalpaging.MainActivity"
+        android:label="@string/app_name" >
+        <intent-filter>
+            <action android:name="android.intent.action.MAIN" />
+
+            <category android:name="android.intent.category.LAUNCHER" />
+        </intent-filter>
+    </activity>
+</application>
+
+</manifest>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/java/com/example/android/horizontalpaging/MainActivity.java b/ui/views/HorizontalPaging/HorizontalPaging/src/main/java/com/example/android/horizontalpaging/MainActivity.java
new file mode 100644
index 0000000..2cdca42
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/src/main/java/com/example/android/horizontalpaging/MainActivity.java
@@ -0,0 +1,223 @@
+package com.example.android.horizontalpaging;
+
+import java.util.Locale;
+
+import android.app.ActionBar;
+import android.app.FragmentTransaction;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentActivity;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentPagerAdapter;
+import android.support.v4.app.NavUtils;
+import android.support.v4.view.ViewPager;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+public class MainActivity extends FragmentActivity implements ActionBar.TabListener {
+
+    /**
+     * The {@link android.support.v4.view.PagerAdapter} that will provide
+     * fragments for each of the sections. We use a
+     * {@link android.support.v4.app.FragmentPagerAdapter} derivative, which
+     * will keep every loaded fragment in memory. If this becomes too memory
+     * intensive, it may be best to switch to a
+     * {@link android.support.v4.app.FragmentStatePagerAdapter}.
+     */
+    SectionsPagerAdapter mSectionsPagerAdapter;
+
+    /**
+     * The {@link ViewPager} that will host the section contents.
+     */
+    ViewPager mViewPager;
+
+    /**
+     * Create the activity. Sets up an {@link ActionBar} with tabs, and then configures the
+     * {@link ViewPager} contained inside R.layout.activity_main.
+     *
+     * <p>A {@link SectionsPagerAdapter} will be instantiated to hold the different pages of
+     * fragments that are to be displayed. A
+     * {@link android.support.v4.view.ViewPager.SimpleOnPageChangeListener} will also be configured
+     * to receive callbacks when the user swipes between pages in the ViewPager.
+     *
+     * @param savedInstanceState
+     */
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // Load the UI from res/layout/activity_main.xml
+        setContentView(R.layout.activity_main);
+
+        // Set up the action bar. The navigation mode is set to NAVIGATION_MODE_TABS, which will
+        // cause the ActionBar to render a set of tabs. Note that these tabs are *not* rendered
+        // by the ViewPager; additional logic is lower in this file to synchronize the ViewPager
+        // state with the tab state. (See mViewPager.setOnPageChangeListener() and onTabSelected().)
+        // BEGIN_INCLUDE (set_navigation_mode)
+        final ActionBar actionBar = getActionBar();
+        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
+        // END_INCLUDE (set_navigation_mode)
+
+        // BEGIN_INCLUDE (setup_view_pager)
+        // Create the adapter that will return a fragment for each of the three primary sections
+        // of the app.
+        mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
+
+        // Set up the ViewPager with the sections adapter.
+        mViewPager = (ViewPager) findViewById(R.id.pager);
+        mViewPager.setAdapter(mSectionsPagerAdapter);
+        // END_INCLUDE (setup_view_pager)
+
+        // When swiping between different sections, select the corresponding tab. We can also use
+        // ActionBar.Tab#select() to do this if we have a reference to the Tab.
+        // BEGIN_INCLUDE (page_change_listener)
+        mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
+            @Override
+            public void onPageSelected(int position) {
+                actionBar.setSelectedNavigationItem(position);
+            }
+        });
+        // END_INCLUDE (page_change_listener)
+
+        // BEGIN_INCLUDE (add_tabs)
+        // For each of the sections in the app, add a tab to the action bar.
+        for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {
+            // Create a tab with text corresponding to the page title defined by the adapter. Also
+            // specify this Activity object, which implements the TabListener interface, as the
+            // callback (listener) for when this tab is selected.
+            actionBar.addTab(
+                    actionBar.newTab()
+                            .setText(mSectionsPagerAdapter.getPageTitle(i))
+                            .setTabListener(this));
+        }
+        // END_INCLUDE (add_tabs)
+    }
+
+    /**
+     * Update {@link ViewPager} after a tab has been selected in the ActionBar.
+     *
+     * @param tab Tab that was selected.
+     * @param fragmentTransaction A {@link FragmentTransaction} for queuing fragment operations to
+     *                            execute once this method returns. This FragmentTransaction does
+     *                            not support being added to the back stack.
+     */
+    // BEGIN_INCLUDE (on_tab_selected)
+    @Override
+    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+        // When the given tab is selected, tell the ViewPager to switch to the corresponding page.
+        mViewPager.setCurrentItem(tab.getPosition());
+    }
+    // END_INCLUDE (on_tab_selected)
+
+    /**
+     * Unused. Required for {@link ActionBar.TabListener}.
+     */
+    @Override
+    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+    }
+
+    /**
+     * Unused. Required for {@link ActionBar.TabListener}.
+     */
+    @Override
+    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
+    }
+
+    // BEGIN_INCLUDE (fragment_pager_adapter)
+    /**
+     * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
+     * one of the sections/tabs/pages. This provides the data for the {@link ViewPager}.
+     */
+    public class SectionsPagerAdapter extends FragmentPagerAdapter {
+    // END_INCLUDE (fragment_pager_adapter)
+
+        public SectionsPagerAdapter(FragmentManager fm) {
+            super(fm);
+        }
+
+        // BEGIN_INCLUDE (fragment_pager_adapter_getitem)
+        /**
+         * Get fragment corresponding to a specific position. This will be used to populate the
+         * contents of the {@link ViewPager}.
+         *
+         * @param position Position to fetch fragment for.
+         * @return Fragment for specified position.
+         */
+        @Override
+        public Fragment getItem(int position) {
+            // getItem is called to instantiate the fragment for the given page.
+            // Return a DummySectionFragment (defined as a static inner class
+            // below) with the page number as its lone argument.
+            Fragment fragment = new DummySectionFragment();
+            Bundle args = new Bundle();
+            args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, position + 1);
+            fragment.setArguments(args);
+            return fragment;
+        }
+        // END_INCLUDE (fragment_pager_adapter_getitem)
+
+        // BEGIN_INCLUDE (fragment_pager_adapter_getcount)
+        /**
+         * Get number of pages the {@link ViewPager} should render.
+         *
+         * @return Number of fragments to be rendered as pages.
+         */
+        @Override
+        public int getCount() {
+            // Show 3 total pages.
+            return 3;
+        }
+        // END_INCLUDE (fragment_pager_adapter_getcount)
+
+        // BEGIN_INCLUDE (fragment_pager_adapter_getpagetitle)
+        /**
+         * Get title for each of the pages. This will be displayed on each of the tabs.
+         *
+         * @param position Page to fetch title for.
+         * @return Title for specified page.
+         */
+        @Override
+        public CharSequence getPageTitle(int position) {
+            Locale l = Locale.getDefault();
+            switch (position) {
+                case 0:
+                    return getString(R.string.title_section1).toUpperCase(l);
+                case 1:
+                    return getString(R.string.title_section2).toUpperCase(l);
+                case 2:
+                    return getString(R.string.title_section3).toUpperCase(l);
+            }
+            return null;
+        }
+        // END_INCLUDE (fragment_pager_adapter_getpagetitle)
+    }
+
+    /**
+     * A dummy fragment representing a section of the app, but that simply displays dummy text.
+     * This would be replaced with your application's content.
+     */
+    public static class DummySectionFragment extends Fragment {
+        /**
+         * The fragment argument representing the section number for this
+         * fragment.
+         */
+        public static final String ARG_SECTION_NUMBER = "section_number";
+
+        public DummySectionFragment() {
+        }
+
+        @Override
+        public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                Bundle savedInstanceState) {
+            View rootView = inflater.inflate(R.layout.fragment_main_dummy, container, false);
+            TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
+            dummyTextView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
+            return rootView;
+        }
+    }
+
+}
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/sample_main.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/sample_main.xml
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/activity_main.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/fragment_main_dummy.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/fragment_main_dummy.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/fragment_main_dummy.xml
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/fragment_main_dummy.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw600dp/dimens.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..886b05f
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,4 @@
+<resources>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-v11/styles.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..3c02242
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-v11/styles.xml
@@ -0,0 +1,11 @@
+<resources>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/dimens.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/dimens.xml
rename to ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/dimens.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/strings.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/strings.xml
new file mode 100644
index 0000000..ec05e06
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/strings.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="app_name">Horizontal Paging Sample</string>
+    <string name="action_settings">Settings</string>
+    <string name="title_section1">Section 1</string>
+    <string name="title_section2">Section 2</string>
+    <string name="title_section3">Section 3</string>
+
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/styles.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/styles.xml
new file mode 100644
index 0000000..6ce89c7
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/styles.xml
@@ -0,0 +1,20 @@
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/.gitignore b/ui/views/HorizontalPaging/HorizontalPagingSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt b/ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 33b9e15..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.horizontalpaging"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <!-- While ViewPager will work on API 4 or above, tabs require an ActionBar. ActionBar is only
-         available in API 11 or above. -->
-    <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <!-- This is a standard Activity invocation for MainActivity. -->
-        <activity
-            android:name="com.example.android.horizontalpaging.MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/java/com/example/android/horizontalpaging/MainActivity.java b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/java/com/example/android/horizontalpaging/MainActivity.java
deleted file mode 100644
index fdd4495..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/java/com/example/android/horizontalpaging/MainActivity.java
+++ /dev/null
@@ -1,219 +0,0 @@
-package com.example.android.horizontalpaging;
-
-import android.app.ActionBar;
-import android.app.FragmentTransaction;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentActivity;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentPagerAdapter;
-import android.support.v4.view.ViewPager;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import java.util.Locale;
-
-public class MainActivity extends FragmentActivity implements ActionBar.TabListener {
-
-    /**
-     * The {@link android.support.v4.view.PagerAdapter} that will provide
-     * fragments for each of the sections. We use a
-     * {@link android.support.v4.app.FragmentPagerAdapter} derivative, which
-     * will keep every loaded fragment in memory. If this becomes too memory
-     * intensive, it may be best to switch to a
-     * {@link android.support.v4.app.FragmentStatePagerAdapter}.
-     */
-    SectionsPagerAdapter mSectionsPagerAdapter;
-
-    /**
-     * The {@link ViewPager} that will host the section contents.
-     */
-    ViewPager mViewPager;
-
-    /**
-     * Create the activity. Sets up an {@link android.app.ActionBar} with tabs, and then configures the
-     * {@link ViewPager} contained inside R.layout.activity_main.
-     *
-     * <p>A {@link SectionsPagerAdapter} will be instantiated to hold the different pages of
-     * fragments that are to be displayed. A
-     * {@link android.support.v4.view.ViewPager.SimpleOnPageChangeListener} will also be configured
-     * to receive callbacks when the user swipes between pages in the ViewPager.
-     *
-     * @param savedInstanceState
-     */
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        // Load the UI from res/layout/activity_main.xml
-        setContentView(R.layout.sample_main);
-
-        // Set up the action bar. The navigation mode is set to NAVIGATION_MODE_TABS, which will
-        // cause the ActionBar to render a set of tabs. Note that these tabs are *not* rendered
-        // by the ViewPager; additional logic is lower in this file to synchronize the ViewPager
-        // state with the tab state. (See mViewPager.setOnPageChangeListener() and onTabSelected().)
-        // BEGIN_INCLUDE (set_navigation_mode)
-        final ActionBar actionBar = getActionBar();
-        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
-        // END_INCLUDE (set_navigation_mode)
-
-        // BEGIN_INCLUDE (setup_view_pager)
-        // Create the adapter that will return a fragment for each of the three primary sections
-        // of the app.
-        mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
-
-        // Set up the ViewPager with the sections adapter.
-        mViewPager = (ViewPager) findViewById(R.id.pager);
-        mViewPager.setAdapter(mSectionsPagerAdapter);
-        // END_INCLUDE (setup_view_pager)
-
-        // When swiping between different sections, select the corresponding tab. We can also use
-        // ActionBar.Tab#select() to do this if we have a reference to the Tab.
-        // BEGIN_INCLUDE (page_change_listener)
-        mViewPager.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
-            @Override
-            public void onPageSelected(int position) {
-                actionBar.setSelectedNavigationItem(position);
-            }
-        });
-        // END_INCLUDE (page_change_listener)
-
-        // BEGIN_INCLUDE (add_tabs)
-        // For each of the sections in the app, add a tab to the action bar.
-        for (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {
-            // Create a tab with text corresponding to the page title defined by the adapter. Also
-            // specify this Activity object, which implements the TabListener interface, as the
-            // callback (listener) for when this tab is selected.
-            actionBar.addTab(
-                    actionBar.newTab()
-                            .setText(mSectionsPagerAdapter.getPageTitle(i))
-                            .setTabListener(this));
-        }
-        // END_INCLUDE (add_tabs)
-    }
-
-    /**
-     * Update {@link ViewPager} after a tab has been selected in the ActionBar.
-     *
-     * @param tab Tab that was selected.
-     * @param fragmentTransaction A {@link android.app.FragmentTransaction} for queuing fragment operations to
-     *                            execute once this method returns. This FragmentTransaction does
-     *                            not support being added to the back stack.
-     */
-    // BEGIN_INCLUDE (on_tab_selected)
-    @Override
-    public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
-        // When the given tab is selected, tell the ViewPager to switch to the corresponding page.
-        mViewPager.setCurrentItem(tab.getPosition());
-    }
-    // END_INCLUDE (on_tab_selected)
-
-    /**
-     * Unused. Required for {@link android.app.ActionBar.TabListener}.
-     */
-    @Override
-    public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
-    }
-
-    /**
-     * Unused. Required for {@link android.app.ActionBar.TabListener}.
-     */
-    @Override
-    public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
-    }
-
-    // BEGIN_INCLUDE (fragment_pager_adapter)
-    /**
-     * A {@link FragmentPagerAdapter} that returns a fragment corresponding to
-     * one of the sections/tabs/pages. This provides the data for the {@link ViewPager}.
-     */
-    public class SectionsPagerAdapter extends FragmentPagerAdapter {
-    // END_INCLUDE (fragment_pager_adapter)
-
-        public SectionsPagerAdapter(FragmentManager fm) {
-            super(fm);
-        }
-
-        // BEGIN_INCLUDE (fragment_pager_adapter_getitem)
-        /**
-         * Get fragment corresponding to a specific position. This will be used to populate the
-         * contents of the {@link ViewPager}.
-         *
-         * @param position Position to fetch fragment for.
-         * @return Fragment for specified position.
-         */
-        @Override
-        public Fragment getItem(int position) {
-            // getItem is called to instantiate the fragment for the given page.
-            // Return a DummySectionFragment (defined as a static inner class
-            // below) with the page number as its lone argument.
-            Fragment fragment = new DummySectionFragment();
-            Bundle args = new Bundle();
-            args.putInt(DummySectionFragment.ARG_SECTION_NUMBER, position + 1);
-            fragment.setArguments(args);
-            return fragment;
-        }
-        // END_INCLUDE (fragment_pager_adapter_getitem)
-
-        // BEGIN_INCLUDE (fragment_pager_adapter_getcount)
-        /**
-         * Get number of pages the {@link ViewPager} should render.
-         *
-         * @return Number of fragments to be rendered as pages.
-         */
-        @Override
-        public int getCount() {
-            // Show 3 total pages.
-            return 3;
-        }
-        // END_INCLUDE (fragment_pager_adapter_getcount)
-
-        // BEGIN_INCLUDE (fragment_pager_adapter_getpagetitle)
-        /**
-         * Get title for each of the pages. This will be displayed on each of the tabs.
-         *
-         * @param position Page to fetch title for.
-         * @return Title for specified page.
-         */
-        @Override
-        public CharSequence getPageTitle(int position) {
-            Locale l = Locale.getDefault();
-            switch (position) {
-                case 0:
-                    return getString(R.string.title_section1).toUpperCase(l);
-                case 1:
-                    return getString(R.string.title_section2).toUpperCase(l);
-                case 2:
-                    return getString(R.string.title_section3).toUpperCase(l);
-            }
-            return null;
-        }
-        // END_INCLUDE (fragment_pager_adapter_getpagetitle)
-    }
-
-    /**
-     * A dummy fragment representing a section of the app, but that simply displays dummy text.
-     * This would be replaced with your application's content.
-     */
-    public static class DummySectionFragment extends Fragment {
-        /**
-         * The fragment argument representing the section number for this
-         * fragment.
-         */
-        public static final String ARG_SECTION_NUMBER = "section_number";
-
-        public DummySectionFragment() {
-        }
-
-        @Override
-        public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                Bundle savedInstanceState) {
-            View rootView = inflater.inflate(R.layout.fragment_main_dummy, container, false);
-            TextView dummyTextView = (TextView) rootView.findViewById(R.id.section_label);
-            dummyTextView.setText(Integer.toString(getArguments().getInt(ARG_SECTION_NUMBER)));
-            return rootView;
-        }
-    }
-
-}
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/strings.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/strings.xml
deleted file mode 100644
index f9b4212..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <string name="action_settings">Settings</string>
-    <string name="title_section1">Section 1</string>
-    <string name="title_section2">Section 2</string>
-    <string name="title_section3">Section 3</string>
-
-</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/tests/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/tests/AndroidManifest.xml
deleted file mode 100644
index 3f35ede..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.horizontalpaging.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.horizontalpaging"
-            android:label="Tests for com.example.android.horizontalpaging" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/tests/src/com/example/android/horizontalpaging/tests/SampleTests.java b/ui/views/HorizontalPaging/HorizontalPagingSample/tests/src/com/example/android/horizontalpaging/tests/SampleTests.java
deleted file mode 100644
index 206eea9..0000000
--- a/ui/views/HorizontalPaging/HorizontalPagingSample/tests/src/com/example/android/horizontalpaging/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.horizontalpaging.tests;
-
-import com.example.android.horizontalpaging.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for HorizontalPaging sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private HorizontalPagingFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (HorizontalPagingFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/views/HorizontalPaging/README.txt b/ui/views/HorizontalPaging/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/views/HorizontalPaging/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/views/HorizontalPaging/build.gradle b/ui/views/HorizontalPaging/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/views/HorizontalPaging/build.gradle
+++ b/ui/views/HorizontalPaging/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/views/HorizontalPaging/buildSrc/build.gradle b/ui/views/HorizontalPaging/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/views/HorizontalPaging/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties b/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/views/HorizontalPaging/settings.gradle b/ui/views/HorizontalPaging/settings.gradle
index f70f0f1..892a596 100644
--- a/ui/views/HorizontalPaging/settings.gradle
+++ b/ui/views/HorizontalPaging/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'HorizontalPagingSample'
+include ':HorizontalPaging'
diff --git a/ui/views/HorizontalPaging/template-params.xml b/ui/views/HorizontalPaging/template-params.xml
deleted file mode 100644
index e0546b1..0000000
--- a/ui/views/HorizontalPaging/template-params.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>HorizontalPaging</name>
-    <group>UI</group>
-    <package>com.example.android.horizontalpaging</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>11</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample demonstrates how to implement horizontal paging between fragments in
-            applications that use ActionBar, using a ViewPager widget.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-
-</sample>
diff --git a/ui/views/TextSwitcher/README.txt b/ui/views/TextSwitcher/README.txt
new file mode 100644
index 0000000..38608df
--- /dev/null
+++ b/ui/views/TextSwitcher/README.txt
@@ -0,0 +1,6 @@
+Build Instructions
+-------------------
+This sample uses the Gradle build system. To build this project, use the
+"gradlew build" command.
+
+To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/views/TextSwitcher/TextSwitcher/build.gradle b/ui/views/TextSwitcher/TextSwitcher/build.gradle
new file mode 100644
index 0000000..0baece9
--- /dev/null
+++ b/ui/views/TextSwitcher/TextSwitcher/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/AndroidManifest.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..707bfe3
--- /dev/null
+++ b/ui/views/TextSwitcher/TextSwitcher/src/main/AndroidManifest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.view.textswitcher"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="4"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.ui.views.textswitcher.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/java/com/example/android/ui/views/textswitcher/MainActivity.java b/ui/views/TextSwitcher/TextSwitcher/src/main/java/com/example/android/ui/views/textswitcher/MainActivity.java
new file mode 100644
index 0000000..1beeb59
--- /dev/null
+++ b/ui/views/TextSwitcher/TextSwitcher/src/main/java/com/example/android/ui/views/textswitcher/MainActivity.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2013 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.ui.views.textswitcher;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.Gravity;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.Button;
+import android.widget.TextSwitcher;
+import android.widget.TextView;
+import android.widget.ViewSwitcher;
+import android.widget.ViewSwitcher.ViewFactory;
+
+import com.example.android.view.textswitcher.R;
+
+/**
+ * This sample shows the use of the {@link TextSwitcher} View with animations. A
+ * {@link TextSwitcher} is a special type of {@link ViewSwitcher} that animates
+ * the current text out and new text in when
+ * {@link TextSwitcher#setText(CharSequence)} is called.
+ */
+public class MainActivity extends Activity {
+    private TextSwitcher mSwitcher;
+    private int mCounter = 0;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        // Get the TextSwitcher view from the layout
+        mSwitcher = (TextSwitcher) findViewById(R.id.switcher);
+
+        // BEGIN_INCLUDE(setup)
+        // Set the factory used to create TextViews to switch between.
+        mSwitcher.setFactory(mFactory);
+
+        /*
+         * Set the in and out animations. Using the fade_in/out animations
+         * provided by the framework.
+         */
+        Animation in = AnimationUtils.loadAnimation(this,
+                android.R.anim.fade_in);
+        Animation out = AnimationUtils.loadAnimation(this,
+                android.R.anim.fade_out);
+        mSwitcher.setInAnimation(in);
+        mSwitcher.setOutAnimation(out);
+        // END_INCLUDE(setup)
+
+        /*
+         * Setup the 'next' button. The counter is incremented when clicked and
+         * the new value is displayed in the TextSwitcher. The change of text is
+         * automatically animated using the in/out animations set above.
+         */
+        Button nextButton = (Button) findViewById(R.id.button);
+        nextButton.setOnClickListener(new View.OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                mCounter++;
+                // BEGIN_INCLUDE(settext)
+                mSwitcher.setText(String.valueOf(mCounter));
+                // END_INCLUDE(settext)
+            }
+        });
+
+        // Set the initial text without an animation
+        mSwitcher.setCurrentText(String.valueOf(mCounter));
+
+    }
+
+    // BEGIN_INCLUDE(factory)
+    /**
+     * The {@link ViewFactory} used to create {@link TextView}s that the
+     * {@link TextSwitcher} will switch between.
+     */
+    private ViewSwitcher.ViewFactory mFactory = new ViewFactory() {
+
+        @Override
+        public View makeView() {
+
+            // Create a new TextView
+            TextView t = new TextView(MainActivity.this);
+            t.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
+            t.setTextAppearance(MainActivity.this, android.R.style.TextAppearance_Large);
+            return t;
+        }
+    };
+    // END_INCLUDE(factory)
+}
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/layout/sample_main.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/layout/activity_main.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/layout/sample_main.xml
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/layout/activity_main.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw600dp/dimens.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw600dp/dimens.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw600dp/dimens.xml
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw600dp/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw720dp-land/dimens.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v11/styles.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v11/styles.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v11/styles.xml
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v11/styles.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v14/styles.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v14/styles.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v14/styles.xml
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v14/styles.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/dimens.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/dimens.xml
rename to ui/views/TextSwitcher/TextSwitcher/src/main/res/values/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/strings.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/strings.xml
new file mode 100644
index 0000000..6b281e6
--- /dev/null
+++ b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/strings.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<resources>
+
+    <string name="app_name">TextSwitcherSample</string>
+    <string name="intro">This sample illustrates the use of a <b>TextSwitcher</b> to display text.
+\n\n<b>Click the button</b> below to set new text in the TextSwitcher and observe the in and out
+ fade animations.</string>
+    <string name="next">Next</string>
+
+</resources>
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/styles.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/styles.xml
new file mode 100644
index 0000000..27efa47
--- /dev/null
+++ b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/styles.xml
@@ -0,0 +1,36 @@
+<!--
+  Copyright 2013 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.
+-->
+
+<resources>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/.gitignore b/ui/views/TextSwitcher/TextSwitcherSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/views/TextSwitcher/TextSwitcherSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/proguard-project.txt b/ui/views/TextSwitcher/TextSwitcherSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/views/TextSwitcher/TextSwitcherSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/AndroidManifest.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 7f512a3..0000000
--- a/ui/views/TextSwitcher/TextSwitcherSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.textswitcher"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="4"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/java/com/example/android/textswitcher/MainActivity.java b/ui/views/TextSwitcher/TextSwitcherSample/src/main/java/com/example/android/textswitcher/MainActivity.java
deleted file mode 100644
index a8cbb5e..0000000
--- a/ui/views/TextSwitcher/TextSwitcherSample/src/main/java/com/example/android/textswitcher/MainActivity.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright 2013 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.textswitcher;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.view.Gravity;
-import android.view.View;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.widget.Button;
-import android.widget.TextSwitcher;
-import android.widget.TextView;
-import android.widget.ViewSwitcher.ViewFactory;
-
-/**
- * This sample shows the use of the {@link android.widget.TextSwitcher} View with animations. A
- * {@link android.widget.TextSwitcher} is a special type of {@link android.widget.ViewSwitcher} that animates
- * the current text out and new text in when
- * {@link android.widget.TextSwitcher#setText(CharSequence)} is called.
- */
-public class MainActivity extends Activity {
-    private TextSwitcher mSwitcher;
-    private int mCounter = 0;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.sample_main);
-
-        // Get the TextSwitcher view from the layout
-        mSwitcher = (TextSwitcher) findViewById(R.id.switcher);
-
-        // BEGIN_INCLUDE(setup)
-        // Set the factory used to create TextViews to switch between.
-        mSwitcher.setFactory(mFactory);
-
-        /*
-         * Set the in and out animations. Using the fade_in/out animations
-         * provided by the framework.
-         */
-        Animation in = AnimationUtils.loadAnimation(this,
-                android.R.anim.fade_in);
-        Animation out = AnimationUtils.loadAnimation(this,
-                android.R.anim.fade_out);
-        mSwitcher.setInAnimation(in);
-        mSwitcher.setOutAnimation(out);
-        // END_INCLUDE(setup)
-
-        /*
-         * Setup the 'next' button. The counter is incremented when clicked and
-         * the new value is displayed in the TextSwitcher. The change of text is
-         * automatically animated using the in/out animations set above.
-         */
-        Button nextButton = (Button) findViewById(R.id.button);
-        nextButton.setOnClickListener(new View.OnClickListener() {
-
-            @Override
-            public void onClick(View v) {
-                mCounter++;
-                // BEGIN_INCLUDE(settext)
-                mSwitcher.setText(String.valueOf(mCounter));
-                // END_INCLUDE(settext)
-            }
-        });
-
-        // Set the initial text without an animation
-        mSwitcher.setCurrentText(String.valueOf(mCounter));
-
-    }
-
-    // BEGIN_INCLUDE(factory)
-    /**
-     * The {@link android.widget.ViewSwitcher.ViewFactory} used to create {@link android.widget.TextView}s that the
-     * {@link android.widget.TextSwitcher} will switch between.
-     */
-    private ViewFactory mFactory = new ViewFactory() {
-
-        @Override
-        public View makeView() {
-
-            // Create a new TextView
-            TextView t = new TextView(MainActivity.this);
-            t.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
-            t.setTextAppearance(MainActivity.this, android.R.style.TextAppearance_Large);
-            return t;
-        }
-    };
-    // END_INCLUDE(factory)
-}
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/strings.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/strings.xml
deleted file mode 100644
index 612b6cb..0000000
--- a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<resources>
-
-    <string name="intro">This sample illustrates the use of a <b>TextSwitcher</b> to display text.
-\n\n<b>Click the button</b> below to set new text in the TextSwitcher and observe the in and out
- fade animations.</string>
-    <string name="next">Next</string>
-
-</resources>
diff --git a/ui/views/TextSwitcher/build.gradle b/ui/views/TextSwitcher/build.gradle
index cca9ac3..036abc8 100644
--- a/ui/views/TextSwitcher/build.gradle
+++ b/ui/views/TextSwitcher/build.gradle
@@ -1,10 +1,8 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
 }
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/views/TextSwitcher/buildSrc/build.gradle b/ui/views/TextSwitcher/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/views/TextSwitcher/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties b/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties
index 861eddc..055ba6f 100644
--- a/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Wed Apr 10 15:27:10 PDT 2013
+#
+#Mon Jul 22 11:40:20 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
diff --git a/ui/views/TextSwitcher/settings.gradle b/ui/views/TextSwitcher/settings.gradle
index 6740a95..aefb871 100644
--- a/ui/views/TextSwitcher/settings.gradle
+++ b/ui/views/TextSwitcher/settings.gradle
@@ -1,4 +1 @@
-
-
-
-include 'TextSwitcherSample'
+include ':TextSwitcher'
diff --git a/ui/views/TextSwitcher/template-params.xml b/ui/views/TextSwitcher/template-params.xml
deleted file mode 100644
index 365c708..0000000
--- a/ui/views/TextSwitcher/template-params.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>TextSwitcher</name>
-    <group>UI</group>
-    <package>com.example.android.textswitcher</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-                This sample illustrates the use of a TextSwitcher to display text.
-                \n\nClick the button below to set new text in the TextSwitcher and observe the
-                in and out fade animations.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/.gitignore b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/.gitignore
deleted file mode 100644
index ce281ed..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/README-singleview.txt b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/README-singleview.txt
deleted file mode 100644
index 0cacd46..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/README-singleview.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-        Copyright 2013 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.
--->
-
-Steps to implement SingleView template:
--in template-params.xml.ftl:
-    -add the following line to common imports
-        <common src="activities"/>
-
-    -add a string for the action button's text using the element name "sample_action".
-    This element should be a child of <strings>:
-        <strings>
-        ...
-        <sample_action>ButtonText</sample_action>
-        ...
-        </strings>
-
-
-
--Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
- called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
- folder instead of "common" or "templates".
-   For instance, if your package name is com.example.foo, create the file
-   src/main/java/com/example/foo/FooFragment.java
-
-
--Within this fragment, make sure that the onCreate method has the line
- "setHasOptionsMenu(true);", to enable the fragment to handle menu events.
-
--In order to override menu events, override onOptionsItemSelected.
-
--refer to sampleSamples/singleViewSample for a reference implementation of a
-project built on this template.
-
-
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/build.gradle b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/build.gradle
deleted file mode 100644
index 03db3dd..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/build.gradle
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.6.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    // Add the support lib that is appropriate for SDK 4
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-// The sample build uses multiple directories to
-// keep boilerplate and common code separate from
-// the main sample code.
-List<String> dirs = [
-    'main',     // main sample code; look here for the interesting stuff.
-    'common',   // components that are reused by multiple samples
-    'template'] // boilerplate code that is generated by the sample template process
-
-android {
-    compileSdkVersion 19
-    buildToolsVersion "18.0.1"
-
-    sourceSets {
-        main {
-            dirs.each { dir ->
-                java.srcDirs "src/${dir}/java"
-                res.srcDirs "src/${dir}/res"
-            }
-        }
-        instrumentTest.setRoot('tests')
-        instrumentTest.java.srcDirs = ['tests/src']
-    }
-}
-
-task preflight (dependsOn: parent.preflight) {
-    project.afterEvaluate {
-        // Inject a preflight task into each variant so we have a place to hook tasks
-        // that need to run before any of the android build tasks.
-        //
-        android.applicationVariants.each { variant ->
-            tasks.getByPath("prepare${variant.name.capitalize()}Dependencies").dependsOn preflight
-        }
-    }
-}
-
-
-
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/proguard-project.txt b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/src/main/AndroidManifest.xml b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 1d01856..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<!-- the versionCode is an integer representation of this version of your application.  New
-     versions get higher numbers, so the upgrade system can avoid dealing with the ambiguity
-     of "1.9" vs "1.10".  versionName, on the other hand, can be whatever you want, as the code
-     that handles upgrading Android apps between versions on your device just ignores it.-->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.advancedimmersivemode"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!-- This sample is to demonstrate features released in API 19.
-         So while it would technically run on an earlier version of Android,
-         there wouldn't be much point) -->
-    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
-    <!-- allowBackup declares if the app can be part of device-wide backups such as "adb backup" -->
-    <!-- theme is a way of applying UI decisions across your entire application.  You can also
-         define it on a per-application basis. -->
-    <application
-        android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <!-- Every activity needs its own Manifest element.  The intent-filter contained in the
-             element declares the intents that can be used to activate this Activity.  For instance,
-             the one below flags this Activity as a "main" entry point of this app, and suitable
-             for creating a shortcut to in the Launcher.  If you wanted your app to have 5
-             different Activities available in the launcher, you could just make 5 activities
-             with that intent filter.  Please don't do that.  Just because it's a good example
-             doesn't mean it's a good idea. -->
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/src/main/java/com/example/android/advancedimmersivemode/AdvancedImmersiveModeFragment.java b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/src/main/java/com/example/android/advancedimmersivemode/AdvancedImmersiveModeFragment.java
deleted file mode 100644
index fe11ecb..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/src/main/java/com/example/android/advancedimmersivemode/AdvancedImmersiveModeFragment.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-* Copyright (C) 2012 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.advancedimmersivemode;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.CheckBox;
-
-import com.example.android.common.logger.Log;
-
-/**
- * Demonstrates how to update the app's UI by toggling immersive mode.
- * Checkboxes are also made available for toggling other UI flags which can
- * alter the behavior of immersive mode.
- */
-public class AdvancedImmersiveModeFragment extends Fragment {
-
-    public static final String TAG = "AdvancedImmersiveModeFragment";
-    public CheckBox mHideNavCheckbox;
-    public CheckBox mHideStatusBarCheckBox;
-    public CheckBox mImmersiveModeCheckBox;
-    public CheckBox mImmersiveModeStickyCheckBox;
-    public CheckBox mLowProfileCheckBox;
-
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-
-        final View decorView = getActivity().getWindow().getDecorView();
-        ViewGroup parentView = (ViewGroup) getActivity().getWindow().getDecorView()
-                .findViewById(R.id.sample_main_layout);
-
-        mLowProfileCheckBox = new CheckBox(getActivity());
-        mLowProfileCheckBox.setText("Enable Low Profile mode.");
-        parentView.addView(mLowProfileCheckBox);
-
-        mHideNavCheckbox = new CheckBox(getActivity());
-        mHideNavCheckbox.setChecked(true);
-        mHideNavCheckbox.setText("Hide Navigation bar");
-        parentView.addView(mHideNavCheckbox);
-
-        mHideStatusBarCheckBox = new CheckBox(getActivity());
-        mHideStatusBarCheckBox.setChecked(true);
-        mHideStatusBarCheckBox.setText("Hide Status Bar");
-        parentView.addView(mHideStatusBarCheckBox);
-
-        mImmersiveModeCheckBox = new CheckBox(getActivity());
-        mImmersiveModeCheckBox.setText("Enable Immersive Mode.");
-        parentView.addView(mImmersiveModeCheckBox);
-
-        mImmersiveModeStickyCheckBox = new CheckBox(getActivity());
-        mImmersiveModeStickyCheckBox.setText("Enable Immersive Mode (Sticky)");
-        parentView.addView(mImmersiveModeStickyCheckBox);
-
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.sample_action) {
-            toggleImmersiveMode();
-        }
-        return true;
-    }
-
-    /**
-     * Detects and toggles immersive mode (also known as "hidey bar" mode).
-     */
-    public void toggleImmersiveMode() {
-
-        // BEGIN_INCLUDE (get_current_ui_flags)
-        // The "Decor View" is the parent view of the Activity.  It's also conveniently the easiest
-        // one to find from within a fragment, since there's a handy helper method to pull it, and
-        // we don't have to bother with picking a view somewhere deeper in the hierarchy and calling
-        // "findViewById" on it.
-        View decorView = getActivity().getWindow().getDecorView();
-        int uiOptions = decorView.getSystemUiVisibility();
-        int newUiOptions = uiOptions;
-        // END_INCLUDE (get_current_ui_flags)
-
-        // BEGIN_INCLUDE (toggle_lowprofile_mode)
-        // Low profile mode doesn't resize the screen at all, but it covers the nav & status bar
-        // icons with black so they're less distracting.  Unlike "full screen" and "hide nav bar,"
-        // this mode doesn't interact with immersive mode at all, but it's instructive when running
-        // this sample to observe the differences in behavior.
-        if (mLowProfileCheckBox.isChecked()) {
-            newUiOptions |= View.SYSTEM_UI_FLAG_LOW_PROFILE;
-        } else {
-            newUiOptions &= ~View.SYSTEM_UI_FLAG_LOW_PROFILE;
-        }
-        // END_INCLUDE (toggle_lowprofile_mode)
-
-        // BEGIN_INCLUDE (toggle_fullscreen_mode)
-        // When enabled, this flag hides non-critical UI, such as the status bar,
-        // which usually shows notification icons, battery life, etc
-        // on phone-sized devices.  The bar reappears when the user swipes it down.  When immersive
-        // mode is also enabled, the app-drawable area expands, and when the status bar is swiped
-        // down, it appears semi-transparently and slides in over the app, instead of pushing it
-        // down.
-        if (mHideStatusBarCheckBox.isChecked()) {
-            newUiOptions |= View.SYSTEM_UI_FLAG_FULLSCREEN;
-        } else {
-            newUiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN;
-        }
-        // END_INCLUDE (toggle_fullscreen_mode)
-
-        // BEGIN_INCLUDE (toggle_hidenav_mode)
-        // When enabled, this flag hides the black nav bar along the bottom,
-        // where the home/back buttons are.  The nav bar normally instantly reappears
-        // when the user touches the screen.  When immersive mode is also enabled, the nav bar
-        // stays hidden until the user swipes it back.
-        if (mHideNavCheckbox.isChecked()) {
-            newUiOptions |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
-        } else {
-            newUiOptions &= ~View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
-        }
-        // END_INCLUDE (toggle_hidenav_mode)
-
-        // BEGIN_INCLUDE (toggle_immersive_mode)
-        // Immersive mode doesn't do anything without at least one of the previous flags
-        // enabled.  When enabled, it allows the user to swipe the status and/or nav bars
-        // off-screen.  When the user swipes the bars back onto the screen, the flags are cleared
-        // and immersive mode is automatically disabled.
-        if (mImmersiveModeCheckBox.isChecked()) {
-            newUiOptions |= View.SYSTEM_UI_FLAG_IMMERSIVE;
-        } else {
-            newUiOptions &= ~View.SYSTEM_UI_FLAG_IMMERSIVE;
-        }
-        // END_INCLUDE (toggle_immersive_mode)
-
-        // BEGIN_INCLUDE (toggle_immersive_mode_sticky)
-        // There's actually two forms of immersive mode, normal and "sticky".  Sticky immersive mode
-        // is different in 2 key ways:
-        //
-        // * Uses semi-transparent bars for the nav and status bars
-        // * This UI flag will *not* be cleared when the user interacts with the UI.
-        //   When the user swipes, the bars will temporarily appear for a few seconds and then
-        //   disappear again.
-        if (mImmersiveModeStickyCheckBox.isChecked()) {
-            newUiOptions |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
-        } else {
-            newUiOptions &= ~View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
-        }
-        // END_INCLUDE (toggle_immersive_mode_sticky)
-
-        // BEGIN_INCLUDE (set_ui_flags)
-        //Set the new UI flags.
-        decorView.setSystemUiVisibility(newUiOptions);
-        Log.i(TAG, "Current height: " + decorView.getHeight() + ", width: " + decorView.getWidth());
-        // END_INCLUDE (set_ui_flags)
-    }
-}
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/tests/AndroidManifest.xml b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/tests/AndroidManifest.xml
deleted file mode 100644
index 7117969..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.advancedimmersivemode.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="19"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.advancedimmersivemode"
-            android:label="Tests for com.example.android.advancedimmersivemode" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/tests/src/com/example/android/advancedimmersivemode/tests/SampleTests.java b/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/tests/src/com/example/android/advancedimmersivemode/tests/SampleTests.java
deleted file mode 100644
index c51a488..0000000
--- a/ui/window/AdvancedImmersiveMode/AdvancedImmersiveModeSample/tests/src/com/example/android/advancedimmersivemode/tests/SampleTests.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-/*
-* Copyright (C) 2013 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.advancedimmersivemode.tests;
-
-import com.example.android.advancedimmersivemode.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.test.UiThreadTest;
-
-/**
-* Tests for AdvancedImmersiveMode sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private AdvancedImmersiveModeFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        mTestActivity = getActivity();
-        mTestFragment = (AdvancedImmersiveModeFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-
-    /**
-     * Verify that the UI flags actually changed when the toggle method is called.
-     */
-    @UiThreadTest
-    public void testFlagsChanged() {
-        int uiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        mTestFragment.mImmersiveModeCheckBox.setChecked(true);
-        mTestFragment.mHideNavCheckbox.setChecked(true);
-        mTestFragment.mHideStatusBarCheckBox.setChecked(true);
-        mTestFragment.toggleImmersiveMode();
-        int newUiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        assertTrue("UI Flags didn't toggle.", uiFlags != newUiFlags);
-    }
-
-    /**
-     * Verify that the view's height actually changed when the toggle method is called.
-     * This should result in a change in height for the DecorView.
-     */
-    public void testDecorHeightExpanded() {
-        // Grab the initial height of the DecorWindow.
-        int startingHeight = getActivity().getWindow().getDecorView().getHeight();
-
-        // In order to test that this worked:  Need to toggle the immersive mode on the UI thread,
-        // wait a suitable amount of time (this test goes with 200 ms), then check to see if the
-        // height changed.
-        try {
-            Runnable testRunnable = (new Runnable() {
-                public void run() {
-                    // Toggle immersive mode
-                    mTestFragment.mImmersiveModeCheckBox.setChecked(true);
-                    mTestFragment.mHideNavCheckbox.setChecked(true);
-                    mTestFragment.mHideStatusBarCheckBox.setChecked(true);
-                    mTestFragment.toggleImmersiveMode();
-                    synchronized(this) {
-                        // Notify any thread waiting on this runnable that it can continue
-                        this.notify();
-                    }
-                }
-            });
-            synchronized(testRunnable) {
-                // Since toggling immersive mode makes changes to the view hierarchy, it needs to run
-                // on the UI thread, or crashing will occur.
-                mTestActivity.runOnUiThread(testRunnable);
-                testRunnable.wait();
-
-            }
-            synchronized(this) {
-                //Wait about 200ms for the change to take place
-                wait(200L);
-            }
-        } catch (Throwable throwable) {
-            fail(throwable.getMessage());
-        }
-
-        int expandedHeight = getActivity().getWindow().getDecorView().getHeight();
-        assertTrue("Bars aren't hidden.", expandedHeight != startingHeight);
-    }
-
-}
\ No newline at end of file
diff --git a/ui/window/AdvancedImmersiveMode/build.gradle b/ui/window/AdvancedImmersiveMode/build.gradle
deleted file mode 100644
index cca9ac3..0000000
--- a/ui/window/AdvancedImmersiveMode/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/window/AdvancedImmersiveMode/buildSrc/build.gradle b/ui/window/AdvancedImmersiveMode/buildSrc/build.gradle
deleted file mode 100644
index 7cebf71..0000000
--- a/ui/window/AdvancedImmersiveMode/buildSrc/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.properties b/ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/ui/window/AdvancedImmersiveMode/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/window/AdvancedImmersiveMode/gradlew b/ui/window/AdvancedImmersiveMode/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/ui/window/AdvancedImmersiveMode/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/ui/window/AdvancedImmersiveMode/gradlew.bat b/ui/window/AdvancedImmersiveMode/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/ui/window/AdvancedImmersiveMode/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/ui/window/AdvancedImmersiveMode/settings.gradle b/ui/window/AdvancedImmersiveMode/settings.gradle
deleted file mode 100644
index 0f7ed4b..0000000
--- a/ui/window/AdvancedImmersiveMode/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include 'AdvancedImmersiveModeSample'
diff --git a/ui/window/AdvancedImmersiveMode/template-params.xml b/ui/window/AdvancedImmersiveMode/template-params.xml
deleted file mode 100644
index 0f23700..0000000
--- a/ui/window/AdvancedImmersiveMode/template-params.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>AdvancedImmersiveMode</name>
-    <group>UI</group>
-    <package>com.example.android.advancedimmersivemode</package>
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-    <compileSdkVersion>19</compileSdkVersion>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            \"Immersive Mode\" is a new UI mode which improves \"hide full screen\" and
-            \"hide nav bar\" modes, by letting users swipe the bars in and out.  This sample
-            lets the user experiment with immersive mode by enabling it and seeing how it interacts
-            with some of the other UI flags related to full-screen apps.
-            \n\nThis sample also lets the user choose between normal immersive mode and "sticky"
-            immersive mode, which removes the status bar and nav bar
-            a few seconds after the user has swiped them back in.
-            ]]>
-        </intro>
-        <sample_action>Try these settings!</sample_action>
-    </strings>
-
-    <template src="base"/>
-    <template src="SingleView"/>
-    <common src="logger"/>
-    <common src="activities"/>
-
-</sample>
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/.gitignore b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/README-singleview.txt b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/README-singleview.txt
deleted file mode 100644
index 0cacd46..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/README-singleview.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-        Copyright 2013 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.
--->
-
-Steps to implement SingleView template:
--in template-params.xml.ftl:
-    -add the following line to common imports
-        <common src="activities"/>
-
-    -add a string for the action button's text using the element name "sample_action".
-    This element should be a child of <strings>:
-        <strings>
-        ...
-        <sample_action>ButtonText</sample_action>
-        ...
-        </strings>
-
-
-
--Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
- called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
- folder instead of "common" or "templates".
-   For instance, if your package name is com.example.foo, create the file
-   src/main/java/com/example/foo/FooFragment.java
-
-
--Within this fragment, make sure that the onCreate method has the line
- "setHasOptionsMenu(true);", to enable the fragment to handle menu events.
-
--In order to override menu events, override onOptionsItemSelected.
-
--refer to sampleSamples/singleViewSample for a reference implementation of a
-project built on this template.
-
-
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/proguard-project.txt b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/AndroidManifest.xml b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 00b4e3c..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.basicimmersivemode"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/java/com/example/android/basicimmersivemode/BasicImmersiveModeFragment.java b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/java/com/example/android/basicimmersivemode/BasicImmersiveModeFragment.java
deleted file mode 100644
index a675e05..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/java/com/example/android/basicimmersivemode/BasicImmersiveModeFragment.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-* Copyright (C) 2013 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.basicimmersivemode;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.MenuItem;
-import android.view.View;
-
-import com.example.android.common.logger.Log;
-
-public class BasicImmersiveModeFragment extends Fragment {
-
-    public static final String TAG = "BasicImmersiveModeFragment";
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-        final View decorView = getActivity().getWindow().getDecorView();
-        decorView.setOnSystemUiVisibilityChangeListener(
-                new View.OnSystemUiVisibilityChangeListener() {
-                    @Override
-                    public void onSystemUiVisibilityChange(int i) {
-                        int height = decorView.getHeight();
-                        Log.i(TAG, "Current height: " + height);
-                    }
-                });
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.sample_action) {
-            toggleHideyBar();
-        }
-        return true;
-    }
-
-    /**
-     * Detects and toggles immersive mode.
-     */
-    public void toggleHideyBar() {
-        // BEGIN_INCLUDE (get_current_ui_flags)
-        // The UI options currently enabled are represented by a bitfield.
-        // getSystemUiVisibility() gives us that bitfield.
-        int uiOptions = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        int newUiOptions = uiOptions;
-        // END_INCLUDE (get_current_ui_flags)
-        // BEGIN_INCLUDE (toggle_ui_flags)
-        boolean isImmersiveModeEnabled =
-                ((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) == uiOptions);
-        if (isImmersiveModeEnabled) {
-            Log.i(TAG, "Turning immersive mode mode off. ");
-        } else {
-            Log.i(TAG, "Turning immersive mode mode on.");
-        }
-
-        // Immersive mode: Backward compatible to KitKat (API 19).
-        // Note that this flag doesn't do anything by itself, it only augments the behavior
-        // of HIDE_NAVIGATION and FLAG_FULLSCREEN.  For the purposes of this sample
-        // all three flags are being toggled together.
-        // This sample uses the "sticky" form of immersive mode, which will let the user swipe
-        // the bars back in again, but will automatically make them disappear a few seconds later.
-        newUiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
-        newUiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;
-        newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
-        getActivity().getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
-        //END_INCLUDE (set_ui_flags)
-    }
-}
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/tests/AndroidManifest.xml b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/tests/AndroidManifest.xml
deleted file mode 100644
index 070368c..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.basicimmersivemode.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="19"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.basicimmersivemode"
-            android:label="Tests for com.example.android.basicimmersivemode" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/tests/src/com/example/android/basicimmersivemode/tests/SampleTests.java b/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/tests/src/com/example/android/basicimmersivemode/tests/SampleTests.java
deleted file mode 100644
index 31c25bb..0000000
--- a/ui/window/BasicImmersiveMode/BasicImmersiveModeSample/tests/src/com/example/android/basicimmersivemode/tests/SampleTests.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-/*
-* Copyright (C) 2013 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.basicimmersivemode.tests;
-
-import com.example.android.basicimmersivemode.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.test.UiThreadTest;
-
-/**
-* Tests for immersive mode sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private BasicImmersiveModeFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (BasicImmersiveModeFragment)
-        mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-     * Verify that the UI flags actually changed when the toggle method is called.
-     */
-    @UiThreadTest
-    public void testFlagsChanged() {
-        int uiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        mTestFragment.toggleHideyBar();
-        int newUiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        assertTrue("UI Flags didn't toggle.", uiFlags != newUiFlags);
-    }
-
-    /**
-     * Verify that the view's height actually changed when the toggle method is called.
-     * This should result in a change in height for the DecorView.
-     */
-    public void testDecorHeightExpanded() {
-        // Grab the initial height of the DecorWindow.
-        int startingHeight = getActivity().getWindow().getDecorView().getHeight();
-
-        // In order to test that this worked:  Need to toggle the immersive mode on the UI thread,
-        // wait a suitable amount of time (this test goes with 200 ms), then check to see if the
-        // height changed.
-        try {
-            Runnable testRunnable = (new Runnable() {
-                public void run() {
-                    // Toggle immersive mode
-                    mTestFragment.toggleHideyBar();
-                    synchronized(this) {
-                        // Notify any thread waiting on this runnable that it can continue
-                        this.notify();
-                    }
-                }
-            });
-            synchronized(testRunnable) {
-                // Since toggling immersive mode makes changes to the view heirarchy, it needs to run
-                // on the UI thread, or crashing will occur.
-                mTestActivity.runOnUiThread(testRunnable);
-                testRunnable.wait();
-
-            }
-            synchronized(this) {
-                //Wait about 200ms for the change to take place
-                wait(200L);
-            }
-        } catch (Throwable throwable) {
-            fail(throwable.getMessage());
-        }
-
-        int expandedHeight = getActivity().getWindow().getDecorView().getHeight();
-        assertTrue("Bars aren't hidden.", expandedHeight != startingHeight);
-    }
-}
\ No newline at end of file
diff --git a/ui/window/BasicImmersiveMode/build.gradle b/ui/window/BasicImmersiveMode/build.gradle
deleted file mode 100644
index cca9ac3..0000000
--- a/ui/window/BasicImmersiveMode/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/window/BasicImmersiveMode/buildSrc/build.gradle b/ui/window/BasicImmersiveMode/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/window/BasicImmersiveMode/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.properties b/ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/ui/window/BasicImmersiveMode/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/window/BasicImmersiveMode/gradlew b/ui/window/BasicImmersiveMode/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/ui/window/BasicImmersiveMode/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/ui/window/BasicImmersiveMode/gradlew.bat b/ui/window/BasicImmersiveMode/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/ui/window/BasicImmersiveMode/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/ui/window/BasicImmersiveMode/settings.gradle b/ui/window/BasicImmersiveMode/settings.gradle
deleted file mode 100644
index 8dda383..0000000
--- a/ui/window/BasicImmersiveMode/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-include 'BasicImmersiveModeSample'
diff --git a/ui/window/BasicImmersiveMode/template-params.xml b/ui/window/BasicImmersiveMode/template-params.xml
deleted file mode 100644
index 1335908..0000000
--- a/ui/window/BasicImmersiveMode/template-params.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>BasicImmersiveMode</name>
-    <group>UI</group>
-    <package>com.example.android.basicimmersivemode</package>
-    
-
-
-    <!-- change minSdk if needed-->
-    <minSdk>19</minSdk>
-    <compileSdkVersion>19</compileSdkVersion>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            \"Immersive Mode\" is a new UI mode which improves \"hide full screen\" and
-            \"hide nav bar\" modes, by letting users swipe the bars in and out.  This sample
-            demonstrates how to enable and disable immersive mode programmatically.
-            ]]>
-        </intro>
-        <sample_action>Toggle Immersive Mode!</sample_action>
-    </strings>
-
-    <template src="base"/>
-    <template src="SingleView"/>
-    <common src="logger"/>
-    <common src="activities"/>
-
-</sample>
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/.gitignore b/ui/window/ImmersiveMode/ImmersiveModeSample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/README-singleview.txt b/ui/window/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
deleted file mode 100644
index 0cacd46..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-<#--
-        Copyright 2013 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.
--->
-
-Steps to implement SingleView template:
--in template-params.xml.ftl:
-    -add the following line to common imports
-        <common src="activities"/>
-
-    -add a string for the action button's text using the element name "sample_action".
-    This element should be a child of <strings>:
-        <strings>
-        ...
-        <sample_action>ButtonText</sample_action>
-        ...
-        </strings>
-
-
-
--Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
- called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
- folder instead of "common" or "templates".
-   For instance, if your package name is com.example.foo, create the file
-   src/main/java/com/example/foo/FooFragment.java
-
-
--Within this fragment, make sure that the onCreate method has the line
- "setHasOptionsMenu(true);", to enable the fragment to handle menu events.
-
--In order to override menu events, override onOptionsItemSelected.
-
--refer to sampleSamples/singleViewSample for a reference implementation of a
-project built on this template.
-
-
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/window/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml
deleted file mode 100644
index 72a60ce..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.immersivemode"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="19" />
-
-    <application android:allowBackup="true"
-        android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/AppTheme">
-
-        <activity android:name=".MainActivity"
-                  android:label="@string/app_name"
-                  android:uiOptions="splitActionBarWhenNarrow">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-
-</manifest>
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
deleted file mode 100644
index 8a7255c..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-* Copyright (C) 2012 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.immersivemode;
-
-import android.os.Build;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.view.MenuItem;
-import android.view.View;
-
-import com.example.android.common.logger.Log;
-
-public class ImmersiveModeFragment extends Fragment {
-
-    public static final String TAG = "ImmersiveModeFragment";
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setHasOptionsMenu(true);
-    }
-
-    @Override
-    public void onActivityCreated(Bundle savedInstanceState) {
-        super.onActivityCreated(savedInstanceState);
-        final View decorView = getActivity().getWindow().getDecorView();
-        decorView.setOnSystemUiVisibilityChangeListener(
-                new View.OnSystemUiVisibilityChangeListener() {
-                    @Override
-                    public void onSystemUiVisibilityChange(int i) {
-                        int height = decorView.getHeight();
-                        Log.i(TAG, "Current height: " + height);
-                    }
-                });
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        if (item.getItemId() == R.id.sample_action) {
-            toggleHideyBar();
-        }
-        return true;
-    }
-
-    /**
-     * Detects and toggles immersive mode (also known as "hidey bar" mode).
-     */
-    public void toggleHideyBar() {
-
-        // BEGIN_INCLUDE (get_current_ui_flags)
-        // The UI options currently enabled are represented by a bitfield.
-        // getSystemUiVisibility() gives us that bitfield.
-        int uiOptions = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        int newUiOptions = uiOptions;
-        // END_INCLUDE (get_current_ui_flags)
-        // BEGIN_INCLUDE (toggle_ui_flags)
-        boolean isImmersiveModeEnabled =
-                ((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) == uiOptions);
-        if (isImmersiveModeEnabled) {
-            Log.i(TAG, "Turning immersive mode mode off. ");
-        } else {
-            Log.i(TAG, "Turning immersive mode mode on.");
-        }
-
-        // Navigation bar hiding:  Backwards compatible to ICS.
-        if (Build.VERSION.SDK_INT >= 14) {
-            newUiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
-        }
-
-        // Status bar hiding: Backwards compatible to Jellybean
-        if (Build.VERSION.SDK_INT >= 16) {
-            newUiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;
-        }
-
-        // Immersive mode: Backward compatible to KitKat.
-        // Note that this flag doesn't do anything by itself, it only augments the behavior
-        // of HIDE_NAVIGATION and FLAG_FULLSCREEN.  For the purposes of this sample
-        // all three flags are being toggled together.
-        // Note that there are two immersive mode UI flags, one of which is referred to as "sticky".
-        // Sticky immersive mode differs in that it makes the navigation and status bars
-        // semi-transparent, and the UI flag does not get cleared when the user interacts with
-        // the screen.
-        if (Build.VERSION.SDK_INT >= 18) {
-            newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
-        }
-
-        getActivity().getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
-        //END_INCLUDE (set_ui_flags)
-    }
-}
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml
deleted file mode 100644
index b090189..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.immersivemode.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.immersivemode"
-            android:label="Tests for com.example.android.immersivemode" />
-
-</manifest>
\ No newline at end of file
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java
deleted file mode 100644
index eb80375..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2013 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.immersivemode.tests;
-
-import com.example.android.immersivemode.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-import android.test.UiThreadTest;
-
-/**
- * Tests for immersive mode sample.
- */
-public class ImmersiveModeSampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private ImmersiveModeFragment mTestFragment;
-
-    public ImmersiveModeSampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (ImmersiveModeFragment)
-                mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-     * Test if the test fixture has been set up correctly.
-     */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-     * Verify that the UI flags actually changed when the toggle method is called.
-     */
-    @UiThreadTest
-    public void testFlagsChanged() {
-        int uiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        mTestFragment.toggleHideyBar();
-        int newUiFlags = getActivity().getWindow().getDecorView().getSystemUiVisibility();
-        assertTrue("UI Flags didn't toggle.", uiFlags != newUiFlags);
-    }
-
-    /**
-     * Verify that the view's height actually changed when the toggle method is called.
-     * This should result in a change in height for the DecorView.
-     */
-    public void testDecorHeightExpanded() {
-        // Grab the initial height of the DecorWindow.
-        int startingHeight = getActivity().getWindow().getDecorView().getHeight();
-
-        // In order to test that this worked:  Need to toggle the immersive mode on the UI thread,
-        // wait a suitable amount of time (this test goes with 200 ms), then check to see if the
-        // height changed.
-        try {
-            Runnable testRunnable = (new Runnable() {
-                public void run() {
-                    // Toggle immersive mode
-                    mTestFragment.toggleHideyBar();
-                    synchronized(this) {
-                        // Notify any thread waiting on this runnable that it can continue
-                        this.notify();
-                    }
-                }
-            });
-            synchronized(testRunnable) {
-                // Since toggling immersive mode makes changes to the view heirarchy, it needs to run
-                // on the UI thread, or crashing will occur.
-                mTestActivity.runOnUiThread(testRunnable);
-                testRunnable.wait();
-
-            }
-            synchronized(this) {
-                //Wait about 200ms for the change to take place
-                wait(200L);
-            }
-        } catch (Throwable throwable) {
-            fail(throwable.getMessage());
-        }
-
-        int expandedHeight = getActivity().getWindow().getDecorView().getHeight();
-        assertTrue("Bars aren't hidden.", expandedHeight != startingHeight);
-    }
-}
\ No newline at end of file
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/SampleTests.java b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/SampleTests.java
deleted file mode 100644
index 162b3bd..0000000
--- a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.immersivemode.tests;
-
-import com.example.android.immersivemode.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for ImmersiveMode sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private ImmersiveModeFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (ImmersiveModeFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/ui/window/ImmersiveMode/build.gradle b/ui/window/ImmersiveMode/build.gradle
deleted file mode 100644
index cca9ac3..0000000
--- a/ui/window/ImmersiveMode/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../../build"
-  pathToSamplesCommon "../../../common"
-}
-apply from: "../../../../../build/build.gradle"
-// END_EXCLUDE
diff --git a/ui/window/ImmersiveMode/buildSrc/build.gradle b/ui/window/ImmersiveMode/buildSrc/build.gradle
deleted file mode 100644
index e344a8c..0000000
--- a/ui/window/ImmersiveMode/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties b/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/window/ImmersiveMode/gradlew b/ui/window/ImmersiveMode/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/ui/window/ImmersiveMode/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/ui/window/ImmersiveMode/gradlew.bat b/ui/window/ImmersiveMode/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/ui/window/ImmersiveMode/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/ui/window/ImmersiveMode/settings.gradle b/ui/window/ImmersiveMode/settings.gradle
deleted file mode 100644
index d13a7a1..0000000
--- a/ui/window/ImmersiveMode/settings.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-include 'ImmersiveModeSample'
diff --git a/ui/window/ImmersiveMode/template-params.xml b/ui/window/ImmersiveMode/template-params.xml
deleted file mode 100644
index e053d26..0000000
--- a/ui/window/ImmersiveMode/template-params.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-<sample>
-    <name>ImmersiveMode</name>
-    <group>UI</group>
-    <package>com.example.android.immersivemode</package>
-    
-    <compileSdkVersion>19</compileSdkVersion>
-
-    <!--TODO: change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-
-    <strings>
-        <intro>
-            <![CDATA[
-            One of the features introduced in KitKat is "immersive mode". Immersive mode gives the
-            user the ability to show/hide the status bar and navigation bar with a swipe.  To try,
-            click the "Toggle immersive mode" button, then try swiping the bar in and out!
-            ]]>
-        </intro>
-        <sample_action>Toggle immersive mode!</sample_action>
-    </strings>
-
-    <template src="base"/>
-    <template src="SingleView"/>
-    <common src="logger"/>
-    <common src="activities"/>
-
-</sample>
diff --git a/views/TextLinkify/AndroidManifest.xml b/views/TextLinkify/AndroidManifest.xml
new file mode 100644
index 0000000..0bf9b97
--- /dev/null
+++ b/views/TextLinkify/AndroidManifest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.views.textlinkify"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="4"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.views.textlinkify.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/views/TextLinkify/TextLinkify/build.gradle b/views/TextLinkify/TextLinkify/build.gradle
new file mode 100644
index 0000000..5bef5ee
--- /dev/null
+++ b/views/TextLinkify/TextLinkify/build.gradle
@@ -0,0 +1,18 @@
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
+}
+apply plugin: 'android'
+
+dependencies {
+    compile "com.android.support:support-v4:18.0.+"
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/views/TextLinkify/TextLinkify/src/main/AndroidManifest.xml b/views/TextLinkify/TextLinkify/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..0bf9b97
--- /dev/null
+++ b/views/TextLinkify/TextLinkify/src/main/AndroidManifest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.views.textlinkify"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="4"
+        android:targetSdkVersion="17" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.views.textlinkify.MainActivity"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
diff --git a/views/TextLinkify/TextLinkify/src/main/java/com/example/android/views/textlinkify/MainActivity.java b/views/TextLinkify/TextLinkify/src/main/java/com/example/android/views/textlinkify/MainActivity.java
new file mode 100644
index 0000000..9e5a7c9
--- /dev/null
+++ b/views/TextLinkify/TextLinkify/src/main/java/com/example/android/views/textlinkify/MainActivity.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2013 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.views.textlinkify;
+
+import android.app.Activity;
+import android.graphics.Typeface;
+import android.os.Bundle;
+import android.text.Html;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.method.LinkMovementMethod;
+import android.text.style.StyleSpan;
+import android.text.style.URLSpan;
+import android.widget.TextView;
+
+/**
+ * This sample demonstrates how clickable links can be added to a
+ * {@link TextView}.
+ *
+ * <p>This can be done in three ways:
+ * <ul>
+ * <li><b>Automatically:</b> Text added to a TextView can automatically be linkified by enabling
+ * autoLinking. In XML, use the android:autoLink property, programatically call
+ * {@link android.widget.TextView#setAutoLinkMask(int)} using an option from
+ * {@link android.text.util.Linkify}</li>
+ *
+ * <li><b>Parsing a String as HTML:</b> See {@link Html#fromHtml(String)})</li>
+ *
+ * <li><b>Manually by constructing a {@link android.text.SpannableString}:</b> Consisting of
+ * {@link android.text.style.StyleSpan} and {@link android.text.style.URLSpan} objects that
+ * are contained within a {@link android.text.SpannableString}</li>
+ * </ul></p>
+ *
+ */
+public class MainActivity extends Activity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.activity_main);
+
+        // BEGIN_INCLUDE(text_auto_linkify)
+        /*
+         *  text_auto_linkify shows the android:autoLink property, which
+         *  automatically linkifies things like URLs and phone numbers
+         *  found in the text. No java code is needed to make this
+         *  work.
+         *  This can also be enabled programmatically by calling
+         *  .setAutoLinkMask(Linkify.ALL) before the text is set on the TextView.
+         *
+         *  See android.text.util.Linkify for other options, for example only
+         *  auto-linking email addresses or phone numbers
+         */
+        // END_INCLUDE(text_auto_linkify)
+
+        // BEGIN_INCLUDE(text_html_resource)
+        /*
+         * text_html_resource has links specified by putting anchor tags (<a>) in the string
+         * resource. By default these links will appear but not
+         * respond to user input. To make them active, you need to
+         * call setMovementMethod() on the TextView object.
+         */
+        TextView textViewResource = (TextView) findViewById(R.id.text_html_resource);
+        textViewResource.setText(
+                Html.fromHtml(getResources().getString(R.string.link_text_manual)));
+        textViewResource.setMovementMethod(LinkMovementMethod.getInstance());
+        // END_INCLUDE(text_html_resource)
+
+        // BEGIN_INCLUDE(text_html_program)
+        /*
+         * text_html_program shows creating text with links from HTML in the Java
+         * code, rather than from a string resource. Note that for a
+         * fixed string, using a (localizable) resource as shown above
+         * is usually a better way to go; this example is intended to
+         * illustrate how you might display text that came from a
+         * dynamic source (eg, the network).
+         */
+        TextView textViewHtml = (TextView) findViewById(R.id.text_html_program);
+        textViewHtml.setText(
+                Html.fromHtml(
+                        "<b>text_html_program: Constructed from HTML programmatically.</b>"
+                                + "  Text with a <a href=\"http://www.google.com\">link</a> "
+                                + "created in the Java source code using HTML."));
+        textViewHtml.setMovementMethod(LinkMovementMethod.getInstance());
+        // END_INCLUDE(text_html_program)
+
+        // BEGIN_INCLUDE(text_spannable)
+        /*
+         * text_spannable illustrates constructing a styled string containing a
+         * link without using HTML at all. Again, for a fixed string
+         * you should probably be using a string resource, not a
+         * hardcoded value.
+         */
+        SpannableString ss = new SpannableString(
+                "text_spannable: Manually created spans. Click here to dial the phone.");
+
+        /*
+         * Make the first 38 characters bold by applying a StyleSpan with bold typeface.
+         *
+         * Characters 45 to 49 (the word "here") is made clickable by applying a URLSpan
+         * pointing to a telephone number. Clicking it opens the "tel:" URL that starts the dialer.
+         *
+         * The SPAN_EXCLUSIVE_EXCLUSIVE flag defines this span as exclusive, which means
+         * that it will not expand to include text inserted on either side of this span.
+         */
+        ss.setSpan(new StyleSpan(Typeface.BOLD), 0, 39,
+                Spanned.SPAN_INCLUSIVE_INCLUSIVE);
+        ss.setSpan(new URLSpan("tel:4155551212"), 40 + 6, 40 + 10,
+                Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+
+        TextView textViewSpan = (TextView) findViewById(R.id.text_spannable);
+        textViewSpan.setText(ss);
+
+        /*
+         * Set the movement method to move between links in this TextView.
+         * This means that the user traverses through links in this TextView, automatically
+         * handling appropriate scrolling and key commands.
+         */
+        textViewSpan.setMovementMethod(LinkMovementMethod.getInstance());
+        // END_INCLUDE(text_spannable)
+    }
+
+}
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/drawable-hdpi/ic_launcher.png b/views/TextLinkify/TextLinkify/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/drawable-hdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkify/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/drawable-mdpi/ic_launcher.png b/views/TextLinkify/TextLinkify/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/drawable-mdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkify/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/drawable-xhdpi/ic_launcher.png b/views/TextLinkify/TextLinkify/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkify/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/drawable-xxhdpi/ic_launcher.png b/views/TextLinkify/TextLinkify/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkify/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/layout/sample_main.xml b/views/TextLinkify/TextLinkify/src/main/res/layout/activity_main.xml
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/layout/sample_main.xml
rename to views/TextLinkify/TextLinkify/src/main/res/layout/activity_main.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw600dp/dimens.xml b/views/TextLinkify/TextLinkify/src/main/res/values-sw600dp/dimens.xml
similarity index 100%
copy from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw600dp/dimens.xml
copy to views/TextLinkify/TextLinkify/src/main/res/values-sw600dp/dimens.xml
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/values-sw720dp-land/dimens.xml b/views/TextLinkify/TextLinkify/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/values-sw720dp-land/dimens.xml
rename to views/TextLinkify/TextLinkify/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v11/styles.xml b/views/TextLinkify/TextLinkify/src/main/res/values-v11/styles.xml
similarity index 100%
copy from ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v11/styles.xml
copy to views/TextLinkify/TextLinkify/src/main/res/values-v11/styles.xml
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/values/dimens.xml b/views/TextLinkify/TextLinkify/src/main/res/values/dimens.xml
similarity index 100%
rename from views/TextLinkify/TextLinkifySample/src/main/res/values/dimens.xml
rename to views/TextLinkify/TextLinkify/src/main/res/values/dimens.xml
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values/strings.xml b/views/TextLinkify/TextLinkify/src/main/res/values/strings.xml
new file mode 100644
index 0000000..371ee69
--- /dev/null
+++ b/views/TextLinkify/TextLinkify/src/main/res/values/strings.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  Copyright 2013 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.
+-->
+
+<resources>
+
+    <string name="app_name">TextLinkify Sample</string>
+    <string name="intro">This sample illustrates how links can be added to a TextView.
+    \nThis can be done either automatically by setting the <i>autoLink</i> property
+    or explicitly.</string>
+    <string name="link_text_auto"><b>text_auto_linkify: Various kinds
+      of data that will be auto-linked.</b>
+      In this text are some things that are actionable.  For instance,
+      you can click on http://www.google.com and it will launch the
+      web browser.  You can click on google.com too.  If you
+      click on (415) 555-1212 it should dial the phone.  Or just write
+      foobar@example.com for an e-mail link.  If you have a URI like
+      http://www.example.com/lala/foobar@example.com you should get the
+      full link not the e-mail address.  Or you can put a location
+      like 1600 Amphitheatre Parkway, Mountain View, CA 94043.  To summarize:
+      https://www.google.com, or 650-253-0000, somebody@example.com,
+      or 9606 North MoPac Expressway, Suite 400, Austin, TX 78759.</string>
+    <string name="link_text_manual"><![CDATA[<b>text_html_resource:
+      Explicit links using &lt;a&gt; markup.</b>
+      This has markup for a <a href="http://www.google.com">link</a> specified
+      via an &lt;a&gt; tag.  Use a \"tel:\" URL
+      to <a href="tel:4155551212">dial a phone number</a>.]]></string>
+
+</resources>
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values/styles.xml b/views/TextLinkify/TextLinkify/src/main/res/values/styles.xml
new file mode 100644
index 0000000..91da12c
--- /dev/null
+++ b/views/TextLinkify/TextLinkify/src/main/res/values/styles.xml
@@ -0,0 +1,40 @@
+<!--
+  Copyright 2013 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.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+    <style name="LinkText">
+        <item name="android:paddingTop">9dp</item>
+        <item name="android:paddingBottom">9dp</item>
+    </style>
+</resources>
diff --git a/views/TextLinkify/TextLinkifySample/.gitignore b/views/TextLinkify/TextLinkifySample/.gitignore
deleted file mode 100644
index 6eb878d..0000000
--- a/views/TextLinkify/TextLinkifySample/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright 2013 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.
-src/template/
-src/common/
-build.gradle
diff --git a/views/TextLinkify/TextLinkifySample/proguard-project.txt b/views/TextLinkify/TextLinkifySample/proguard-project.txt
deleted file mode 100644
index 0d8f171..0000000
--- a/views/TextLinkify/TextLinkifySample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
- To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/views/TextLinkify/TextLinkifySample/src/main/AndroidManifest.xml b/views/TextLinkify/TextLinkifySample/src/main/AndroidManifest.xml
deleted file mode 100644
index 49b4eae..0000000
--- a/views/TextLinkify/TextLinkifySample/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.textlinkify"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk
-        android:minSdkVersion="4"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".MainActivity"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
diff --git a/views/TextLinkify/TextLinkifySample/src/main/java/com/example/android/textlinkify/MainActivity.java b/views/TextLinkify/TextLinkifySample/src/main/java/com/example/android/textlinkify/MainActivity.java
deleted file mode 100644
index c9325a9..0000000
--- a/views/TextLinkify/TextLinkifySample/src/main/java/com/example/android/textlinkify/MainActivity.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 2013 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.textlinkify;
-
-import android.app.Activity;
-import android.graphics.Typeface;
-import android.os.Bundle;
-import android.text.Html;
-import android.text.SpannableString;
-import android.text.Spanned;
-import android.text.method.LinkMovementMethod;
-import android.text.style.StyleSpan;
-import android.text.style.URLSpan;
-import android.widget.TextView;
-
-/**
- * This sample demonstrates how clickable links can be added to a
- * {@link android.widget.TextView}.
- *
- * <p>This can be done in three ways:
- * <ul>
- * <li><b>Automatically:</b> Text added to a TextView can automatically be linkified by enabling
- * autoLinking. In XML, use the android:autoLink property, programatically call
- * {@link android.widget.TextView#setAutoLinkMask(int)} using an option from
- * {@link android.text.util.Linkify}</li>
- *
- * <li><b>Parsing a String as HTML:</b> See {@link android.text.Html#fromHtml(String)})</li>
- *
- * <li><b>Manually by constructing a {@link android.text.SpannableString}:</b> Consisting of
- * {@link android.text.style.StyleSpan} and {@link android.text.style.URLSpan} objects that
- * are contained within a {@link android.text.SpannableString}</li>
- * </ul></p>
- *
- */
-public class MainActivity extends Activity {
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        setContentView(R.layout.sample_main);
-
-        // BEGIN_INCLUDE(text_auto_linkify)
-        /*
-         *  text_auto_linkify shows the android:autoLink property, which
-         *  automatically linkifies things like URLs and phone numbers
-         *  found in the text. No java code is needed to make this
-         *  work.
-         *  This can also be enabled programmatically by calling
-         *  .setAutoLinkMask(Linkify.ALL) before the text is set on the TextView.
-         *
-         *  See android.text.util.Linkify for other options, for example only
-         *  auto-linking email addresses or phone numbers
-         */
-        // END_INCLUDE(text_auto_linkify)
-
-        // BEGIN_INCLUDE(text_html_resource)
-        /*
-         * text_html_resource has links specified by putting anchor tags (<a>) in the string
-         * resource. By default these links will appear but not
-         * respond to user input. To make them active, you need to
-         * call setMovementMethod() on the TextView object.
-         */
-        TextView textViewResource = (TextView) findViewById(R.id.text_html_resource);
-        textViewResource.setText(
-                Html.fromHtml(getResources().getString(R.string.link_text_manual)));
-        textViewResource.setMovementMethod(LinkMovementMethod.getInstance());
-        // END_INCLUDE(text_html_resource)
-
-        // BEGIN_INCLUDE(text_html_program)
-        /*
-         * text_html_program shows creating text with links from HTML in the Java
-         * code, rather than from a string resource. Note that for a
-         * fixed string, using a (localizable) resource as shown above
-         * is usually a better way to go; this example is intended to
-         * illustrate how you might display text that came from a
-         * dynamic source (eg, the network).
-         */
-        TextView textViewHtml = (TextView) findViewById(R.id.text_html_program);
-        textViewHtml.setText(
-                Html.fromHtml(
-                        "<b>text_html_program: Constructed from HTML programmatically.</b>"
-                                + "  Text with a <a href=\"http://www.google.com\">link</a> "
-                                + "created in the Java source code using HTML."));
-        textViewHtml.setMovementMethod(LinkMovementMethod.getInstance());
-        // END_INCLUDE(text_html_program)
-
-        // BEGIN_INCLUDE(text_spannable)
-        /*
-         * text_spannable illustrates constructing a styled string containing a
-         * link without using HTML at all. Again, for a fixed string
-         * you should probably be using a string resource, not a
-         * hardcoded value.
-         */
-        SpannableString ss = new SpannableString(
-                "text_spannable: Manually created spans. Click here to dial the phone.");
-
-        /*
-         * Make the first 38 characters bold by applying a StyleSpan with bold typeface.
-         *
-         * Characters 45 to 49 (the word "here") is made clickable by applying a URLSpan
-         * pointing to a telephone number. Clicking it opens the "tel:" URL that starts the dialer.
-         *
-         * The SPAN_EXCLUSIVE_EXCLUSIVE flag defines this span as exclusive, which means
-         * that it will not expand to include text inserted on either side of this span.
-         */
-        ss.setSpan(new StyleSpan(Typeface.BOLD), 0, 39,
-                Spanned.SPAN_INCLUSIVE_INCLUSIVE);
-        ss.setSpan(new URLSpan("tel:4155551212"), 40 + 6, 40 + 10,
-                Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
-
-        TextView textViewSpan = (TextView) findViewById(R.id.text_spannable);
-        textViewSpan.setText(ss);
-
-        /*
-         * Set the movement method to move between links in this TextView.
-         * This means that the user traverses through links in this TextView, automatically
-         * handling appropriate scrolling and key commands.
-         */
-        textViewSpan.setMovementMethod(LinkMovementMethod.getInstance());
-        // END_INCLUDE(text_spannable)
-    }
-
-}
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/values/strings.xml b/views/TextLinkify/TextLinkifySample/src/main/res/values/strings.xml
deleted file mode 100644
index c50774e..0000000
--- a/views/TextLinkify/TextLinkifySample/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright 2013 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.
--->
-
-<resources>
-
-    <string name="intro">This sample illustrates how links can be added to a TextView.
-    \nThis can be done either automatically by setting the <i>autoLink</i> property
-    or explicitly.</string>
-    <string name="link_text_auto"><b>text_auto_linkify: Various kinds
-      of data that will be auto-linked.</b>
-      In this text are some things that are actionable.  For instance,
-      you can click on http://www.google.com and it will launch the
-      web browser.  You can click on google.com too.  If you
-      click on (415) 555-1212 it should dial the phone.  Or just write
-      foobar@example.com for an e-mail link.  If you have a URI like
-      http://www.example.com/lala/foobar@example.com you should get the
-      full link not the e-mail address.  Or you can put a location
-      like 1600 Amphitheatre Parkway, Mountain View, CA 94043.  To summarize:
-      https://www.google.com, or 650-253-0000, somebody@example.com,
-      or 9606 North MoPac Expressway, Suite 400, Austin, TX 78759.</string>
-    <string name="link_text_manual"><![CDATA[<b>text_html_resource:
-      Explicit links using &lt;a&gt; markup.</b>
-      This has markup for a <a href="http://www.google.com">link</a> specified
-      via an &lt;a&gt; tag.  Use a \"tel:\" URL
-      to <a href="tel:4155551212">dial a phone number</a>.]]></string>
-
-</resources>
diff --git a/views/TextLinkify/TextLinkifySample/src/main/res/values/styles.xml b/views/TextLinkify/TextLinkifySample/src/main/res/values/styles.xml
deleted file mode 100644
index 29c4230..0000000
--- a/views/TextLinkify/TextLinkifySample/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-  Copyright 2013 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.
--->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-    <style name="LinkText">
-        <item name="android:paddingTop">9dp</item>
-        <item name="android:paddingBottom">9dp</item>
-    </style>
-</resources>
diff --git a/views/TextLinkify/TextLinkifySample/tests/AndroidManifest.xml b/views/TextLinkify/TextLinkifySample/tests/AndroidManifest.xml
deleted file mode 100644
index e368f05..0000000
--- a/views/TextLinkify/TextLinkifySample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2013 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.textlinkify.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-            android:minSdkVersion="18"
-            android:targetSdkVersion="19" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-
-    <!--
-    Specifies the instrumentation test runner used to run the tests.
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.textlinkify"
-            android:label="Tests for com.example.android.textlinkify" />
-
-</manifest>
\ No newline at end of file
diff --git a/views/TextLinkify/TextLinkifySample/tests/src/com/example/android/textlinkify/tests/SampleTests.java b/views/TextLinkify/TextLinkifySample/tests/src/com/example/android/textlinkify/tests/SampleTests.java
deleted file mode 100644
index 90a91cc..0000000
--- a/views/TextLinkify/TextLinkifySample/tests/src/com/example/android/textlinkify/tests/SampleTests.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-* Copyright 2013 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.
-*/
-
-
-
-/*
-* Copyright (C) 2013 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.textlinkify.tests;
-
-import com.example.android.textlinkify.*;
-
-import android.test.ActivityInstrumentationTestCase2;
-
-/**
-* Tests for TextLinkify sample.
-*/
-public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
-
-    private MainActivity mTestActivity;
-    private TextLinkifyFragment mTestFragment;
-
-    public SampleTests() {
-        super(MainActivity.class);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        // Starts the activity under test using the default Intent with:
-        // action = {@link Intent#ACTION_MAIN}
-        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
-        // All other fields are null or empty.
-        mTestActivity = getActivity();
-        mTestFragment = (TextLinkifyFragment)
-            mTestActivity.getSupportFragmentManager().getFragments().get(1);
-    }
-
-    /**
-    * Test if the test fixture has been set up correctly.
-    */
-    public void testPreconditions() {
-        //Try to add a message to add context to your assertions. These messages will be shown if
-        //a tests fails and make it easy to understand why a test failed
-        assertNotNull("mTestActivity is null", mTestActivity);
-        assertNotNull("mTestFragment is null", mTestFragment);
-    }
-
-    /**
-    * Add more tests below.
-    */
-
-}
\ No newline at end of file
diff --git a/views/TextLinkify/build.gradle b/views/TextLinkify/build.gradle
index c7a137e..495c503 100644
--- a/views/TextLinkify/build.gradle
+++ b/views/TextLinkify/build.gradle
@@ -1,10 +1 @@
-// BEGIN_EXCLUDE
-import com.example.android.samples.build.SampleGenPlugin
-apply plugin: SampleGenPlugin
-
-samplegen {
-  pathToBuild "../../../../build"
-  pathToSamplesCommon "../../common"
-}
-apply from: "../../../../build/build.gradle"
-// END_EXCLUDE
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
diff --git a/views/TextLinkify/buildSrc/build.gradle b/views/TextLinkify/buildSrc/build.gradle
deleted file mode 100644
index 29282af..0000000
--- a/views/TextLinkify/buildSrc/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-repositories {
-    mavenCentral()
-}
-dependencies {
-    compile 'org.freemarker:freemarker:2.3.20'
-}
-
-sourceSets {
-    main {
-        groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
-        }
-    }
-}
-
diff --git a/views/TextLinkify/gradle/wrapper/gradle-wrapper.jar b/views/TextLinkify/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 8c0fb64..0000000
--- a/views/TextLinkify/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/views/TextLinkify/gradle/wrapper/gradle-wrapper.properties b/views/TextLinkify/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 861eddc..0000000
--- a/views/TextLinkify/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Wed Apr 10 15:27:10 PDT 2013
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/views/TextLinkify/gradlew b/views/TextLinkify/gradlew
deleted file mode 100755
index 91a7e26..0000000
--- a/views/TextLinkify/gradlew
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/views/TextLinkify/gradlew.bat b/views/TextLinkify/gradlew.bat
deleted file mode 100644
index aec9973..0000000
--- a/views/TextLinkify/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windowz variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/views/TextLinkify/settings.gradle b/views/TextLinkify/settings.gradle
index 38e7ddd..2042982 100644
--- a/views/TextLinkify/settings.gradle
+++ b/views/TextLinkify/settings.gradle
@@ -1,4 +1,2 @@
+include ':TextLinkify'
 
-
-
-include 'TextLinkifySample'
diff --git a/views/TextLinkify/template-params.xml b/views/TextLinkify/template-params.xml
deleted file mode 100644
index c703b8b..0000000
--- a/views/TextLinkify/template-params.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2013 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.
--->
-
-<sample>
-    <name>TextLinkify</name>
-    <group>Views</group>
-    <package>com.example.android.textlinkify</package>
-
-    <!-- change minSdk if needed-->
-    <minSdk>4</minSdk>
-
-    <strings>
-        <intro>
-            <![CDATA[
-            This sample illustrates how links can be added to a TextView. This can be done either
-            automatically by setting the "autoLink" property or explicitly.
-            ]]>
-        </intro>
-    </strings>
-
-    <template src="base"/>
-    <common src="logger"/>
-
-</sample>
diff --git a/views/TextLinkify/textLinkify.jd b/views/TextLinkify/textLinkify.jd
new file mode 100644
index 0000000..ca39b7b
--- /dev/null
+++ b/views/TextLinkify/textLinkify.jd
@@ -0,0 +1,15 @@
+page.title=Linkify Sample
+@jd:body
+<p>This sample demonstrates how clickable links can be added to a
+ <a href="http://developer.android.com/reference/android/widget/TextView.html">TextView</a>.
+  This can be done automatically (see
+ <a href="http://developer.android.com/reference/android/widget/TextView.html#setAutoLinkMask(int)">
+TextView#setAutoLinkMask(int)</a>), explicitly by parsing a String as
+ HTML (see
+ <a href="http://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String)">
+ Html#fromHtml(String)</a>) or using a
+  <a href="http://developer.android.com/reference/android/text/SpannableString.html">SpannableString
+</a> consisting of
+ <a href="http://developer.android.com/reference/android/text/style/StyleSpan.html">StyleSpan</a>
+  and <a href="http://developer.android.com/reference/android/text/style/URLSpan.html">URLSpan</a>
+ objects. </p>
\ No newline at end of file