Loading core/java/android/provider/Settings.java +14 −0 Original line number Diff line number Diff line Loading @@ -5397,6 +5397,20 @@ public final class Settings { */ public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; /** * URL for intent firewall updates * @hide */ public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = "intent_firewall_content_url"; /** * URL for intent firewall update metadata * @hide */ public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = "intent_firewall_metadata_url"; /** * SELinux enforcement status. If 0, permissive; if 1, enforcing. * @hide Loading core/res/AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -2301,6 +2301,12 @@ </intent-filter> </receiver> <receiver android:name="com.android.server.updates.IntentFirewallInstallReceiver" > <intent-filter> <action android:name="android.intent.action.UPDATE_INTENT_FIREWALL" /> </intent-filter> </receiver> <receiver android:name="com.android.server.updates.SmsShortCodesInstallReceiver" > <intent-filter> <action android:name="android.intent.action.UPDATE_SMS_SHORT_CODES" /> Loading services/java/com/android/server/firewall/IntentFirewall.java +8 −4 Original line number Diff line number Diff line Loading @@ -42,7 +42,9 @@ import java.util.List; public class IntentFirewall { private static final String TAG = "IntentFirewall"; private static final String RULES_FILENAME = "ifw.xml"; // e.g. /data/system/ifw/ifw.xml or /data/secure/system/ifw/ifw.xml private static final File RULES_FILE = new File(Environment.getSystemSecureDirectory(), "ifw/ifw.xml"); private static final String TAG_RULES = "rules"; private static final String TAG_ACTIVITY = "activity"; Loading Loading @@ -93,9 +95,7 @@ public class IntentFirewall { public IntentFirewall(AMSInterface ams) { mAms = ams; File dataSystemDir = new File(Environment.getDataDirectory(), "system"); File rulesFile = new File(dataSystemDir, RULES_FILENAME); readRules(rulesFile); readRules(getRulesFile()); } public boolean checkStartActivity(Intent intent, ApplicationInfo callerApp, Loading Loading @@ -127,6 +127,10 @@ public class IntentFirewall { return !block; } public static File getRulesFile() { return RULES_FILE; } private void readRules(File rulesFile) { FileInputStream fis; try { Loading services/java/com/android/server/updates/IntentFirewallInstallReceiver.java 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.updates; import com.android.server.firewall.IntentFirewall; public class IntentFirewallInstallReceiver extends ConfigUpdateInstallReceiver { public IntentFirewallInstallReceiver() { super(IntentFirewall.getRulesFile().getParent(), IntentFirewall.getRulesFile().getName(), "metadata/", "version"); } } Loading
core/java/android/provider/Settings.java +14 −0 Original line number Diff line number Diff line Loading @@ -5397,6 +5397,20 @@ public final class Settings { */ public static final String CERT_PIN_UPDATE_METADATA_URL = "cert_pin_metadata_url"; /** * URL for intent firewall updates * @hide */ public static final String INTENT_FIREWALL_UPDATE_CONTENT_URL = "intent_firewall_content_url"; /** * URL for intent firewall update metadata * @hide */ public static final String INTENT_FIREWALL_UPDATE_METADATA_URL = "intent_firewall_metadata_url"; /** * SELinux enforcement status. If 0, permissive; if 1, enforcing. * @hide Loading
core/res/AndroidManifest.xml +6 −0 Original line number Diff line number Diff line Loading @@ -2301,6 +2301,12 @@ </intent-filter> </receiver> <receiver android:name="com.android.server.updates.IntentFirewallInstallReceiver" > <intent-filter> <action android:name="android.intent.action.UPDATE_INTENT_FIREWALL" /> </intent-filter> </receiver> <receiver android:name="com.android.server.updates.SmsShortCodesInstallReceiver" > <intent-filter> <action android:name="android.intent.action.UPDATE_SMS_SHORT_CODES" /> Loading
services/java/com/android/server/firewall/IntentFirewall.java +8 −4 Original line number Diff line number Diff line Loading @@ -42,7 +42,9 @@ import java.util.List; public class IntentFirewall { private static final String TAG = "IntentFirewall"; private static final String RULES_FILENAME = "ifw.xml"; // e.g. /data/system/ifw/ifw.xml or /data/secure/system/ifw/ifw.xml private static final File RULES_FILE = new File(Environment.getSystemSecureDirectory(), "ifw/ifw.xml"); private static final String TAG_RULES = "rules"; private static final String TAG_ACTIVITY = "activity"; Loading Loading @@ -93,9 +95,7 @@ public class IntentFirewall { public IntentFirewall(AMSInterface ams) { mAms = ams; File dataSystemDir = new File(Environment.getDataDirectory(), "system"); File rulesFile = new File(dataSystemDir, RULES_FILENAME); readRules(rulesFile); readRules(getRulesFile()); } public boolean checkStartActivity(Intent intent, ApplicationInfo callerApp, Loading Loading @@ -127,6 +127,10 @@ public class IntentFirewall { return !block; } public static File getRulesFile() { return RULES_FILE; } private void readRules(File rulesFile) { FileInputStream fis; try { Loading
services/java/com/android/server/updates/IntentFirewallInstallReceiver.java 0 → 100644 +27 −0 Original line number Diff line number Diff line /* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.updates; import com.android.server.firewall.IntentFirewall; public class IntentFirewallInstallReceiver extends ConfigUpdateInstallReceiver { public IntentFirewallInstallReceiver() { super(IntentFirewall.getRulesFile().getParent(), IntentFirewall.getRulesFile().getName(), "metadata/", "version"); } }