Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96985746 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[SettingsProvider] additional logging for debugging failed writes"

parents 7153c647 b50ff5ae
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1858,6 +1858,8 @@ public class SettingsProvider extends ContentProvider {
            if (!Settings.checkAndNoteWriteSettingsOperation(getContext(),
                    Binder.getCallingUid(), callingPackage, getCallingAttributionTag(),
                    true)) {
                Slog.e(LOG_TAG, "Calling package: " + callingPackage + " is not allowed to "
                        + "write system settings: " + name);
                return false;
            }
        }
@@ -1866,6 +1868,8 @@ public class SettingsProvider extends ContentProvider {
        final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(runAsUserId);

        if (isSettingRestrictedForUser(name, callingUserId, value, Binder.getCallingUid())) {
            Slog.e(LOG_TAG, "UserId: " + callingUserId + " is disallowed to change system "
                    + "setting: " + name);
            return false;
        }

@@ -1877,6 +1881,8 @@ public class SettingsProvider extends ContentProvider {

        // Only the owning user id can change the setting.
        if (owningUserId != callingUserId) {
            Slog.e(LOG_TAG, "UserId: " + callingUserId + " is not the owning userId: "
                    + owningUserId);
            return false;
        }

@@ -1917,7 +1923,7 @@ public class SettingsProvider extends ContentProvider {
                            false, null);
                }
            }

            Slog.e(LOG_TAG, "Unknown operation code: " + operation);
            return false;
        }
    }