app-info 3.0.0 → 3.1.0

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
  SHA256:
3
- metadata.gz: 77ca2c693d75ac261a17cb20e06e643a5de75a4d9eb15b1b5f83a151780368df
4
- data.tar.gz: e9d70889b047b04b60f50a70a20d9651145486c855e059999a8037828e53e9a6
3
+ metadata.gz: 0f0d48c631471efcf9aad2bf89dcb171433cea5babd6e90be71e839c924449d7
4
+ data.tar.gz: 36cdb280cb149defbd1171713c33dc268b5eb371aeeaff9009b8bd1f3b90ca7d
5
5
  SHA512:
6
- metadata.gz: c186bac4cab303067045830362c0f95deefc7c2488375f8dcb2113ea1bbc019982d645f4a29c44ab946e55c238c7e4820d0f9c1f443346143f4ed4183ebcaf32
7
- data.tar.gz: 3755af0041ef4068a6e28399d77c17744fe7f76cf321aca94e719b19fcf1357ad64a06a63b191a9960a347423d874355dfda6995208a0ae992769de5635e2582
6
+ metadata.gz: 35120ee87f3b97cf1fc808f9960a0e1082558ca101e78c00082e883446263422eb6694e591602941f004e6cf1674a4f5c1b47752418ae78eff6a37f22c5bcf4c
7
+ data.tar.gz: eede9fef6333ead33d4a4ffd550ca6525ace8e94f6beaab9d66f06af0a65a6ce220ab8dcf9f40dedf1660b0bbacba9408ed8bda11d177a9a1a1ad491a9d3be0b
@@ -9,35 +9,21 @@ on:
9
9
 
10
10
  jobs:
11
11
  test:
12
- runs-on: ${{ matrix.os }}
13
-
14
12
  strategy:
15
13
  fail-fast: false
16
14
  matrix:
17
- ruby: [ ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0, ruby-3.1, ruby-3.2 ]
15
+ ruby: [ ruby-3.1, ruby-3.2, ruby-3.3 ]
18
16
  os: [ ubuntu-latest ]
19
17
 
20
- steps:
21
- - uses: actions/checkout@v3
22
-
23
- - uses: ruby/setup-ruby@v1
24
- with:
25
- ruby-version: ${{ matrix.ruby }}
26
- bundler-cache: true
27
-
28
- - name: bundle exec rspec
29
- run: bundle exec rspec --format progress --force-colour
30
-
31
- lint:
32
- runs-on: ubuntu-latest
18
+ runs-on: ${{ matrix.os }}
33
19
 
34
20
  steps:
35
- - uses: actions/checkout@v3
21
+ - uses: actions/checkout@v4
36
22
 
37
23
  - uses: ruby/setup-ruby@v1
38
24
  with:
39
- ruby-version: 3.0
25
+ ruby-version: ${{ matrix.ruby }}
40
26
  bundler-cache: true
41
27
 
42
- - name: bundle exec rubocop
43
- run: bundle exec rubocop --format progress --color
28
+ - name: bundle exec rake
29
+ run: bundle exec rake
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  steps:
11
11
  - name: Create Release
12
- uses: softprops/action-gh-release@v1
12
+ uses: softprops/action-gh-release@v2
13
13
  if: startsWith(github.ref, 'refs/tags/')
14
14
  with:
15
15
  files: CHANGELOG.md
data/CHANGELOG.md CHANGED
@@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
9
 
10
10
  > List all changes before release a new version.
11
11
 
12
+ ## [3.1.0] (2024-06-24)
13
+
14
+ Dropped Ruby 2.5 ~ 3.0 support (no changes required.).
15
+
16
+ ### Added
17
+
18
+ - Add Apple TV parser support.
19
+ - Add `.url_schemes`, `.query_schemes` and `.background_modes` to ipa and info_plist parser.
20
+ - Upgrade Android AAPT2 to 2.19.
21
+
12
22
  ## [3.0.0] (2023-04-18)
13
23
 
14
24
  ### Added
@@ -326,7 +336,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
326
336
 
327
337
  - Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
328
338
 
329
- [Unreleased]: https://github.com/icyleaf/app-info/compare/v3.0.0..HEAD
339
+ [Unreleased]: https://github.com/icyleaf/app-info/compare/v3.1.0..HEAD
340
+ [3.1.0]: https://github.com/icyleaf/app-info/compare/v3.0.0...v3.1.0
330
341
  [3.0.0]: https://github.com/icyleaf/app-info/compare/v2.8.5...v3.0.0
331
342
  [3.0.0.beta4]: https://github.com/icyleaf/app-info/compare/v3.0.0.beta3...v3.0.0.beta4
332
343
  [3.0.0.beta3]: https://github.com/icyleaf/app-info/compare/v3.0.0.beta2...v3.0.0.beta3
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
 
8
8
  group :development do
9
9
  gem 'awesome_print'
10
- gem 'debug' # For ruby 3.0+\
10
+ gem 'debug' # For ruby 3.0+
11
11
  gem 'yard'
12
12
  end
13
13
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # app-info
2
2
 
3
- [![Language](https://img.shields.io/badge/ruby-2.5+-701516)](.github/workflows/ci.yml)
3
+ [![Language](https://img.shields.io/badge/ruby-3.1+-701516)](.github/workflows/ci.yml)
4
4
  [![Gem version](https://img.shields.io/gem/v/app-info?include_prereleases)](https://rubygems.org/gems/app-info)
5
5
  [![Build Status](https://img.shields.io/github/actions/workflow/status/icyleaf/app_info/ci.yml)](https://github.com/icyleaf/app_info/actions/workflows/ci.yml)
6
6
  [![License](https://img.shields.io/github/license/icyleaf/app-info)](LICENSE)
@@ -13,7 +13,7 @@ Analysis metedata like version, name, icon etc.
13
13
  - Android file
14
14
  - `.apk`
15
15
  - `.aab` (Androld App Bundle)
16
- - iOS file
16
+ - iOS, Apple TV file
17
17
  - `.ipa`
18
18
  - `Info.plist` file
19
19
  - `.mobileprovision`/`.provisionprofile` file
@@ -64,6 +64,7 @@ require 'app-info'
64
64
  # Automatic detect file extsion and parse
65
65
  parser = AppInfo.parse('iphone.ipa')
66
66
  parser = AppInfo.parse('ipad.ipa')
67
+ parser = AppInfo.parse('apple-tv.ipa')
67
68
  parser = AppInfo.parse('android.apk')
68
69
  parser = AppInfo.parse('android.aab')
69
70
  parser = AppInfo.parse('u-u-i-d.mobileprovision')
@@ -73,7 +74,7 @@ parser = AppInfo.parse('win.exe')
73
74
  parser = AppInfo.parse('win.zip')
74
75
 
75
76
  # If detect file type failed, you can parse in other way
76
- parser = AppInfo::IPA.new('iphone.ipa')
77
+ parser = AppInfo::IPA.new('iphone-ipad-unversal-appletv.ipa')
77
78
  parser = AppInfo::APK.new('android.apk')
78
79
  parser = AppInfo::AAB.new('android.aab')
79
80
  parser = AppInfo::InfoPlist.new('Info.plist')
@@ -85,10 +86,10 @@ parser = AppInfo::PE.new('win.exe')
85
86
 
86
87
  ### iOS
87
88
 
88
- Teardown suport iPhone/iPad/Universal.
89
+ Teardown suport iPhone, iPad, Universal and Apple TV file.
89
90
 
90
91
  ```ruby
91
- ipa = AppInfo.parse('iphone.ipa')
92
+ ipa = AppInfo.parse('iphone-ipad-unversal-appletv.ipa')
92
93
 
93
94
  # get app file size
94
95
  ipa.size
@@ -118,6 +119,7 @@ ipa.devices
118
119
  ipa.ipad?
119
120
  ipa.iphone?
120
121
  ipa.universal?
122
+ ipa.appletv?
121
123
 
122
124
  # detect app release type
123
125
  ipa.release_type
@@ -135,6 +137,18 @@ ipa.frameworks
135
137
  ipa.plugins
136
138
  # => [<AppInfo::Plugin:1680 @name=NotificationService>]
137
139
 
140
+ # get url schemes
141
+ ipa.url_schemes
142
+ # => [{:name=>"Web", :role=>"Editor", :schemes=>["app-info", "app_info"]}]
143
+
144
+ # get query schemes
145
+ ipa.url_schemes
146
+ # => ["twitter", "instagram", "www-x-callback"]
147
+
148
+ # get background modes
149
+ ipa.background_modes
150
+ # => ["audio", "fetch", "remote-notification"]
151
+
138
152
  # get more propety in Info.plist
139
153
  ipa.info[:CFBundleDisplayName]
140
154
  # => 'AppInfoDemo'
data/Rakefile CHANGED
@@ -2,16 +2,17 @@
2
2
 
3
3
  $LOAD_PATH.unshift File.expand_path('lib', __dir__)
4
4
  require 'app_info'
5
- require 'yard'
6
5
  require 'bundler/gem_tasks'
7
6
  require 'rspec/core/rake_task'
8
7
  require 'rubocop/rake_task'
9
8
 
10
9
  RSpec::Core::RakeTask.new(:spec)
11
10
 
12
- task default: :spec
11
+ task default: %w[spec rubocop]
13
12
 
14
13
  task :doc do
14
+ require 'yard'
15
+
15
16
  YARD::Rake::YardocTask.new do |t|
16
17
  t.files = ['lib/**/*.rb', 'README.md', 'LICENSE']
17
18
  # t.options = ['--any', '--extra', '--opts'] # optional
@@ -19,4 +20,6 @@ task :doc do
19
20
  end
20
21
  end
21
22
 
22
-
23
+ task :rubocop do
24
+ RuboCop::RakeTask.new
25
+ end
data/app_info.gemspec CHANGED
@@ -18,17 +18,19 @@ Gem::Specification.new do |spec|
18
18
  spec.bindir = 'exe'
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
- spec.required_ruby_version = '>= 2.5'
21
+ spec.required_ruby_version = '>= 3.1'
22
22
 
23
23
  spec.add_dependency 'CFPropertyList', '< 3.1.0', '>= 2.3.4'
24
- spec.add_dependency 'image_size', '>= 1.5', '< 3.3'
25
- spec.add_dependency 'ruby-macho', '>= 1.4', '< 4'
24
+ spec.add_dependency 'nkf', '~> 0.2.0'
25
+ spec.add_dependency 'base64', '~> 0.2.0'
26
+ spec.add_dependency 'image_size', '>= 1.5', '< 3.5'
27
+ spec.add_dependency 'ruby-macho', '>= 1.4', '< 5'
26
28
  spec.add_dependency 'android_parser', '~> 2.6.0'
27
29
  spec.add_dependency 'rubyzip', '>= 1.2', '< 3.0'
28
30
  spec.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
29
31
  spec.add_dependency 'icns', '~> 0.2.0'
30
32
  spec.add_dependency 'pedump', '~> 0.6.2'
31
- spec.add_dependency 'google-protobuf', '>= 3.19.4', '< 3.23.0'
33
+ spec.add_dependency 'google-protobuf', '>= 4.27.1', '< 5.0.0'
32
34
 
33
35
  spec.add_development_dependency 'bundler', '>= 1.12'
34
36
  spec.add_development_dependency 'rake', '>= 10.0'
@@ -72,9 +72,10 @@ module AppInfo
72
72
  # @see InfoPlist#min_sdk_version
73
73
  # @!method min_os_version
74
74
  # @see InfoPlist#min_os_version
75
- def_delegators :info, :device, :platform, :iphone?, :ipad?, :universal?, :macos?,
75
+ def_delegators :info, :device, :platform, :iphone?, :ipad?, :universal?, :macos?, :appletv?,
76
76
  :build_version, :name, :release_version, :identifier, :bundle_id,
77
- :display_name, :bundle_name, :min_sdk_version, :min_os_version
77
+ :display_name, :bundle_name, :min_sdk_version, :min_os_version,
78
+ :url_schemes, :query_schemes, :background_modes
78
79
 
79
80
  # @!method devices
80
81
  # @see MobileProvision#devices
@@ -42,6 +42,7 @@ module AppInfo
42
42
  MACOS = :macos
43
43
  IOS = :ios
44
44
  ANDROID = :android
45
+ APPLETV = :appletv
45
46
  WINDOWS = :windows
46
47
  end
47
48
 
@@ -54,14 +55,16 @@ module AppInfo
54
55
  IPHONE = :iphone
55
56
  # Apple iPad
56
57
  IPAD = :ipad
57
- # Apple Watch
58
- IWATCH = :iwatch # not implemented yet
59
58
  # Apple Universal (iPhone and iPad)
60
59
  UNIVERSAL = :universal
60
+ # Apple TV
61
+ APPLETV = :appletv
62
+ # Apple Watch (TODO: not implemented yet)
63
+ IWATCH = :iwatch
61
64
 
62
65
  # Android Phone
63
66
  PHONE = :phone
64
- # Android Tablet (not implemented yet)
67
+ # Android Tablet (TODO: not implemented yet)
65
68
  TABLET = :tablet
66
69
  # Android Watch
67
70
  WATCH = :watch
@@ -29,6 +29,8 @@ module AppInfo
29
29
  Platform::MACOS
30
30
  when Device::IPHONE, Device::IPAD, Device::UNIVERSAL
31
31
  Platform::IOS
32
+ when Device::APPLETV
33
+ Platform::APPLETV
32
34
  end
33
35
  end
34
36
 
@@ -40,6 +42,10 @@ module AppInfo
40
42
  Device::IPAD
41
43
  elsif device_family == [1, 2]
42
44
  Device::UNIVERSAL
45
+ elsif device_family == [3]
46
+ Device::APPLETV
47
+ elsif device_family == [6]
48
+ Device::APPMACOSLETV
43
49
  elsif !info.try(:[], 'DTSDKName').nil? || !info.try(:[], 'DTManufacturerName').nil?
44
50
  Device::MACOS
45
51
  else
@@ -125,6 +131,11 @@ module AppInfo
125
131
  device == Device::MACOS
126
132
  end
127
133
 
134
+ # @return [Boolean]
135
+ def appletv?
136
+ device == Device::APPLETV
137
+ end
138
+
128
139
  # @return [Array<String>]
129
140
  def device_family
130
141
  info.try(:[], 'UIDeviceFamily') || []
@@ -139,6 +150,37 @@ module AppInfo
139
150
  end
140
151
  end
141
152
 
153
+ # A list of URL schemes (http, ftp, and so on) supported by the app.
154
+ #
155
+ # @return [Array<String>]
156
+ def url_schemes
157
+ url_types = info.try(:[], 'CFBundleURLTypes')
158
+ return [] unless url_types
159
+
160
+ url_types.each_with_object([]) do |url_type, obj|
161
+ data = {
162
+ role: url_type['CFBundleTypeRole'],
163
+ name: url_type['CFBundleURLName'],
164
+ schemes: url_type['CFBundleURLSchemes']
165
+ }
166
+ obj << data
167
+ end
168
+ end
169
+
170
+ # Specifies the URL schemes you want the app to be able to use
171
+ #
172
+ # @return [Array<String>]
173
+ def query_schemes
174
+ info.try(:[], 'LSApplicationQueriesSchemes') || []
175
+ end
176
+
177
+ # Services provided by an app that require it to run in the background
178
+ #
179
+ # @return [Array<String>]
180
+ def background_modes
181
+ info.try(:[], 'UIBackgroundModes') || []
182
+ end
183
+
142
184
  # @return [String, nil]
143
185
  def [](key)
144
186
  info.try(:[], key.to_s)
data/lib/app_info/ipa.rb CHANGED
@@ -9,7 +9,7 @@ module AppInfo
9
9
  class IPA < Apple
10
10
  # Full icons metadata
11
11
  # @example
12
- # aab.icons
12
+ # ipa.icons
13
13
  # # => [
14
14
  # # {
15
15
  # # name: 'icon.png',
@@ -46,12 +46,13 @@ module AppInfo
46
46
  @frameworks ||= Framework.parse(app_path)
47
47
  end
48
48
 
49
+ DEFAULT_MOBILEPROVISION_FILE = 'embedded.mobileprovision'
50
+
49
51
  # @return [String]
50
52
  def mobileprovision_path
51
- filename = 'embedded.mobileprovision'
52
- @mobileprovision_path ||= ::File.join(@file, filename)
53
+ @mobileprovision_path ||= ::File.join(@file, DEFAULT_MOBILEPROVISION_FILE)
53
54
  unless ::File.exist?(@mobileprovision_path)
54
- @mobileprovision_path = ::File.join(app_path, filename)
55
+ @mobileprovision_path = ::File.join(app_path, DEFAULT_MOBILEPROVISION_FILE)
55
56
  end
56
57
 
57
58
  @mobileprovision_path
@@ -148,7 +149,7 @@ module AppInfo
148
149
 
149
150
  def icon_keys
150
151
  @icon_keys ||= case device
151
- when Device::IPHONE
152
+ when Device::IPHONE, Device::APPLETV
152
153
  [IPHONE_KEY]
153
154
  when Device::IPAD
154
155
  [IPAD_KEY]
@@ -124,7 +124,7 @@ module AppInfo
124
124
  data[:sets] ||= []
125
125
  file = data[:file]
126
126
  reader = Icns::Reader.new(file)
127
- Icns::SIZE_TO_TYPE.each do |size, _|
127
+ Icns::SIZE_TO_TYPE.each_key do |size|
128
128
  dest_filename = "#{::File.basename(file, '.icns')}_#{size}x#{size}.png"
129
129
  dest_file = tempdir(::File.join(::File.dirname(file), dest_filename), prefix: 'converted')
130
130
  next unless icon_data = reader.image(size: size)
@@ -39,7 +39,8 @@ module AppInfo
39
39
  return :development if development?
40
40
  return :adhoc if adhoc?
41
41
  return :appstore if appstore?
42
- return :enterprise if enterprise?
42
+
43
+ :enterprise if enterprise?
43
44
  end
44
45
 
45
46
  # @return [Array<Symbol>]
@@ -159,7 +160,7 @@ module AppInfo
159
160
  capabilities = []
160
161
  capabilities << 'In-App Purchase' << 'GameKit' if adhoc? || appstore?
161
162
 
162
- entitlements.each do |key, _|
163
+ entitlements.each_key do |key|
163
164
  case key
164
165
  when 'aps-environment'
165
166
  capabilities << 'Push Notifications'
data/lib/app_info/pe.rb CHANGED
@@ -199,7 +199,7 @@ module AppInfo
199
199
  zip_entry.extract(exe_file)
200
200
  zip_file.close
201
201
 
202
- return exe_file
202
+ exe_file
203
203
  }.call
204
204
  end
205
205
 
@@ -166,7 +166,7 @@ module AppInfo
166
166
  obj << intent_filters
167
167
  else
168
168
  intent_filters.each do |filter|
169
- exist_method = "#{search}?".to_sym
169
+ exist_method = :"#{search}?"
170
170
  next if filter.respond_to?(exist_method) && !filter.send(exist_method)
171
171
 
172
172
  obj << filter.send(search)
@@ -188,7 +188,7 @@ module AppInfo
188
188
  CATEGORY_BROWSABLE = 'android.intent.category.BROWSABLE'
189
189
 
190
190
  def deep_links?
191
- return unless respond_to?(:data)
191
+ return false unless respond_to?(:data)
192
192
 
193
193
  browsable? && data.any? { |d| DEEP_LINK_SCHEMES.include?(d.scheme) }
194
194
  end
@@ -202,7 +202,7 @@ module AppInfo
202
202
  end
203
203
 
204
204
  def schemes?
205
- return unless respond_to?(:data)
205
+ return false unless respond_to?(:data)
206
206
 
207
207
  browsable? && data.any? { |d| !DEEP_LINK_SCHEMES.include?(d.scheme) }
208
208
  end
@@ -13,13 +13,9 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
-
17
16
  syntax = "proto3";
18
-
19
17
  package aapt.pb;
20
-
21
18
  option java_package = "com.android.aapt";
22
-
23
19
  // A description of the requirements a device must have in order for a
24
20
  // resource to be matched and selected.
25
21
  message Configuration {
@@ -28,7 +24,6 @@ message Configuration {
28
24
  LAYOUT_DIRECTION_LTR = 1;
29
25
  LAYOUT_DIRECTION_RTL = 2;
30
26
  }
31
-
32
27
  enum ScreenLayoutSize {
33
28
  SCREEN_LAYOUT_SIZE_UNSET = 0;
34
29
  SCREEN_LAYOUT_SIZE_SMALL = 1;
@@ -36,38 +31,32 @@ message Configuration {
36
31
  SCREEN_LAYOUT_SIZE_LARGE = 3;
37
32
  SCREEN_LAYOUT_SIZE_XLARGE = 4;
38
33
  }
39
-
40
34
  enum ScreenLayoutLong {
41
35
  SCREEN_LAYOUT_LONG_UNSET = 0;
42
36
  SCREEN_LAYOUT_LONG_LONG = 1;
43
37
  SCREEN_LAYOUT_LONG_NOTLONG = 2;
44
38
  }
45
-
46
39
  enum ScreenRound {
47
40
  SCREEN_ROUND_UNSET = 0;
48
41
  SCREEN_ROUND_ROUND = 1;
49
42
  SCREEN_ROUND_NOTROUND = 2;
50
43
  }
51
-
52
44
  enum WideColorGamut {
53
45
  WIDE_COLOR_GAMUT_UNSET = 0;
54
46
  WIDE_COLOR_GAMUT_WIDECG = 1;
55
47
  WIDE_COLOR_GAMUT_NOWIDECG = 2;
56
48
  }
57
-
58
49
  enum Hdr {
59
50
  HDR_UNSET = 0;
60
51
  HDR_HIGHDR = 1;
61
52
  HDR_LOWDR = 2;
62
53
  }
63
-
64
54
  enum Orientation {
65
55
  ORIENTATION_UNSET = 0;
66
56
  ORIENTATION_PORT = 1;
67
57
  ORIENTATION_LAND = 2;
68
58
  ORIENTATION_SQUARE = 3;
69
59
  }
70
-
71
60
  enum UiModeType {
72
61
  UI_MODE_TYPE_UNSET = 0;
73
62
  UI_MODE_TYPE_NORMAL = 1;
@@ -78,40 +67,34 @@ message Configuration {
78
67
  UI_MODE_TYPE_WATCH = 6;
79
68
  UI_MODE_TYPE_VRHEADSET = 7;
80
69
  }
81
-
82
70
  enum UiModeNight {
83
71
  UI_MODE_NIGHT_UNSET = 0;
84
72
  UI_MODE_NIGHT_NIGHT = 1;
85
73
  UI_MODE_NIGHT_NOTNIGHT = 2;
86
74
  }
87
-
88
75
  enum Touchscreen {
89
76
  TOUCHSCREEN_UNSET = 0;
90
77
  TOUCHSCREEN_NOTOUCH = 1;
91
78
  TOUCHSCREEN_STYLUS = 2;
92
79
  TOUCHSCREEN_FINGER = 3;
93
80
  }
94
-
95
81
  enum KeysHidden {
96
82
  KEYS_HIDDEN_UNSET = 0;
97
83
  KEYS_HIDDEN_KEYSEXPOSED = 1;
98
84
  KEYS_HIDDEN_KEYSHIDDEN = 2;
99
85
  KEYS_HIDDEN_KEYSSOFT = 3;
100
86
  }
101
-
102
87
  enum Keyboard {
103
88
  KEYBOARD_UNSET = 0;
104
89
  KEYBOARD_NOKEYS = 1;
105
90
  KEYBOARD_QWERTY = 2;
106
91
  KEYBOARD_TWELVEKEY = 3;
107
92
  }
108
-
109
93
  enum NavHidden {
110
94
  NAV_HIDDEN_UNSET = 0;
111
95
  NAV_HIDDEN_NAVEXPOSED = 1;
112
96
  NAV_HIDDEN_NAVHIDDEN = 2;
113
97
  }
114
-
115
98
  enum Navigation {
116
99
  NAVIGATION_UNSET = 0;
117
100
  NAVIGATION_NONAV = 1;
@@ -119,88 +102,69 @@ message Configuration {
119
102
  NAVIGATION_TRACKBALL = 3;
120
103
  NAVIGATION_WHEEL = 4;
121
104
  }
122
-
105
+ enum GrammaticalGender {
106
+ GRAM_GENDER_USET = 0;
107
+ GRAM_GENDER_NEUTER = 1;
108
+ GRAM_GENDER_FEMININE = 2;
109
+ GRAM_GENDER_MASCULINE = 3;
110
+ }
123
111
  //
124
112
  // Axis/dimensions that are understood by the runtime.
125
113
  //
126
-
127
114
  // Mobile country code.
128
115
  uint32 mcc = 1;
129
-
130
116
  // Mobile network code.
131
117
  uint32 mnc = 2;
132
-
133
118
  // BCP-47 locale tag.
134
119
  string locale = 3;
135
-
136
120
  // Left-to-right, right-to-left...
137
121
  LayoutDirection layout_direction = 4;
138
-
139
122
  // Screen width in pixels. Prefer screen_width_dp.
140
123
  uint32 screen_width = 5;
141
-
142
124
  // Screen height in pixels. Prefer screen_height_dp.
143
125
  uint32 screen_height = 6;
144
-
145
126
  // Screen width in density independent pixels (dp).
146
127
  uint32 screen_width_dp = 7;
147
-
148
128
  // Screen height in density independent pixels (dp).
149
129
  uint32 screen_height_dp = 8;
150
-
151
130
  // The smallest screen dimension, regardless of orientation, in dp.
152
131
  uint32 smallest_screen_width_dp = 9;
153
-
154
132
  // Whether the device screen is classified as small, normal, large, xlarge.
155
133
  ScreenLayoutSize screen_layout_size = 10;
156
-
157
134
  // Whether the device screen is long.
158
135
  ScreenLayoutLong screen_layout_long = 11;
159
-
160
136
  // Whether the screen is round (Android Wear).
161
137
  ScreenRound screen_round = 12;
162
-
163
138
  // Whether the screen supports wide color gamut.
164
139
  WideColorGamut wide_color_gamut = 13;
165
-
166
140
  // Whether the screen has high dynamic range.
167
141
  Hdr hdr = 14;
168
-
169
142
  // Which orientation the device is in (portrait, landscape).
170
143
  Orientation orientation = 15;
171
-
172
144
  // Which type of UI mode the device is in (television, car, etc.).
173
145
  UiModeType ui_mode_type = 16;
174
-
175
146
  // Whether the device is in night mode.
176
147
  UiModeNight ui_mode_night = 17;
177
-
178
148
  // The device's screen density in dots-per-inch (dpi).
179
149
  uint32 density = 18;
180
-
181
150
  // Whether a touchscreen exists, supports a stylus, or finger.
182
151
  Touchscreen touchscreen = 19;
183
-
184
152
  // Whether the keyboard hardware keys are currently hidden, exposed, or
185
153
  // if the keyboard is a software keyboard.
186
154
  KeysHidden keys_hidden = 20;
187
-
188
155
  // The type of keyboard present (none, QWERTY, 12-key).
189
156
  Keyboard keyboard = 21;
190
-
191
157
  // Whether the navigation is exposed or hidden.
192
158
  NavHidden nav_hidden = 22;
193
-
194
159
  // The type of navigation present on the device
195
160
  // (trackball, wheel, dpad, etc.).
196
161
  Navigation navigation = 23;
197
-
198
162
  // The minimum SDK version of the device.
199
163
  uint32 sdk_version = 24;
200
-
164
+ // Grammatical gender.
165
+ GrammaticalGender grammatical_gender = 26;
201
166
  //
202
167
  // Build-time only dimensions.
203
168
  //
204
-
205
169
  string product = 25;
206
170
  }