Uninstaller: Allow for Substratum to restart SystemUI on boolExtra

When cleaning overlays or performing an uninstall, allow Substratum to
send a bool to Masquerade to allow the system to automatically restart
the SystemUI.
diff --git a/.gitignore b/.gitignore
index da373ef..05180e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,7 @@
 *.iml
 .gradle
 /local.properties
-/.idea/workspace.xml
-/.idea/libraries
+/.idea/
 .DS_Store
 /build
 /captures
diff --git a/app/build.gradle b/app/build.gradle
index ba0b5bd..b10906e 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -20,8 +20,8 @@
         applicationId "masquerade.substratum"
         minSdkVersion 21
         targetSdkVersion 23
-        versionCode 12
-        versionName "twelve"
+        versionCode 13
+        versionName "thirteen"
     }
 
     buildTypes {
diff --git a/app/src/androidTest/java/projekt/substratum/helper/ApplicationTest.java b/app/src/androidTest/java/projekt/substratum/helper/ApplicationTest.java
deleted file mode 100644
index 642bbe4..0000000
--- a/app/src/androidTest/java/projekt/substratum/helper/ApplicationTest.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package projekt.substratum.helper;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
- */
-public class ApplicationTest extends ApplicationTestCase<Application> {
-    public ApplicationTest() {
-        super(Application.class);
-    }
-}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9bfe9f1..ceda1de 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,7 +4,7 @@
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
-    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
+    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
 
     <application
         android:allowBackup="true"
diff --git a/app/src/main/java/masquerade/substratum/util/Helper.java b/app/src/main/java/masquerade/substratum/util/Helper.java
index 8ca6964..b17da2d 100644
--- a/app/src/main/java/masquerade/substratum/util/Helper.java
+++ b/app/src/main/java/masquerade/substratum/util/Helper.java
@@ -28,9 +28,11 @@
                         "integrity and service activation.");
             }
         } else if (intent.getStringArrayListExtra("pm-uninstall") != null) {
-            new Uninstaller().Uninstaller(intent, "pm-uninstall", false);
+            new Uninstaller().Uninstaller(intent, "pm-uninstall", false,
+                    intent.getBooleanExtra("restart_systemui", false));
         } else if (intent.getStringArrayListExtra("pm-uninstall-specific") != null) {
-            new Uninstaller().Uninstaller(intent, "pm-uninstall-specific", true);
+            new Uninstaller().Uninstaller(intent, "pm-uninstall-specific", true,
+                    intent.getBooleanExtra("restart_systemui", false));
         } else if (intent.getStringExtra("om-commands") != null) {
             Log.d("Masquerade", "Running command: \"" +
                     intent.getStringExtra("om-commands") + "\"");
diff --git a/app/src/main/java/masquerade/substratum/util/Uninstaller.java b/app/src/main/java/masquerade/substratum/util/Uninstaller.java
index 95cfc3c..71fb175 100644
--- a/app/src/main/java/masquerade/substratum/util/Uninstaller.java
+++ b/app/src/main/java/masquerade/substratum/util/Uninstaller.java
@@ -5,7 +5,6 @@
 import android.os.Environment;
 import android.util.Log;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -17,12 +16,15 @@
 
     private Intent mIntent;
     private String uninstallString;
-    private Boolean specific;
+    private boolean specific;
+    private boolean restartSystemUI;
 
-    public void Uninstaller(Intent mIntent, String uninstallString, Boolean specific) {
+    public void Uninstaller(Intent mIntent, String uninstallString,
+                            boolean specific, boolean restartSystemUI) {
         this.mIntent = mIntent;
         this.uninstallString = uninstallString;
         this.specific = specific;
+        this.restartSystemUI = restartSystemUI;
         new UninstallAsync().execute("");
     }
 
@@ -30,11 +32,12 @@
 
         @Override
         protected String doInBackground(String... sUrl) {
-            uninstall_handler(mIntent, uninstallString, specific);
+            uninstall_handler(mIntent, uninstallString, specific, restartSystemUI);
             return null;
         }
 
-        private void uninstall_handler(Intent intent, String inheritor, boolean specific) {
+        private void uninstall_handler(Intent intent, String inheritor,
+                                       boolean specific, boolean restartSystemUI) {
             try {
                 String final_commands_disable = "";
                 String final_commands_uninstall = "";
@@ -88,6 +91,10 @@
                     Root.runCommand(final_commands_uninstall);
                 }
 
+                if (restartSystemUI) {
+                    Root.runCommand("pkill com.android.systemui");
+                }
+
                 if (!specific) {
                     // Clear the resource idmapping files generated by OMS
                     Log.d("Masquerade", "Cleaning up resource-cache directory...");
diff --git a/app/src/test/java/projekt/substratum/helper/ExampleUnitTest.java b/app/src/test/java/projekt/substratum/helper/ExampleUnitTest.java
deleted file mode 100644
index 526b875..0000000
--- a/app/src/test/java/projekt/substratum/helper/ExampleUnitTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package projekt.substratum.helper;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * To work on unit tests, switch the Test Artifact in the Build Variants view.
- */
-public class ExampleUnitTest {
-    @Test
-    public void addition_isCorrect() throws Exception {
-        assertEquals(4, 2 + 2);
-    }
-}
\ No newline at end of file