| Index: build/android/pylib/content_settings.py
|
| diff --git a/build/android/pylib/content_settings.py b/build/android/pylib/content_settings.py
|
| index 11bc5fde93e219c8db6f32a6a8746409fc2361d7..54cedfe21a302bc0491dfe07294c893adabc306a 100644
|
| --- a/build/android/pylib/content_settings.py
|
| +++ b/build/android/pylib/content_settings.py
|
| @@ -40,8 +40,8 @@ class ContentSettings(dict):
|
| def iteritems(self):
|
| # Example row:
|
| # 'Row: 0 _id=13, name=logging_id2, value=-1fccbaa546705b05'
|
| - for row in self._device.old_interface.RunShellCommandWithSU(
|
| - 'content query --uri content://%s' % self._table):
|
| + for row in self._device.RunShellCommand(
|
| + 'content query --uri content://%s' % self._table, root=True):
|
| fields = row.split(', ')
|
| key = None
|
| value = None
|
| @@ -55,28 +55,31 @@ class ContentSettings(dict):
|
| yield key, value
|
|
|
| def __getitem__(self, key):
|
| - return self._device.old_interface.RunShellCommandWithSU(
|
| + return self._device.RunShellCommand(
|
| 'content query --uri content://%s --where "name=\'%s\'" '
|
| - '--projection value' % (self._table, key)).strip()
|
| + '--projection value' % (self._table, key), root=True).strip()
|
|
|
| def __setitem__(self, key, value):
|
| if key in self:
|
| - self._device.old_interface.RunShellCommandWithSU(
|
| + self._device.RunShellCommand(
|
| 'content update --uri content://%s '
|
| '--bind value:%s:%s --where "name=\'%s\'"' % (
|
| self._table,
|
| - self._GetTypeBinding(value), value, key))
|
| + self._GetTypeBinding(value), value, key),
|
| + root=True)
|
| else:
|
| - self._device.old_interface.RunShellCommandWithSU(
|
| + self._device.RunShellCommand(
|
| 'content insert --uri content://%s '
|
| '--bind name:%s:%s --bind value:%s:%s' % (
|
| self._table,
|
| self._GetTypeBinding(key), key,
|
| - self._GetTypeBinding(value), value))
|
| + self._GetTypeBinding(value), value),
|
| + root=True)
|
|
|
| def __delitem__(self, key):
|
| - self._device.old_interface.RunShellCommandWithSU(
|
| + self._device.RunShellCommand(
|
| 'content delete --uri content://%s '
|
| '--bind name:%s:%s' % (
|
| self._table,
|
| - self._GetTypeBinding(key), key))
|
| + self._GetTypeBinding(key), key),
|
| + root=True)
|
|
|