Commit Graph

4083 Commits

Author SHA1 Message Date
Tyler Gunn
4a9263a268 Merge "Add Telecom debug setting for enabling enhanced call blocking." am: 727097a400 am: c0411e0be5
am: b77daf6a8f

Change-Id: I1ae91c6e5dc605c32845e6412baf383e3299a9ff
2018-03-22 00:28:51 +00:00
Makoto Onuki
4dd8235aa8 Merge "Implement new BS warning / notification flow (1/2)" into pi-dev am: ff61d8872c
am: 4e92e3b5a3

Change-Id: Iae5a438fb116f7a068e49e0b972627f74481ac92
2018-03-22 00:02:38 +00:00
Tyler Gunn
b77daf6a8f Merge "Add Telecom debug setting for enabling enhanced call blocking." am: 727097a400
am: c0411e0be5

Change-Id: I99ba46420fb998112709d63abc502f6742e9558a
2018-03-21 23:18:23 +00:00
Tyler Gunn
727097a400 Merge "Add Telecom debug setting for enabling enhanced call blocking." 2018-03-21 21:02:24 +00:00
Makoto Onuki
16a0dd2d5e Implement new BS warning / notification flow (1/2)
- Show the battery saver confirmation dialog only for the first time.
- Start counting # of manual activations, which will be used in a
follow-up CL.

Bug: 74120126
Test: Manual tests with ./vendor/google_experimental/users/omakoto/android-battery-tester
Test: m -j ROBOTEST_FILTER=BatterySaverUtilsTest RunSettingsLibRoboTests
Test: cd frameworks/base/packages/SystemUI/tests && \
        atest src/com/android/systemui/power/PowerUITest.java src/com/android/systemui/power/PowerNotificationWarningsTest.java
Change-Id: If6a081a6222e6a87c4cd332364c89856e7648a36
2018-03-21 12:15:51 -07:00
Philip P. Moltmann
6951f56be0 Add SoundTriggerDetectionService am: 18e3eb8168
am: 9dd3e7d300

Change-Id: I13fd3f3d896825ddaf7cf5017eb027e5469208fb
2018-03-21 09:16:32 +00:00
Ben Lin
01cee8e686 Merge "Add new Intent start a package's Open By Default page directly." into pi-dev 2018-03-21 06:07:45 +00:00
Philip P. Moltmann
9dd3e7d300 Add SoundTriggerDetectionService
am: 18e3eb8168

Change-Id: I4bb7ada74c36df4a64956c9c36a1675aad1f6645
2018-03-21 06:00:01 +00:00
TreeHugger Robot
6ed6340e3c Merge changes from topic "SoundTriggerJobService-steps" into pi-dev
* changes:
  Throttle number of sound trigger operations / day
  Add SoundTriggerDetectionService
  Expose SoundTriggerManager and SoundTrigger APIs
2018-03-21 03:27:56 +00:00
Alice Sheng
c457a2d515 Merge "Revert "Revert "Add setting for enabling CPU frequency scaling.""" into pi-dev am: 0b08926fcb
am: a3bd265056

Change-Id: I8013004e763012a9ae37a26283d9046404f4dd35
2018-03-21 02:44:32 +00:00
David Chen
9827372d74 Merge "Moves the settings changed logging for statsd." into pi-dev am: 039deb4390
am: 77d986a5d9

Change-Id: I50d482a8d17804a0c75f18b5d9bc11d0633545b4
2018-03-21 00:10:15 +00:00
Alice Sheng
0b08926fcb Merge "Revert "Revert "Add setting for enabling CPU frequency scaling.""" into pi-dev 2018-03-20 21:56:40 +00:00
Philip P. Moltmann
18e3eb8168 Add SoundTriggerDetectionService
The service is meant to replace the PendingIntent based API. Once all
users of the PendingIntent based API switched the PendingIntent based API
will be removed.

To have as little as possible impact on the whole SoundTrigger framework
the RemoteSoundTriggerDetectionService class implements the same
interface as the PendingIntent based class. Hence the exising code has
very little change. Further once the old code can be removed the amount
of changed (and added) code is limited.

The RemoteSoundTriggerDetectionService -> SoundTriggerDetectionService
is a vanilla as possible service implementation. The special behaviors
are:
- The system holds a wakelock while service operations are in progress
and the service is bound as foreground. Hence the service can e.g.
listen to the microphone.
- Service operations have a certain amount of time they are allowed to
run. Once every operation is either finished or the the operation
exceeded the allotted time, the system calls onStopOperation for each
still pending operation. This is a similar model as for the commonly
used JobService.
  Please note that if the time allowed for an operation is 15s and
