Commit Graph

311 Commits

Author SHA1 Message Date
Ajay Panicker
9090f85a12 Limit btsnoop file size (4/8)
Limit btsnoop file size by rotating between snoop files. The rotation occurrs
when a fixed number of packets have been logged and will start overwriting
the older file.

Bug: 35998031
Test: Enable snoop logs from developer options and let logs get large
Merged-In: I94f8f6bc12ab3f7ff406c9392934ecb7209cd635
Change-Id: I94f8f6bc12ab3f7ff406c9392934ecb7209cd635
2017-04-27 00:15:16 +00:00
Jack He
8d64a93c6a Add developer menu entry to enable Bluetooth inband ringing
Bug: 19171297
Test: Make, HFP regression test, testplans/82144
Change-Id: Ib24463347323f83daf8b4d9f1d38bb9c3071fb95
2017-04-04 16:20:14 -07:00
Pavlin Radoslavov
b0d8cdf8f8 Add new internal API: enableOptionalCodecs()/disableOptionalCodecs()
This API can be used to enable the optional codecs, or disable them
and use only the mandatory SBC.
Internally, it is implemented by raising the SBC priority to
highest (so SBC will be used/selected), or reducing the SBC priority
to its default value (lowest).

Test: A2DP streaming and enabling/disabling/selecting optional codecs
Bug: 35873828
Change-Id: I6e3144ff93bfc289fb25f4961fc00f39e8222290
2017-03-29 10:59:56 -07:00
fen wang
8e568ec84c Initialize LDAC to ABR mode
Bug: 35381097
Change-Id: Idcc2fabe86acaf441f5a71f5d2bb66ad29252cdb
2017-03-28 01:32:38 +00:00
Treehugger Robot
21de66bc0c Merge "Revert "Development Options: toggle binderized hals"" 2017-03-28 01:12:14 +00:00
Ajay Panicker
250e18c439 Add default value to Bluetooth AVRCP version property get
When the property isn't set a crash can occur since we try to look up an
empty property value.

Bug: 36531010
Test: Open Developer options after a factory reset
Change-Id: I82c0fde00774ab1a4f3e4c44a715c74d4a7804e9
2017-03-23 10:57:30 -07:00
Steven Moreland
544c820ac7 Revert "Development Options: toggle binderized hals"
This reverts commit 73dd0ae30e.

Reason for revert: b/34274385 - This was a temporary setting.

Change-Id: I98b2d05c431bb5361b11cd3b05b7f5ac4e939e0e
2017-03-23 05:07:53 +00:00
Ajay Panicker
e50b0d490a AVRCP version interop pereference (2/3)
Add a mechanism to allow the user to select the AVRCP version broadcasted
through SDP in the developer options. This helps solve some interoperability
issues such as with Honda Carkits where broadcasting AVRCP version 1.6 causes
media metadata to fail.

Bug: 35956792
Test: Select AVRCP version through developer option
Merged-In: I7d4b1bd23342d1a96ffdf08bb7d6d3c5e5fedca6
Change-Id: I7d4b1bd23342d1a96ffdf08bb7d6d3c5e5fedca6
2017-03-22 18:50:28 +00:00
Lorenzo Colitti
15fb2d1096 Display the correct default for mobile data always on.
Mobile data always on was enabled by changing the default in
ConnectivityService to 1. However, the default value in the
developer options setting was left at 0. This means that by
default (i.e., when the setting is empty), mobile data always on
is enabled but appears in developer options as disabled.

Fix this by changing the default in developer options. This is
simpler than the other options (adding database upgrade code to
settings, making the default be controlled by config.xml and
ensuring that when a config changed broadcast is received the
value is re-rease, hardcoding a default value as an @hide
constant in Settings, etc.)

Bug: 23113288
Test: setting is off after "adb shell settings delete global mobile_data_always_on"
Change-Id: I27e2c0af7a03e510e640dbcfa281449d00385154
2017-03-03 18:56:23 +09:00
Pavlin Radoslavov
c851f854bb Add null pointer checks when updating A2DP configuration values
Under expected circumstances, those null pointer checks are not
needed: onCreate() is always called before onCreateView(),
and the former creates the objects: mBluetoothSelectA2dpCodec,
mBluetoothSelectA2dpSampleRate, mBluetoothSelectA2dpBitsPerSample,
mBluetoothSelectA2dpChannelMode, mBluetoothSelectA2dpLdacPlaybackQuality .

For some unknown reason, somehow the following chain of calls is executed
before onCreate() :
  onCreateView() ->
  getActivity().registerReceiver(mBluetoothA2dpReceiver, ...) ->
  mBluetoothA2dpReceiver.onReceive(...) ->
  updateBluetoothA2dpConfigurationValues()

