diff options
3 files changed, 9 insertions, 1 deletions
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index a1d8f22..da3ca0f 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -173,4 +173,8 @@ 0 means no timeout; battery sounds will always play >0 is milliseconds of screen-off time after which battery sounds will not play --> <integer name="def_low_battery_sound_timeout">0</integer> + + <!-- Default for Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE --> + <integer name="def_wifi_scan_always_available">0</integer> + </resources> diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 09c21f3..ed86f42 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -2274,6 +2274,9 @@ public class DatabaseHelper extends SQLiteOpenHelper { loadIntegerSetting(stmt, Settings.Global.LOW_BATTERY_SOUND_TIMEOUT, R.integer.def_low_battery_sound_timeout); + loadIntegerSetting(stmt, Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, + R.integer.def_wifi_scan_always_available); + // --- New global settings start here } finally { if (stmt != null) stmt.close(); diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 0d535cc..816ae69 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -877,7 +877,7 @@ class MountService extends IMountService.Stub /* Send the media unmounted event first */ if (DEBUG_EVENTS) Slog.i(TAG, "Sending unmounted event first"); updatePublicVolumeState(volume, Environment.MEDIA_UNMOUNTED); - sendStorageIntent(Environment.MEDIA_UNMOUNTED, volume, UserHandle.ALL); + sendStorageIntent(Intent.ACTION_MEDIA_UNMOUNTED, volume, UserHandle.ALL); if (DEBUG_EVENTS) Slog.i(TAG, "Sending media removed"); updatePublicVolumeState(volume, Environment.MEDIA_REMOVED); @@ -1164,6 +1164,7 @@ class MountService extends IMountService.Stub private void sendStorageIntent(String action, StorageVolume volume, UserHandle user) { final Intent intent = new Intent(action, Uri.parse("file://" + volume.getPath())); intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, volume); + intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); Slog.d(TAG, "sendStorageIntent " + intent + " to " + user); mContext.sendBroadcastAsUser(intent, user); } |
