Optimizing battery usage for applications in Huawei