Adding the null pointer checks until the issue is understood.

Test: Code compilation
Bug: 35204511
Change-Id: I7c1d81015e66b26544b7b26f36cbc75f11713496
2017-02-10 12:52:04 -08:00
Pavlin Radoslavov
a4efdf5195 Catch IllegalStateException when updating Bluetooth A2DP codec info
Add an explicit check when calling getResources() inside
updateBluetoothA2dpConfigurationValues().
This fixes a potential race condition - the latter could be called
in background when processing intent update.

Bug: 35021206
Test: Manual UI testing
Change-Id: I38117c5b1e08f4b2ecfd7637bb3e34920aa0d296
2017-02-06 15:37:01 -08:00
Pavlin Radoslavov
789d21d475 Add missing null pointer check for Bluetooth A2DP Codec Settings
Bug: 34885602
Test: Code compilation
Change-Id: I13443390e7c6ffa34b5957a588fc0cefdf5b80f5
2017-02-01 17:43:23 -08:00
Pavlin Radoslavov
2829ca322a Update the A2DP Codec Config API
Previously, the JNI upcall would contain only the current codec config.
In the new API, the upcall contains:
 1. The current codec config
 2. The list of codecs containing the local codecs capabilities
 3. The list of codecs containing the selectable codecs capabilities.
    This list is the intersection of the local codecs capabilities
    and the capabilities of the paired device.

Also, refactored the Java internals to accomodate the extra information:
 * Added new class BluetoothCodecStatus that contains the extra info:
   current codec config, local codecs capabilities and selectable
   codecs capabilities
 * Renamed method getCodecConfig() to getCodecStatus() and return the
   corresponding BluetoothCodecStatus object.
 * Updates to class BluetoothCodecConfig:
   new methods isValid(), getCodecName(), and updated toString()
   so it is more user friendly
 * Removed BluetoothCodecConfig.EXTRA_CODEC_CONFIG and
   EXTRA_PREVIOUS_CODEC_CONFIG.
   The former is superseded by BluetoothCodecStatus.EXTRA_CODEC_STATUS;
   the latter is not really used.

Test: A2DP streaming with headsets and switching the codecs

Change-Id: I490a70c82b686be7105862aeaeafcff495369dae
2017-01-30 16:22:24 -08:00
Pavlin Radoslavov
c0a3a9fb94 Integration of the AAC codec for A2DP source
Test: A2DP streaming to AAC headsets
Bug: 30958229
Change-Id: Icef9ce9fb8e41cad65bc57bf078513d0c7bf7b9a
2017-01-26 09:30:11 -08:00
Steven Moreland
73dd0ae30e Development Options: toggle binderized hals
This allows for quick performance testing and also for a better
dogfooding experience.

Bug: 34256441
Test: Verification with getprop.
Change-Id: I81c5e0b1044d4569a6fe55a4b30f7e21c4465fc2
2017-01-25 22:03:45 -08:00
Pavlin Radoslavov
dd39c073d6 Update/cleanup Bluetooth Codec strings in Developer Settings
* Use the summary strings instead of the titles strings as appropriate.
* Use proper translatable strings instead of hard-coded "Streaming: "
  embedded string.

Test: UI visual observation
Change-Id: I0222afc30c75e68e2568c33c781755802d86c502
2017-01-18 10:35:35 -08:00
Pavlin Radoslavov
0a63e8b768 Moved the Bluetooth-related default config init within onCreate()
This should avoid potential crashes in case somehow onCreateView() is
called without onCreate() being called first.

Test: Manual UI interaction with Developer Settings
Bug: 34192829
Change-Id: Iaf46d05f30d20f98727c4dbfb91feef8509c92f7
2017-01-10 23:52:06 +00:00
Pavlin Radoslavov
c65956efc8 Add Bluetooth Codec selection UI to the Developer Options
Test: A2DP streaming to headsets and manual UI interaction
Bug: 30958229
Change-Id: I75027200561e6c51fa767c427ed09b647757d0ab
2017-01-06 15:44:55 -08:00
Jerry Zhang
a75fa91247 Refactor setCurrentFunction and setUsbDataUnlocked into one method
am: a1b60e629f

Change-Id: I0ed28df5f24e7fe545f968c4d65cfc0494b57ebd
2016-11-17 00:09:38 +00:00
Jerry Zhang
a1b60e629f Refactor setCurrentFunction and setUsbDataUnlocked into one method
This allows us to get rid of an extraneous config switch and
simplify some code.

Test: Manually change usb configuration
Change-Id: Id78da530ff485ecd7a915056832eec1dd8c91954
(cherry picked from commit 5d36a177d9)
2016-10-25 11:02:21 -07:00
Nick Kralevich
73dfef91b2 Delete "Show CPU usage"
This functionality hasn't worked since Lollipop.

