Migrate BasicNotifications sample to new build system

Updated BasicNotifications sample to use the new templatized build
system, for conformity with other samples.

Change-Id: I7d2d70bee1dfc08b3d71a036a5af2a7fcf23baa8
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/build.gradle b/ui/notifications/BasicNotifications/BasicNotifications/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml
deleted file mode 100644
index 5193ae6..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/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.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
deleted file mode 100644
index 38a25ae..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png
+++ /dev/null
Binary files differ
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
deleted file mode 100644
index a55cffb..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/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>
-
-    <!--
-        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
deleted file mode 100644
index e010230..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,28 +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>
-
-    <!--
-        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/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml
deleted file mode 100644
index 916d51a..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.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.
--->
-<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
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore
@@ -0,0 +1,16 @@
+# Copyright 2013 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT 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
new file mode 100644
index 0000000..0d8f171
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/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/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..1e37d0b
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.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.
+-->
+
+<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/java/com/example/android/basicnotifications/MainActivity.java b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
similarity index 98%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
index 50ac798..3e78c34 100644
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
@@ -23,7 +23,7 @@
 
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.main_layout);
+        setContentView(R.layout.sample_layout);
 
     }
 
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/layout/main_layout.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/layout/sample_layout.xml
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/layout/main_layout.xml
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/layout/sample_layout.xml
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
similarity index 96%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
index d9300ef..075f681 100644
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
@@ -16,7 +16,6 @@
 -->
 <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
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/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.
+  -->
+<!-- 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="${sample.package}.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="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</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
new file mode 100644
index 0000000..ffe5840
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* Copyright 2013 The Android Open Source Project
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT 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
deleted file mode 100644
index 38608df..0000000
--- a/ui/notifications/BasicNotifications/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-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/_index.jd b/ui/notifications/BasicNotifications/_index.jd
new file mode 100644
index 0000000..9556b29
--- /dev/null
+++ b/ui/notifications/BasicNotifications/_index.jd
@@ -0,0 +1,14 @@
+
+
+
+page.tags="BasicNotifications"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            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.
+            
+        </p>
diff --git a/ui/notifications/BasicNotifications/build.gradle b/ui/notifications/BasicNotifications/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/notifications/BasicNotifications/build.gradle
+++ b/ui/notifications/BasicNotifications/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/notifications/BasicNotifications/buildSrc/build.gradle b/ui/notifications/BasicNotifications/buildSrc/build.gradle
new file mode 100644
index 0000000..e344a8c
--- /dev/null
+++ b/ui/notifications/BasicNotifications/buildSrc/build.gradle
@@ -0,0 +1,18 @@
+
+
+
+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 055ba6f..861eddc 100644
--- a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#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
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/notifications/BasicNotifications/settings.gradle b/ui/notifications/BasicNotifications/settings.gradle
index 6f0df94..b33d67f 100644
--- a/ui/notifications/BasicNotifications/settings.gradle
+++ b/ui/notifications/BasicNotifications/settings.gradle
@@ -1 +1,4 @@
-include ':BasicNotifications'
+
+
+
+include 'BasicNotificationsSample'
diff --git a/ui/notifications/BasicNotifications/template-params.xml b/ui/notifications/BasicNotifications/template-params.xml
new file mode 100644
index 0000000..2d8776f
--- /dev/null
+++ b/ui/notifications/BasicNotifications/template-params.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.
+-->
+
+<sample>
+    <name>BasicNotifications</name>
+    <group>NoGroup</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>