package com.corner23.android.usb_otg_manager;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;

public class Unmount extends Service {

	private Context mContext = this;
    
    private void handleCommand(Intent intent) {
    	Log.d("HAHHAHAAAA", "FUCKING DEAD!");
    	
    	boolean success = Main.doUnmount();
    	NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
        Notification notification = new Notification();
        notification.icon = R.drawable.notification;
        notification.defaults = Notification.DEFAULT_ALL;
        
    	if (success) {
    		notificationManager.cancelAll();
            notification.setLatestEventInfo(mContext, getResources().getString(R.string.app_name), 
            		getResources().getString(R.string.str_unmounted_notify), null);
    	} else {
            notification.setLatestEventInfo(mContext, getResources().getString(R.string.app_name), 
            		getResources().getString(R.string.str_err_unmount), null);
    	}
    	
        notificationManager.notify(0, notification);
    }
    	
	@Override
	public IBinder onBind(Intent intent) {
		return null;
	}

	@Override
	public void onStart(Intent intent, int startId) {
	    handleCommand(intent);
	}
	
	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		handleCommand(intent);
		return START_STICKY;
	}	
}

@@ -109,24 +109,58 @@
 ionManager;%0A
+import android.app.PendingIntent;%0A
 import andro
@@ -175,16 +175,16 @@
 ervice;%0A
-
 import a
@@ -504,24 +504,96 @@
 oUnmount();%0A
+    %09PendingIntent pi = PendingIntent.getService(mContext, 0, null, 0);%0A
     %09Notific
@@ -1112,20 +1112,18 @@
 otify), 
-null
+pi
 );%0A    %09
@@ -1297,20 +1297,18 @@
 mount), 
-null
+pi
 );%0A    %09

Fix idiot exception