Bug: 21388590
Change-Id: Ie3684ba0f8b3a5f577462e4cc4a1ceba53931eff
2016-10-11 09:03:29 -07:00
Fan Zhang
83f91f61ae Use isOemUnlockEnabled to drive oem unlocking toggle.
Bug: 31031467
Test: manually turned on/off persistent_data_block

Change-Id: I21d18a898a220f9e46a53715d4b4fa01c7116e7f
2016-08-23 15:14:19 -07:00
Fan Zhang
1ba24ca792 Set oem unlock switch to reflect the actual state of device
Bug: 30772025
Change-Id: I143ceafb36f2f2091683b29d02ee64c07e44bb15
(cherry picked from commit e98178bd58)
2016-08-22 19:41:42 +00:00
Esteban Talavera
63f791a1e9 Update OEM unlock summary string
Bug: 30661116
Bug: 29047618

Change-Id: I4f747e29c595453d9d0263ce7fc90d37b81aa251
2016-08-08 17:29:53 +01:00
Thierry Strudel
8f3c7dd719 Merge changes from topic 'enable_persist_kernel_log' into nyc-mr1-dev
* changes:
  Settings: trampoline persist.logd.logpersistd to logd.logpersistd
  Settings: add logpersist kernel only selection
  Settings: add logpersist selection (actions)
2016-07-21 04:07:25 +00:00
TreeHugger Robot
111e1dc6b3 Merge "Color transforms are now color modes." into nyc-mr1-dev 2016-07-20 17:21:36 +00:00
Mark Salyzyn
bdbd2d984e Settings: trampoline persist.logd.logpersistd to logd.logpersistd
- Deal with trampoline, where we read logd.logpersistd and
  logd.logpersistd.buffer, write to persist.logd.logpersistd and
  persist.logd.logpersistd.buffer and logd.logpersistd*
- Deal with an as designed requirement that empty values do not
  automatically trampoline, to properly communicate state.
- check logd.logpersistd.enable boolean for support

Bug: 28813587
Bug: 28936216
Bug: 29831823
Change-Id: Ib460ca90738ffdee17084349c1035701301c52bc
2016-07-19 14:02:32 -07:00
Mark Salyzyn
78dd2e2c74 Settings: add logpersist kernel only selection
Bug: 28813587
Bug: 28936216
Bug: 29831823
Change-Id: I9bfbb2717c2d4d39bfda6b92221a38985a4f4973
2016-07-19 14:01:41 -07:00
Mark Salyzyn
c8b1c3ec22 Settings: add logpersist selection (actions)
- Only add logpersist menu if debuggable.
- Only enable logpersist menu if Logging is On.
- Add selection for Off, All and All minus radio.
- Pop up warning box that persistent storage is to be cleared when
  selecting Off (but not if turned off by Logging Size Off or
  Disabling Debugger Options).

Bug: 28813587
Bug: 28936216
Change-Id: Ic0a58abdcd6ca41069efb818d1dcef4e3927d2de
2016-07-19 13:59:56 -07:00
Michael Wright
aacf55ab3f Color transforms are now color modes.
We've also standardized on a specific, enumerated set of modes, which
simplifies the code a bit.

Bug: 29044347
Change-Id: I621352954d42ad25f9969b7a88d53defe84dd3b4
2016-07-13 22:12:33 -07:00
Mark Salyzyn
455006c9ca Merge \"Settings: trampoline persist.logd.logpersistd to logd.logpersistd\"
am: a1b40f0267

Change-Id: I38e4c7756a2ea617053656558d8223458d898a28
2016-07-13 18:02:20 +00:00
Mahaver Chopra
ec618dc585 Merge "Use UM.DISALLOW_OEM_UNLOCK instead of Global.OEM_UNLOCK_DISALLOWED" into nyc-mr1-dev 2016-07-13 12:27:03 +00:00
Mark Salyzyn
bd900c98ef Merge \"Settings: add logpersist kernel only selection\"
am: 3c60540078

Change-Id: Ieefd7e08368174f735b8491f8f01847906e1fd3b
2016-07-12 15:29:51 +00:00
Mark Salyzyn
98849ce7ae Settings: trampoline persist.logd.logpersistd to logd.logpersistd
- Deal with trampoline, where we read logd.logpersistd and
  logd.logpersistd.buffer, write to persist.logd.logpersistd and
  persist.logd.logpersistd.buffer and logd.logpersistd*
- Deal with an as designed requirement that empty values do not
  automatically trampoline, to properly communicate state.
- check logd.logpersistd.enable boolean for support

