update_engine: Add newer DBus method and signal for GetStatus
The current GetStatus function is pretty non-extendable and there has
been use cases where we wanted to add arguments to it but it was quite
hard to do specially changes in Chrome.
This CL adds a new DBus Method GetStatusAdvanced and Signal
UpdateStatusAdvanced which use a protobuf for communicating dbus
messages. This allows us to extend the protobuf without much effort in
the future.
BUG=chromium:977320
TEST=unittests, precq
Cq-Depend: chromium:1672684, chrome-internal:1424559
Change-Id: Ia93ed189e7561ca18c63b5ded81826bc9b1cff12
Reviewed-on: https://chromium-review.googlesource.com/1669974
Tested-by: Amin Hassani <ahassani@chromium.org>
Commit-Ready: Amin Hassani <ahassani@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/UpdateEngine.conf b/UpdateEngine.conf
index 9490096..42f73fc 100644
--- a/UpdateEngine.conf
+++ b/UpdateEngine.conf
@@ -1,5 +1,20 @@
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<!--
+ Copyright (C) 2019 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.
+!-->
<busconfig>
<policy user="root">
<allow own="org.chromium.UpdateEngine" />
@@ -29,6 +44,9 @@
send_member="GetStatus"/>
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
+ send_member="GetStatusAdvanced"/>
+ <allow send_destination="org.chromium.UpdateEngine"
+ send_interface="org.chromium.UpdateEngineInterface"
send_member="RebootIfNeeded"/>
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
@@ -75,6 +93,9 @@
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
send_member="GetStatus"/>
+ <allow send_destination="org.chromium.UpdateEngine"
+ send_interface="org.chromium.UpdateEngineInterface"
+ send_member="GetStatusAdvanced"/>
</policy>
<policy user="dlcservice">
<allow send_destination="org.chromium.UpdateEngine"
@@ -82,6 +103,9 @@
send_member="GetStatus"/>
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
+ send_member="GetStatusAdvanced"/>
+ <allow send_destination="org.chromium.UpdateEngine"
+ send_interface="org.chromium.UpdateEngineInterface"
send_member="AttemptInstall"/>
</policy>
</busconfig>