OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chromoting; | 5 package org.chromium.chromoting; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
9 import android.graphics.Canvas; | 9 import android.graphics.Canvas; |
10 import android.graphics.Color; | 10 import android.graphics.Color; |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 synchronized (mAnimationLock) { | 232 synchronized (mAnimationLock) { |
233 if (mInputAnimationRunning || feedbackAnimationRunning) { | 233 if (mInputAnimationRunning || feedbackAnimationRunning) { |
234 getHandler().postAtTime(new Runnable() { | 234 getHandler().postAtTime(new Runnable() { |
235 @Override | 235 @Override |
236 public void run() { | 236 public void run() { |
237 processAnimation(); | 237 processAnimation(); |
238 } | 238 } |
239 }, startTimeMs + 30); | 239 }, startTimeMs + 30); |
240 } | 240 } |
241 }; | 241 } |
242 } | 242 } |
243 | 243 |
244 private void processAnimation() { | 244 private void processAnimation() { |
245 boolean running; | 245 boolean running; |
246 synchronized (mAnimationLock) { | 246 synchronized (mAnimationLock) { |
247 running = mInputAnimationRunning; | 247 running = mInputAnimationRunning; |
248 } | 248 } |
249 if (running) { | 249 if (running) { |
250 mInputHandler.processAnimation(); | 250 mInputHandler.processAnimation(); |
251 } | 251 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 @Override | 382 @Override |
383 public void setAnimationEnabled(boolean enabled) { | 383 public void setAnimationEnabled(boolean enabled) { |
384 synchronized (mAnimationLock) { | 384 synchronized (mAnimationLock) { |
385 if (enabled && !mInputAnimationRunning) { | 385 if (enabled && !mInputAnimationRunning) { |
386 requestRepaint(); | 386 requestRepaint(); |
387 } | 387 } |
388 mInputAnimationRunning = enabled; | 388 mInputAnimationRunning = enabled; |
389 } | 389 } |
390 } | 390 } |
391 } | 391 } |
OLD | NEW |