Loading services/core/java/com/android/server/am/GlobalSettingsToPropertiesMapper.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.am; import android.content.ContentResolver; import android.content.ContentResolver; import android.database.ContentObserver; import android.database.ContentObserver; import android.net.Uri; import android.net.Uri; import android.os.Build; import android.os.SystemProperties; import android.os.SystemProperties; import android.provider.Settings; import android.provider.Settings; import android.text.TextUtils; import android.text.TextUtils; Loading Loading @@ -98,9 +99,16 @@ class GlobalSettingsToPropertiesMapper { try { try { systemPropertiesSet(key, value); systemPropertiesSet(key, value); } catch (Exception e) { } catch (Exception e) { // Failure to set a property can be caused by SELinux denial. This usually indicates // that the property wasn't whitelisted in sepolicy. // No need to report it on all user devices, only on debug builds. if (Build.IS_DEBUGGABLE) { Slog.wtf(TAG, "Unable to set property " + key + " value '" + value + "'", e); } else { Slog.e(TAG, "Unable to set property " + key + " value '" + value + "'", e); Slog.e(TAG, "Unable to set property " + key + " value '" + value + "'", e); } } } } } @VisibleForTesting @VisibleForTesting protected String systemPropertiesGet(String key) { protected String systemPropertiesGet(String key) { Loading Loading
services/core/java/com/android/server/am/GlobalSettingsToPropertiesMapper.java +9 −1 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.am; import android.content.ContentResolver; import android.content.ContentResolver; import android.database.ContentObserver; import android.database.ContentObserver; import android.net.Uri; import android.net.Uri; import android.os.Build; import android.os.SystemProperties; import android.os.SystemProperties; import android.provider.Settings; import android.provider.Settings; import android.text.TextUtils; import android.text.TextUtils; Loading Loading @@ -98,9 +99,16 @@ class GlobalSettingsToPropertiesMapper { try { try { systemPropertiesSet(key, value); systemPropertiesSet(key, value); } catch (Exception e) { } catch (Exception e) { // Failure to set a property can be caused by SELinux denial. This usually indicates // that the property wasn't whitelisted in sepolicy. // No need to report it on all user devices, only on debug builds. if (Build.IS_DEBUGGABLE) { Slog.wtf(TAG, "Unable to set property " + key + " value '" + value + "'", e); } else { Slog.e(TAG, "Unable to set property " + key + " value '" + value + "'", e); Slog.e(TAG, "Unable to set property " + key + " value '" + value + "'", e); } } } } } @VisibleForTesting @VisibleForTesting protected String systemPropertiesGet(String key) { protected String systemPropertiesGet(String key) { Loading