op1 was run as 0si, and op1 was run at 5s, the service is allowed to run
until 20s. Hence _both_ onStopOperations will happen at 20s. This is
done for ease of implementation but should not give the service more
power than calling onStopOperation exactly 15s after each operation is
triggered.
- If an operation is done before the allotted time is reached, the
service can declare the operation as finished manually by calling
onOperationFinished. This is a call back into the system, hence a
'client' binder is sent to the service. If the operation is finished
by calling this method onStopOperation will not be called.
- As the service instance might be killed and restored between
operations we add a opaque bundle 'params' to each operations. The users
of the API can use this to send data from the start command to the
operations. It can also just be set to null. The params are not meant to
store changing state in between operations. Such state needs to be
persisted using the regular methods (e.g. write it to disk)
- A service can be used for multiple recognition sessions. Each
recognition is uniquelity defined by its sound model UUID. Hence each
operation gets at least tree arguments: Operation ID, sound mode UUID, params
- As a small optimization the params are cached inside of the service
instance.

The time allowed for each operation is in a @SystemAPI global setting,
so the service can make sure it finishes the operations before they are
stopped. It might take some time to deliver the operations via the
binder, hence it is not recommended to try to use every last ms of
allotted time.

Test: atest SoundTriggerDetectionServiceTest (added in separate CL)
      atest android.provider.SettingsBackupTest
Change-Id: I47f813b7a5138a6f24732197813a605d29f85a93
Fixes: 73829108
2018-03-20 13:57:14 -07:00
TreeHugger Robot
039deb4390 Merge "Moves the settings changed logging for statsd." into pi-dev 2018-03-20 20:30:31 +00:00
Anthony Stange
c97870a91a DO NOT MERGE Add scan background mode to Settings.Global.
This enables us to mess with the different scan intervals and shift
clients to a different scan mode in the background based on what scan
interval values we choose for the different power modes.

Bug: 71765044
Test: None. Just adding a key.
Change-Id: Id48ebc521dd3fe8a68c9c4c0bdb1018ea5b3743e
2018-03-20 10:51:54 +00:00
Alice Sheng
20f6e59d58 Merge "Revert "Add setting for enabling CPU frequency scaling."" into pi-dev am: 7723aed494
am: 4aa94a7c50

Change-Id: Id2d785bd171e9ef5803b65cb6f4b82ae93005701
2018-03-20 06:13:31 +00:00
Alice Sheng
4aa94a7c50 Merge "Revert "Add setting for enabling CPU frequency scaling."" into pi-dev
am: 7723aed494

Change-Id: Ibc6fb095d97e53b9bd95b58e1fbbb77a92d24145
2018-03-20 03:25:22 +00:00
Roshan Pius
265efbd527 Merge "Settings: Remove unused bg scan throttle settings" into pi-dev
am: f4f317798b

Change-Id: Ifb8dcd8b7d98bf427864651d5a80b4d2efbb3d77
2018-03-20 02:31:23 +00:00
David Chen
bd78991bc6 Moves the settings changed logging for statsd.
Previously, we wrote a log entry regardless of permission checks, so
the logging could be misleading. Now we only send the log to statsd
after verifying that this setting mutation is valid.

Test: Flashed onto marlin-eng and verified stats-log as expected.
Bug: 73493944
Change-Id: I2a8b052aa8c380ffc5d15caec089fffcdc5823f4
2018-03-19 17:11:03 -07:00
Ajay Nadathur
e9c0e21d44 Merge "Add setupwizard personalisation state to Settings" into pi-dev
am: e9b60f2cd3

Change-Id: Idd6fbd7415316ffe8e6641ec2becb99c6d48329d
2018-03-20 00:07:13 +00:00
Alice Sheng
59a9488f50 Revert "Revert "Add setting for enabling CPU frequency scaling.""
This reverts commit 6750352248.

Reason for revert: Added SElinux policy to allow the service to be started. Verified by local testing on the latest pi-wear-dev.

Bug: 74018496
Bug: 75974893
Change-Id: I9bd8939f6292be9c160e19ebdf934023792059ba
2018-03-19 23:46:56 +00:00
Alice Sheng
7723aed494 Merge "Revert "Add setting for enabling CPU frequency scaling."" into pi-dev 2018-03-19 22:38:25 +00:00
Alice Sheng
6750352248 Revert "Add setting for enabling CPU frequency scaling."
This reverts commit 2e8afd8736.

Reason for revert: SELinux Boot crash
Bug: 75974893

