droid_adbs 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9bacb6c0a8d65d2098ecdb7f7fd4f16868470ea
4
- data.tar.gz: 1e648a77354315ab18ec46846cf019fd722074f3
3
+ metadata.gz: 562d2ad3173a61cf6cc898fa6863941e01efe149
4
+ data.tar.gz: 124efc1ee1940fbe207f968588ec6d9ae39914a0
5
5
  SHA512:
6
- metadata.gz: ac3ca8d6593a7efee0d5f9853c9760f4da532d6d76b242a9e6aa9296c156272938edaffcb970cb291e8d0d1d57ab867bc2a11b85f2096860ff55c0a8774b3b14
7
- data.tar.gz: 4881b5438c5c97c0dc638c0a152bd6323b3ae271b5ab76a2ae9ee541542a569babf363e2ceac7b7aba680d5e629d3298fbcdfcaac0e34503792f012e660ddf0c
6
+ metadata.gz: deb84e6c216d27885369f3bf6e4a7438e5a3c329b87cf57daed71c39fd5814bbd2f43ed0c0ee4cce471f2137fd28ebc9e0085c57296882c2c9c3c6a96f5e7517
7
+ data.tar.gz: 41dbb6d1944024639d3e9c7bba9e5517396cca95431516a55b65f50dfe549e56d5181a463a72d63b70a91999b0735136570b4c1b290a0a24793c2354aa9ed69e
@@ -66,6 +66,25 @@ module DroidAdbs
66
66
  `#{::DroidAdbs.shell} date -s #{yyyymmdd}.#{hhmmss}`.strip
67
67
  end
68
68
 
69
+ # Only for rooted devices.
70
+ #
71
+ # Default SET format is "MMDDhhmm[[CC]YY][.ss]", that's (2 digits each)
72
+ # month, day, hour (0-23), and minute. Optionally century, year, and second.
73
+ # 060910002016.00
74
+ # Thu Jun 9 10:00:00 GMT 2016
75
+ # @example
76
+ #
77
+ # # Error case
78
+ # ::DroidAdbs::Settings.set_date '060910002016.00' #=> "date: cannot set date: Operation not permitted\r\nThu Jun 9 10:00:00 JST 2016"
79
+ #
80
+ def set_date(date)
81
+ turn_auto_time_off
82
+ result = `#{::DroidAdbs.shell} date #{date}`.strip
83
+ `#{::DroidAdbs.shell} am broadcast -a android.intent.action.TIME_SET`
84
+
85
+ result
86
+ end
87
+
69
88
  # animation settings
70
89
  # @return [String] message from adb command
71
90
  def turn_all_animation_off
@@ -1,3 +1,3 @@
1
1
  module DroidAdbs
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droid_adbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler