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

Commit 08540bfb authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "power.stats: Use PowerStats HAL v1.0 in cuttlefish"

parents cc078755 6bb3b5f0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and

cc_binary {
    name: "android.hardware.power.stats@1.0-service",
    name: "android.hardware.power.stats@1.0-service.mock",
    relative_install_path: "hw",
    init_rc: ["android.hardware.power.stats@1.0-service.rc"],
    srcs: ["service.cpp", "PowerStats.cpp"],
@@ -31,4 +31,5 @@ cc_binary {
        "android.hardware.power.stats@1.0",
    ],
    vendor: true,
    vintf_fragments: ["android.hardware.power.stats@1.0-service-mock.xml"],
}
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@
 * limitations under the License.
 */

#define LOG_TAG "android.hardware.power.stats@1.0-service-mock"

#include "PowerStats.h"
#include <android-base/file.h>
#include <android-base/logging.h>
+11 −0
Original line number Diff line number Diff line
<manifest version="1.0" type="device">
    <hal format="hidl">
        <name>android.hardware.power.stats</name>
        <transport>hwbinder</transport>
        <version>1.0</version>
        <interface>
            <name>IPowerStats</name>
            <instance>default</instance>
        </interface>
    </hal>
</manifest>
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
service vendor.power.stats-hal-1-0 /vendor/bin/hw/android.hardware.power.stats@1.0-service
service vendor.power.stats-hal-1-0-mock /vendor/bin/hw/android.hardware.power.stats@1.0-service.mock
    interface android.hardware.power.stats@1.0::IPowerStats default
    class hal
    user system
    group system
+2 −2
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#define LOG_TAG "android.hardware.power.stats@1.0-service"
#define LOG_TAG "android.hardware.power.stats@1.0-service-mock"

#include <android/log.h>
#include <hidl/HidlTransportSupport.h>
@@ -82,7 +82,7 @@ class DefaultStateResidencyDataProvider : public IStateResidencyDataProvider {
};

int main(int /* argc */, char** /* argv */) {
    ALOGI("power.stats service 1.0 is starting.");
    ALOGI("power.stats service 1.0 mock is starting.");

    PowerStats* service = new PowerStats();
    if (service == nullptr) {