You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: add stubs, put Vibrator.java in meson.build (oops), sort sources with LC_ALL=C sort -h
This commit is contained in:
@@ -12,4 +12,6 @@ public final class PowerManager {
|
||||
public WakeLock newWakeLock(int levelAndFlags, String tag) {
|
||||
return new WakeLock();
|
||||
}
|
||||
|
||||
public void userActivity(long dummy, boolean dummy2) {}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,22 @@
|
||||
package android.os;
|
||||
|
||||
import android.util.Slog;
|
||||
|
||||
public class Vibrator {
|
||||
public void vibrate(long millis) {
|
||||
Slog.v("Vibrator", "vibration motor go burrrr for "+millis+"ms");
|
||||
}
|
||||
public void vibrate (final long[] pattern, int repeat) {
|
||||
Thread t = new Thread(new Runnable() {
|
||||
public void run() {
|
||||
for(int i = 0; i < pattern.length; i++) {
|
||||
if(i%2 == 0)
|
||||
try { Thread.sleep(pattern[i]); } catch(InterruptedException e) {}
|
||||
else
|
||||
vibrate(pattern[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
t.start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user