Ran clang-format on android/cdm/ files.

[ Merge of http://go/wvgerrit/87123 ]

Certain android files have yet to be formated since we introduced
clang-formatting.

Test: built for android
Bug: 134365840
Change-Id: Ia316b039e7469f7cf803464ee95a919fe7966450
This commit is contained in:
Alex Dale
2019-10-02 11:55:27 -07:00
parent 78e84dcd3b
commit bdcb79a442
13 changed files with 1023 additions and 1081 deletions

View File

@@ -20,21 +20,21 @@ class Timer::Impl : virtual public android::RefBase {
class ImplThread : public android::Thread {
public:
ImplThread() : Thread(false), handler_(nullptr), period_ns_(0) {}
virtual ~ImplThread() {};
virtual ~ImplThread() {}
bool Start(TimerHandler *handler, uint32_t time_in_secs) {
bool Start(TimerHandler* handler, uint32_t time_in_secs) {
handler_ = handler;
period_ns_ = time_in_secs * 1000000000ll;
return run("wvcdm::Timer::Impl") == android::NO_ERROR;
}
void Stop() {
{
android::Mutex::Autolock autoLock(lock_);
stop_condition_.signal();
}
requestExitAndWait();
}
void Stop() {
{
android::Mutex::Autolock autoLock(lock_);
stop_condition_.signal();
}
requestExitAndWait();
}
private:
virtual bool threadLoop() {
@@ -44,7 +44,7 @@ class Timer::Impl : virtual public android::RefBase {
return true;
}
TimerHandler *handler_;
TimerHandler* handler_;
uint64_t period_ns_;
android::Mutex lock_;
android::Condition stop_condition_;
@@ -56,9 +56,9 @@ class Timer::Impl : virtual public android::RefBase {
public:
Impl() {}
virtual ~Impl() {};
virtual ~Impl(){};
bool Start(TimerHandler *handler, uint32_t time_in_secs) {
bool Start(TimerHandler* handler, uint32_t time_in_secs) {
impl_thread_ = new ImplThread();
return impl_thread_->Start(handler, time_in_secs);
}
@@ -75,27 +75,20 @@ class Timer::Impl : virtual public android::RefBase {
CORE_DISALLOW_COPY_AND_ASSIGN(Impl);
};
Timer::Timer() : impl_(new Timer::Impl()) {
}
Timer::Timer() : impl_(new Timer::Impl()) {}
Timer::~Timer() {
if (IsRunning())
Stop();
if (IsRunning()) Stop();
}
bool Timer::Start(TimerHandler *handler, uint32_t time_in_secs) {
if (!handler || time_in_secs == 0)
return false;
bool Timer::Start(TimerHandler* handler, uint32_t time_in_secs) {
if (!handler || time_in_secs == 0) return false;
return impl_->Start(handler, time_in_secs);
}
void Timer::Stop() {
impl_->Stop();
}
void Timer::Stop() { impl_->Stop(); }
bool Timer::IsRunning() {
return impl_->IsRunning();
}
bool Timer::IsRunning() { return impl_->IsRunning(); }
} // namespace wvcdm
} // namespace wvcdm