Change-Id: I4751530a1b460842130a495efe688aaf19b92638
2018-03-19 22:36:52 +00:00
TreeHugger Robot
f4f317798b Merge "Settings: Remove unused bg scan throttle settings" into pi-dev 2018-03-19 22:24:04 +00:00
Alice Sheng
23164d63a6 Merge "Add setting for enabling CPU frequency scaling." into pi-dev am: 1799f2b878
am: 4eafb6299d

Change-Id: I35f597767a1025fb17352016682c2f49ea8676ce
2018-03-19 21:48:31 +00:00
TreeHugger Robot
e9b60f2cd3 Merge "Add setupwizard personalisation state to Settings" into pi-dev 2018-03-19 21:26:37 +00:00
Tyler Gunn
37ce669cf8 Add Telecom debug setting for enabling enhanced call blocking.
This feature is only available for certain carriers at the current time.
To facilitate test team productivity, adding a system setting which can
be accessed from the Telecom debug menu to enable this functionality.

Test: Manual
Bug: 28189985
Change-Id: I4c812cecd2832a722e5dc73b7c719a9e0594064d
2018-03-19 13:55:13 -07:00
Alice Sheng
4eafb6299d Merge "Add setting for enabling CPU frequency scaling." into pi-dev
am: 1799f2b878

Change-Id: I297da1b2ed52e81bb632842b468237d2b0ed31a9
2018-03-19 20:33:11 +00:00
TreeHugger Robot
71ac2424f2 Merge "Add setupwizard personalisation state to Settings" 2018-03-19 19:04:28 +00:00
Alice Sheng
1799f2b878 Merge "Add setting for enabling CPU frequency scaling." into pi-dev 2018-03-19 18:41:40 +00:00
Roshan Pius
9c396677d9 Settings: Remove unused bg scan throttle settings
Bug: 68987915
Test: Compiles
Change-Id: I49b213f0d63f2a639e45c2239506787d31ae866a
Merged-In: Id878daa0f782ddc751e726ee19cdc1c8e5ea1bc2
2018-03-19 10:39:18 -07:00
Roshan Pius
b58bfc11c8 Settings: Remove unused bg scan throttle settings
Bug: 68987915
Test: Compiles
(cherry-picked from d8fa3c3bdf7a66681986dc52e7ba4f8f75061c9b)

Change-Id: Id878daa0f782ddc751e726ee19cdc1c8e5ea1bc2
2018-03-19 03:00:32 +00:00
Michael Kwan
d1457eea49 Merge "Modify time only mode flag into set of values instead of just one." into pi-dev am: c5d0ed9f3c
am: 74d615f1ac

Change-Id: I98aaa71b0988e96d079ed1813dbb777565c3d655
2018-03-17 22:39:28 +00:00
Michael Kwan
74d615f1ac Merge "Modify time only mode flag into set of values instead of just one." into pi-dev
am: c5d0ed9f3c

Change-Id: I4721197b1329a14aa51f1b49a05bdade1fb71ef8
2018-03-17 22:22:33 +00:00
Ajay Nadathur
702fc647f3 Add setupwizard personalisation state to Settings
bug: 74396457
Test: Manually tested and verified
Change-Id: I84b8cf7c45818131f903743b6c42cfeffe1c7194
Merged-In: I84b8cf7c45818131f903743b6c42cfeffe1c7194
2018-03-17 02:20:22 +00:00
Anthony Stange
44b04655e5 Merge "Add scan background mode to Settings.Global." am: 3aa064897e am: 4061a9f348
am: 5dd917de9f

Change-Id: Ib7fa9d8bafc273b6d455a15dd4d5a685010979b3
2018-03-16 20:06:24 +00:00
Anthony Stange
5dd917de9f Merge "Add scan background mode to Settings.Global." am: 3aa064897e
am: 4061a9f348

Change-Id: Iac4d39cc4fcf0f0c8273cee7fbe9822251764068
2018-03-16 19:40:08 +00:00
Michael Kwan
5f5a0bf00d Modify time only mode flag into set of values instead of just one.
The time only mode flag has not been used yet, so the change should
be low impact.

Bug: 38259902
Test: m -j32
Change-Id: Ie01870633dbaaf51989a148f105a995f58f0da4e
2018-03-16 12:34:19 -07:00
Anthony Stange
8bde24cf53 Merge "Revert "Add scan background mode to Settings.Global."" 2018-03-16 17:49:12 +00:00
Anthony Stange
ac6e72bb07 Revert "Add scan background mode to Settings.Global."
This reverts commit bf9f70e146.

