Check "Unknown Sources" is Enabled by Default

Bug 4080822

Change-Id: Idba3b1871650eb7dea1e96e630e8ac15f4f03ec1
diff --git a/tests/tests/provider/src/android/provider/cts/Settings_SecureTest.java b/tests/tests/provider/src/android/provider/cts/Settings_SecureTest.java
index 6ce4157..c325abf 100644
--- a/tests/tests/provider/src/android/provider/cts/Settings_SecureTest.java
+++ b/tests/tests/provider/src/android/provider/cts/Settings_SecureTest.java
@@ -23,6 +23,7 @@
 
 import android.content.ContentResolver;
 import android.net.Uri;
+import android.provider.Settings;
 import android.provider.Settings.Secure;
 import android.provider.Settings.SettingNotFoundException;
 import android.test.AndroidTestCase;
@@ -178,4 +179,9 @@
         assertNotNull(uri);
         assertEquals(Uri.withAppendedPath(Secure.CONTENT_URI, name), uri);
     }
+
+    public void testUnknownSourcesOffByDefault() throws SettingNotFoundException {
+        assertEquals("Device should not ship with 'Unknown Sources' enabled by default.",
+                0, Secure.getInt(cr, Settings.Secure.INSTALL_NON_MARKET_APPS));
+    }
 }