Revert "port to NotificationManagerCompat to test APIs"

This reverts commit 55c563b549ac8b0319e7ec82bfb6e0f533addffb.

Change-Id: I5a39e57e0b08ab312318efb176427f0abb58741a
diff --git a/NotificationShowcase/res/layout/main.xml b/NotificationShowcase/res/layout/main.xml
index d082544..ddad922 100644
--- a/NotificationShowcase/res/layout/main.xml
+++ b/NotificationShowcase/res/layout/main.xml
@@ -8,6 +8,5 @@
         <Button android:id="@+id/button1" android:text="@string/post_button_label" android:layout_height="wrap_content" android:layout_width="match_parent" android:onClick="doPost"></Button>
         <Button android:id="@+id/button2" android:text="@string/remove_button_label" android:layout_height="wrap_content" android:layout_width="match_parent" android:onClick="doRemove"></Button>
         <Button android:id="@+id/button3" android:text="@string/prefs_button_label" android:layout_height="wrap_content" android:layout_width="match_parent" android:onClick="doPrefs"></Button>
-        <Button android:id="@+id/disable" android:text="@string/no_button_label" android:layout_height="wrap_content" android:layout_width="match_parent" android:onClick="doDisable"></Button>
     </LinearLayout>
 </FrameLayout>
diff --git a/NotificationShowcase/res/values/strings.xml b/NotificationShowcase/res/values/strings.xml
index cd7239e..ca534c9 100644
--- a/NotificationShowcase/res/values/strings.xml
+++ b/NotificationShowcase/res/values/strings.xml
@@ -5,9 +5,6 @@
     <string name="post_button_label">Post Notifications</string>
     <string name="remove_button_label">Remove Notifications</string>
     <string name="prefs_button_label">Preferences</string>
-    <string name="disable_button_label">Disable Notifications</string>
-    <string name="enable_button_label">Enable Notifications</string>
-    <string name="no_button_label">No Idea Dog</string>
     <string name="answered">call answered</string>
     <string name="ignored">call ignored</string>
     <string name="full_screen_name">Full Screen Activity</string>
diff --git a/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationService.java b/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationService.java
index 5fb2a2b..2c21a7e 100644
--- a/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationService.java
+++ b/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationService.java
@@ -19,6 +19,7 @@
 import android.app.AlarmManager;
 import android.app.IntentService;
 import android.app.Notification;
+import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.content.ComponentName;
 import android.content.ContentResolver;
@@ -35,7 +36,6 @@
 import android.os.SystemClock;
 import android.provider.ContactsContract;
 import android.support.v4.app.NotificationCompat;
-import android.support.v4.app.NotificationManagerCompat;
 import android.support.v7.preference.PreferenceManager;
 import android.text.SpannableString;
 import android.text.TextUtils;
@@ -185,7 +185,8 @@
 
     @Override
     protected void onHandleIntent(Intent intent) {
-        NotificationManagerCompat noMa = NotificationManagerCompat.from(this);
+        NotificationManager noMa =
+                (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
         if (ACTION_DESTROY.equals(intent.getAction())) {
             noMa.cancelAll();
             return;
diff --git a/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationShowcaseActivity.java b/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationShowcaseActivity.java
index 2d0d09b..8d1a2fc 100644
--- a/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationShowcaseActivity.java
+++ b/NotificationShowcase/src/com/android/example/notificationshowcase/NotificationShowcaseActivity.java
@@ -8,11 +8,8 @@
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
-import android.net.Uri;
 import android.os.Bundle;
-import android.support.v4.app.NotificationManagerCompat;
 import android.view.View;
-import android.widget.Button;
 
 public class NotificationShowcaseActivity extends Activity {
     private static final String TAG = "NotificationShowcase";
@@ -22,18 +19,6 @@
         setContentView(R.layout.main);
     }
 
-    @Override
-    protected void onResume() {
-        super.onResume();
-        Button disableBtn = (Button) findViewById(R.id.disable);
-        NotificationManagerCompat noMa = NotificationManagerCompat.from(this);
-        if(noMa.areNotificationsEnabled()) {
-            disableBtn.setText(R.string.disable_button_label);
-        } else {
-            disableBtn.setText(R.string.enable_button_label);
-        }
-    }
-
     public void doPost(View v) {
         Intent intent = new Intent(NotificationService.ACTION_CREATE);
         intent.setComponent(new ComponentName(this, NotificationService.class));
@@ -51,9 +36,4 @@
         intent.setComponent(new ComponentName(this, SettingsActivity.class));
         startActivity(intent);
     }
-
-    public void doDisable(View v) {
-        startActivity(new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
-                Uri.parse("package:com.android.example.notificationshowcase")));
-    }
 }
diff --git a/NotificationShowcase/src/com/android/example/notificationshowcase/ProgressService.java b/NotificationShowcase/src/com/android/example/notificationshowcase/ProgressService.java
index cbc3476..799708d 100644
--- a/NotificationShowcase/src/com/android/example/notificationshowcase/ProgressService.java
+++ b/NotificationShowcase/src/com/android/example/notificationshowcase/ProgressService.java
@@ -59,7 +59,7 @@
                 noMa.notify(NotificationService.NOTIFICATION_ID + mId,
                         NotificationService.makeUploadNotification(
                                 ProgressService.this, mProgress, mWhen));
-                mProgress += 2;
+                mProgress += 10;
             if (mProgress <= 100) {
                 handler.postDelayed(this, 1000);
             }