Reason for revert: aosp is automatically merged to the internal tree. Since this was submitted outside the tree too, it's causing problems it seems. https://android-build.googleplex.com/builds/branches/git_mirror-aosp-master-with-vendor/grid?head=4659773&tail=4659610

Change-Id: I086d636ce8c7b67b33904195e6977e6c333e08ba
2018-03-16 17:22:56 +00:00
Anthony Stange
ff54a35a0f Add scan background mode to Settings.Global.
This enables us to mess with the different scan intervals and shift
clients to a different scan mode in the background based on what scan
interval values we choose for the different power modes.

Bug: 71765044
Test: None. Just adding a key.
Change-Id: Id48ebc521dd3fe8a68c9c4c0bdb1018ea5b3743e
2018-03-16 16:07:45 +00:00
Annie Meng
d069a888cf DO NOT MERGE Create a setting for backup/restore agent timeouts
Part of push to make backup and restore agent timeouts configurable. Creates
a Global setting for the current static BackupManagerService timeouts so
that they can be overriden with P/H. We keep the current default values,
which will be updated once we investigate what more appropriate values are.

Remame the constants to better reflect what they're used
for. Next, we will update the framework to use these constants.

This depends on the refactor of how we observe changes to key value
backup settings (ag/3709997).

Bug: 70276070
Test: m -j RunFrameworksServicesRoboTests ROBOTEST_FILTER=BackupAgentTimeoutParametersTest
Change-Id: Id506314ce0c8bd5e4d1d8b4001b26cbad0056c99
2018-03-15 17:43:56 +00:00
Annie Meng
1e13e37401 Create a setting for backup/restore agent timeouts
Part of push to make backup and restore agent timeouts configurable. Creates
a Global setting for the current static BackupManagerService timeouts so
that they can be overriden with P/H. We keep the current default values,
which will be updated once we investigate what more appropriate values are.

Remame the constants to better reflect what they're used
for. Next, we will update the framework to use these constants.

This depends on the refactor of how we observe changes to key value
backup settings (ag/3709997).

Bug: 70276070
Test: m -j RunFrameworksServicesRoboTests ROBOTEST_FILTER=BackupAgentTimeoutParametersTest
Change-Id: Id506314ce0c8bd5e4d1d8b4001b26cbad0056c99
2018-03-15 12:59:13 +00:00
Primiano Tucci
d4b6c8c162 Merge "perfetto: Add setting to enable/disable traced" into pi-dev 2018-03-15 12:24:02 +00:00
Hector Dearman
cf92ca169b perfetto: Add setting to enable/disable traced
This will help us run P/H experiments by controlling the
whether traced runs through P/H.

This will allow to gradually roll out traced and, in an
emergency, remotely disable it.

Run:
$ adb shell 'ps -A | grep traced'
Should see traced.
$ adb shell 'settings put global sys_traced 0'
$ adb shell 'ps -A | grep traced'
Should no longer see traced.

Test: See above.
Bug: b/71737179
Bug: b/74383547
Change-Id: I1f564421d9abae14d7d80769e9517eb363dae33a
Merged-In: I1f564421d9abae14d7d80769e9517eb363dae33a
2018-03-15 12:23:03 +00:00
Kweku Adams
5ddc3fe039 Merge "incidentd: cleaning up settings.proto" into pi-dev am: 41b5ece135
am: 81b8e992ca

Change-Id: I16d72f114e5a34ea08564d9fa27361c65c8a7d91
2018-03-14 22:31:19 +00:00
TreeHugger Robot
41b5ece135 Merge "incidentd: cleaning up settings.proto" into pi-dev 2018-03-14 21:31:32 +00:00
Antony Sargent
8eafafded3 Merge "Update comment for HAPTIC_FEEDBACK_ENABLED setting" into pi-dev am: d357342a4a
am: 537e2d55e5

Change-Id: If065b6aad2c4864cbc728af8818bd94f1fc6a046
2018-03-14 18:24:33 +00:00
Ajay Nadathur
08bc0d04a4 Add setupwizard personalisation state to Settings
bug: 74396457
Test: Manually tested and verified
Change-Id: I84b8cf7c45818131f903743b6c42cfeffe1c7194
2018-03-13 23:16:38 +00:00
Kweku Adams
3699c36d24 incidentd: cleaning up settings.proto
This also fixes dumping of settings that use a prefix.

Since the proto isn't being used yet, I thought it would be nice to
clean it up so we start using it with a clean format.

Bug: 74611860
Test: flash device and check incident output.
Change-Id: Ib99ccab7929208cf8b4404715b0bd417852314c6
2018-03-13 13:36:05 -07:00