Bug: 28936216
Bug: 29831823
Change-Id: Ib460ca90738ffdee17084349c1035701301c52bc
2016-07-12 07:22:41 -07:00
Mark Salyzyn
338377b3a0 Settings: add logpersist kernel only selection
Bug: 28936216
Bug: 29831823
Change-Id: I9bfbb2717c2d4d39bfda6b92221a38985a4f4973
2016-07-12 07:22:41 -07:00
Mahaver Chopra
6bc19a2e5c Use UM.DISALLOW_OEM_UNLOCK instead of Global.OEM_UNLOCK_DISALLOWED
Currently we used global setting to restrict user from enabling oem
unlock. As global settings can be chagned using adb, using user
restrictions instead.

Bug: 29893399
Change-Id: Icaffb080979a447d1e0f7f0d72f92c9db83ac10c
2016-07-12 15:18:49 +01:00
Makoto Onuki
0651701930 Restore "reset ShortcutManager rate limiting" dev option
Bug 30031093

Change-Id: I28cbf56e61937b15eb5806823f40e43d6bac4e72
2016-07-08 09:37:48 -07:00
Steven Ng
0998abfc8f Update the OEM unlock preference summary to reflect the disable reason
3 cases implemented:
1) Bootloader unlocked
2) Device SIM-locked
3) Device Configuration, such as SIM-lock, has not been retrieved.

Bug: 29047618
Change-Id: Idf5cc1c9b1d105a0efd408cc2aa0e229e874442e
2016-06-23 10:21:05 +01:00
Ruchi Kandoi
f8c135a986 resolve merge conflicts of 9e28f9a to nyc-dev-plus-aosp
Change-Id: If75736f8e36e2a8e13fe9740f89f632ee6bedd49
2016-06-10 22:04:52 -07:00
Mark Salyzyn
03af2286ee Settings: add logpersist selection (actions)
- Only add logpersist menu if debuggable.
- Only enable logpersist menu if Logging is On.
- Add selection for Off, All and All minus radio.
- Pop up warning box that persistent storage is to be cleared when
  selecting Off (but not if turned off by Logging Size Off or
  Disabling Debugger Options).

Bug: 28936216
Change-Id: Ic0a58abdcd6ca41069efb818d1dcef4e3927d2de
2016-06-10 21:44:32 +00:00
Wei Wang
c687e9bfbd Merge "Revert "Add an entry in developer options for location tools."" into nyc-dev
am: d0d3ca3b7c

* commit 'd0d3ca3b7c64dc30c5262251b5a6f610e2127a69':
  Revert "Add an entry in developer options for location tools."

Change-Id: I66441bf21ddd8f0977bcaec7d92a28406e3bcf0e
2016-06-02 17:22:59 +00:00
Wei Wang
d0d3ca3b7c Merge "Revert "Add an entry in developer options for location tools."" into nyc-dev 2016-06-02 17:14:02 +00:00
Wei Wang
a0b28146ba Revert "Add an entry in developer options for location tools."
Bug:28251942

This reverts commit e1c1a13cba.

Change-Id: I864a813e8f6a9488b4db2f876a0097e947ceae45
2016-06-02 04:42:02 +00:00
Mahaver Chopra
dcf3d7c185 Disallow OEM unlock when DISALLOW_FACTORY_RESET applies
Bug: 28339424
Change-Id: I2ccba997fc6c9ccfab802c0f49a9e2115a314552
2016-05-24 12:04:49 +00:00
Steven Ng
3fe140315d Add a Global setting for disabling OEM unlocking setting
+ Don't enable OEM unlocking setting if the global setting disallows it.

Bug: 28163088
Change-Id: Ic306da3fa2cecb90865be055566a7e1603e6b5e2
2016-05-13 14:09:59 +00:00
Jason Monk
7519954286 Expose dialog for current webview setting.
Change-Id: I91c796b2c75c0ac8047ba0c2555a1036e8c6c616
Fixes: 28554048
2016-05-11 11:20:55 -04:00
Wei Wang
920cf0a7b3 Merge "Add an entry in developer options for location tools." into nyc-dev 2016-04-28 05:57:30 +00:00
Wei Wang
e1c1a13cba Add an entry in developer options for location tools.
This is a temporary place holder for location dogfood tools, which will
be removed before ship.

Bug:28383982
Change-Id: I814c9a71044c2f73a6346bdd46ecd40375c984b8
2016-04-27 15:51:19 -07:00
Dan Sandler
3bd52ddf4c Developer QS tile: Show Layout.
Bug: 27872042
Change-Id: I0df2ffecbf7d2682d89c9b8343590bb04bcc305c
2016-04-24 10:53:52 -04:00
Sudheer Shanka
c779bece31 Apply policy transparency to "Stay awake" in Development settings.
Bug: 28271254
Change-Id: I203ce5c839e5f0201d287673ec3a48c8f835edc3
2016-04-19 22:49:45 -07:00