TestServiceの全体的なリファクタリング #28
|
@ -151,6 +151,9 @@ public class TestService extends Service {
|
||||||
return PendingIntent.getActivity(context, requestCode, intent, flags | PendingIntent.FLAG_IMMUTABLE);
|
return PendingIntent.getActivity(context, requestCode, intent, flags | PendingIntent.FLAG_IMMUTABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* デバイスをバイブレーションさせる
|
||||||
|
*/
|
||||||
private void vibrateDevice() {
|
private void vibrateDevice() {
|
||||||
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||||
if (vibrator.hasVibrator()) {
|
if (vibrator.hasVibrator()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user