Commits

Robert Craig committed 6447796

Use the isValidFragment override in our main Activity.

This will allow us to move the targetSdkVersion beyond
18 and avoid the subsequent security exception that
is thrown on 4.4 (api_19) devices.

Comments (0)

Files changed (2)

AndroidManifest.xml

     android:versionCode="1"
     android:versionName="1.0">
 
-    <uses-sdk android:targetSdkVersion="18"/>
-
     <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" />

src/com/android/seandroid_admin/SEAndroidAdminActivity.java

     }
 
     @Override
+    protected boolean isValidFragment(String fragmentName) {
+        return "com.android.seandroid_admin.SELinuxEnforcingFragment".equals(fragmentName) ||
+            "com.android.seandroid_admin.MMACFragment".equals(fragmentName) ||
+            "com.android.seandroid_admin.ConfigUpdateFragment".equals(fragmentName) ||
+            "com.android.seandroid_admin.ConfigUpdateMmacFragment".equals(fragmentName);
+    }
+
+    @Override
     public void onBuildHeaders(List<Header> headers) {
         if (TRACE_LIFECYCLE) { Log.v(TAG, "LIFECYCLE ACTIVITY onBuildHeaders()"); }
         if (!SELinux.isSELinuxEnabled()) {