Commit Graph

16078 Commits

Author SHA1 Message Date
Neil Fuller
57aaf1d427 Merge "Add a manual path for setting time zone" am: 7fcab2dba8
am: 076cd7aa3a

Change-Id: I03abce9eca7c3fa031a4a0b103cb0063ea4bb85b
2019-12-04 07:42:57 -08:00
Neil Fuller
076cd7aa3a Merge "Add a manual path for setting time zone"
am: 7fcab2dba8

Change-Id: I4a77a647a01fb5b274a5bf819b1e22d4ec7d8219
2019-12-03 12:28:24 -08:00
Neil Fuller
f807b4c364 Merge "Add a new time zone detection service" am: 7d8a624085
am: 256f4df4b6

Change-Id: Ie1b28c5cea14a23beac2e70eb7878f7f09461d6c
2019-12-03 08:42:57 -08:00
Neil Fuller
2c6d510e45 Add a manual path for setting time zone
Add a mechanism for suggesting the "manual" time zone setting to the
TimeZoneDetectorStrategy, e.g. for the settings app to use. This
involves various changes / renames to TimeZoneDetectorStrategy to
introduce a distinction between 3 things:
1) General detection code, applicable for anything that changes device
time zone.
2) Phone detection code, applicable for setting the device time zone
from phone signals.
3) Automatic detection code, applicable for setting the device time zone
automatically (of which telephony signals is currently the only example,
but could be joined by new things in future).

Adds tests for the new ManualTimeZoneSuggestion and makes improvements
to the existing tests for PhoneTimeZoneSuggestionTest.

Test: atest android.app.timezonedetector
Test: atest com.android.server.timezonedetector
Bug: 140712361
Change-Id: I9c3a18e47b157cccabda74855e5c91b45fa93b92
2019-12-03 16:38:03 +00:00
Neil Fuller
256f4df4b6 Merge "Add a new time zone detection service"
am: 7d8a624085

Change-Id: Ic30cd636b4863a507dda0bdb05e982ee411d936f
2019-12-03 08:30:50 -08:00
Neil Fuller
7d8a624085 Merge "Add a new time zone detection service" 2019-12-03 08:40:07 +00:00
Peter Wang
ed6d7e8b6e Merge "[Telephony Mainline] Exposed sendOrderedBroadcast" am: 471b839d02
am: 80a5a3db13

Change-Id: I0726f8853b46571976ae6f634e6a05265105bb3f
2019-12-02 13:54:51 -08:00
Peter Wang
80a5a3db13 Merge "[Telephony Mainline] Exposed sendOrderedBroadcast"
am: 471b839d02

Change-Id: Icd0230b880346a4ec573ccaa8d1adbade336f87a
2019-12-02 13:47:11 -08:00
Peter Wang
471b839d02 Merge "[Telephony Mainline] Exposed sendOrderedBroadcast" 2019-12-02 21:32:33 +00:00
Neil Fuller
3352cfce2f Add a new time zone detection service
Add a new time zone detection service. Much of the code is from
frameworks/opt/telephony with some changes for naming, threading and
to modify the interaction with the "Callback" class.

Overall goal:

Implementing the service in the system server means it will be easier to
add new time zone detection logic unrelated to telephony in future.

Bug: 140712361
Test: atest com.android.server.timezonedetector
Test: atest android.app.timezonedetector
Change-Id: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
Merged-In: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
(cherry picked from commit 3e3b5405b6)
2019-11-28 13:27:55 +00:00
Neil Fuller
1d3f41186d Merge "Add a new method to set time" am: 5f01cb6ddc
am: b07f90adb8

Change-Id: Ia70ee27e4817cc1465513eaa7e076c8ccc4aee11
2019-11-28 00:59:51 -08:00
Neil Fuller
b07f90adb8 Merge "Add a new method to set time"
am: 5f01cb6ddc

Change-Id: If92a40f84971a663f99d7d764cd45e8d3510bfda
2019-11-28 00:54:46 -08:00
Peter Wang
cf8bfcc4c2 [Telephony Mainline] Exposed sendOrderedBroadcast
with appOp as String and options as Bundle

Bug: 139077993
Test: Build, GsmInboundSmsHandlerTest, CdmaInboundSmsHandlerTest and WapPushOverSmsTest
Change-Id: I60e21c7202d1bc7c5d28dfad2e2edde902f28a15
Merged-In: I60e21c7202d1bc7c5d28dfad2e2edde902f28a15
2019-11-27 20:10:20 -08:00
Neil Fuller
3aedd49238 Add a new method to set time
Before this change there are a various components that set the system
clock by directly calling AlarmManager.setTime(). This change exposes a
new method on TimeDetector to use when setting the device time manually
(e.g. via settings) and modifies some callers to use it.

The intent is to later restrict the number of distinct processes that
can manipulate the device system clock directly so that all time changes
go through the time detector service, which can enforce policy, log
the reasons for changes, and so on.

Bug: 140712361
Test: atest com.android.server.timedetector
Change-Id: I9300dba868ed61249d0848b0dd4b953996161bda
Merged-In: I9300dba868ed61249d0848b0dd4b953996161bda
(cherry picked from commit e376756b0c)
2019-11-27 16:34:53 +00:00
Neil Fuller
4fae9dd7c8 Merge "Allow for empty time suggestions" am: a241a15ccc
am: e02dcaa9d1

Change-Id: I06dd78a0a45df3761c271eb106fc15029989e2bd
2019-11-27 02:11:52 -08:00
Neil Fuller
e02dcaa9d1 Merge "Allow for empty time suggestions"
am: a241a15ccc

Change-Id: Ib6e1ddbba9c474f06475a666d025ab8e0f98189b
2019-11-27 02:04:56 -08:00
Neil Fuller
a241a15ccc Merge "Allow for empty time suggestions" 2019-11-27 09:45:53 +00:00
Meng Wang
ec606bd492 Merge "System API: Context#registerReceiverForAllUsers" am: 9e590914cb
am: 5eda192492

Change-Id: Ia177e20dd70a6db34accd01dfa1e4c59f264cbc1
2019-11-25 10:16:28 -08:00
Meng Wang
5eda192492 Merge "System API: Context#registerReceiverForAllUsers"
am: 9e590914cb

Change-Id: I2d98300ad4958d19e69dcdfda83e9d5df086d43a
2019-11-25 10:07:43 -08:00
Meng Wang
9e590914cb Merge "System API: Context#registerReceiverForAllUsers" 2019-11-25 17:53:53 +00:00
Meng Wang
e3bd3babbc System API: Context#registerReceiverForAllUsers
Bug: 141193711
Test: make
Merged-In: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
Change-Id: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
2019-11-23 02:17:27 +00:00
Felipe Leme
5c9f648edd Merge "Fixes usage of WallpaperManager to make it optional." into qt-qpr1-dev
am: 659f477f65

Change-Id: I6946b0001c524dff8d11b2889e8b30d6a059218d
2019-11-22 16:16:59 -08:00
TreeHugger Robot
659f477f65 Merge "Fixes usage of WallpaperManager to make it optional." into qt-qpr1-dev 2019-11-23 00:05:20 +00:00
Charles Munger
e28f085137 Merge "Deprecate ListActivity and ExpandableListActivity" am: 0600b03d46
am: 87119ab3e2

Change-Id: Id3f4e5cc41c143161b0fc5d7b173a1baff88de5b
2019-11-22 13:55:18 -08:00
Charles Munger
87119ab3e2 Merge "Deprecate ListActivity and ExpandableListActivity"
am: 0600b03d46

Change-Id: Ia077618f79c17277abe49ddd0bd8ddcc20586b0c
2019-11-22 13:49:30 -08:00
Treehugger Robot
0600b03d46 Merge "Deprecate ListActivity and ExpandableListActivity" 2019-11-22 20:53:55 +00:00
cncn
689403c3d5 Merge "Make Notification.Builder.SetFlag public" am: c8bd4aecb3
am: dca2d45630

Change-Id: I705e0967e993237d9f1ac2b276e66fab2422f098
2019-11-21 18:51:47 -08:00
cncn
dca2d45630 Merge "Make Notification.Builder.SetFlag public"
am: c8bd4aecb3

Change-Id: I3b8ff8e7c754b12778e40a9abcc829fb7a12671b
2019-11-21 18:41:27 -08:00
TreeHugger Robot
d6dfaf4c9d Merge "Update equals and hashCode methods of NoMan.Policy" into qt-qpr1-dev 2019-11-22 00:51:41 +00:00
Treehugger Robot
c8bd4aecb3 Merge "Make Notification.Builder.SetFlag public" 2019-11-22 00:39:10 +00:00
cncn
9d0fd9c9d6 Make Notification.Builder.SetFlag public
Bug: 144846447
Test: Build Successfully
Change-Id: If25bede41eec1f7e7ca3ae8fc669df1964d7da05
2019-11-21 22:55:13 +00:00
Jay Aliomer
8fd7fb99cf Dark theme twilight mode backend and tile
am: 381e3300e8

Change-Id: I0d5b96795d5ad818a9b7a21758721e35059d18ed
2019-11-21 12:23:42 -08:00
Jay Aliomer
381e3300e8 Dark theme twilight mode backend and tile
When the user has Dark theme scheduling turned on (b/141567787), the quick settings tile subtext should reflect the following:
If Dark theme is on: "Until sunrise"
If Dark theme is off: "On at sunset"
If the user does not have Dark theme scheduled, the text should not appear.
This matches the appearance of the Night Light QS tile.
All starting windows snapshots will be deleted and splash screens
will be used instead.

Test: atest UiModeManagerServiceTest
Fix: 143874807
Merged-In: Ie2ce64b5c5544fffe76be7ec3f971eb7461f8c4d

Change-Id: Ie2ce64b5c5544fffe76be7ec3f971eb7461f8c4d
(cherry picked from commit 8b2671b029)
2019-11-21 18:05:22 +00:00
Makoto Onuki
b0100311bf Merge "Explicitly take flags in createContextAsUser()" am: a7948ddcb9
am: d52db070cd

Change-Id: I7ed103b7c148508635818e779b55a585b1540c85
2019-11-21 08:13:05 -08:00
Makoto Onuki
d52db070cd Merge "Explicitly take flags in createContextAsUser()"
am: a7948ddcb9

Change-Id: I6947903d66da1e64c461a1557e82a72a97a8848b
2019-11-21 08:05:06 -08:00
Makoto Onuki
6b1e9d2f9f Explicitly take flags in createContextAsUser()
Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id2e3d5ffe5887a4916e0872a7e85d62cbb439744
(cherry picked from commit e5449f0b34)
Merged-in: Id2e3d5ffe5887a4916e0872a7e85d62cbb439744
2019-11-20 16:20:23 -08:00
Makoto Onuki
2dfdf1a4cf Merge "Add Context.createContextAsUser()" am: 63d5e4a0b9
am: 056b8f00b7

Change-Id: I703b0234c75f91ad548a0c431277d684212e0586
2019-11-20 14:11:19 -08:00
Makoto Onuki
056b8f00b7 Merge "Add Context.createContextAsUser()"
am: 63d5e4a0b9

Change-Id: I022daba2bc9234ffe7b7fa760942a58852e406b3
2019-11-20 14:04:20 -08:00
Treehugger Robot
63d5e4a0b9 Merge "Add Context.createContextAsUser()" 2019-11-20 21:53:01 +00:00
Neil Fuller
568fd897eb Allow for empty time suggestions
Allow for empty time suggestions in the TimeDetectorService. The empty
suggestions are currently ignored but are likely to be used in future
time detector strategy implementations.

Bug: 140712361
Test: atest android.app.timedetector.PhoneTimeSuggestionTest
Test: atest com.android.server.timedetector
Change-Id: Ifb219702fa8bc53665a0d74752e06d851d86f8bb
2019-11-20 16:04:37 +00:00
Tyler Gunn
7b1c44d461 Merge "Add prioritized enableCarMode API in UiModeManager" am: 8e7a1f8528
am: 5474568b87

Change-Id: I3ebce6b89c2b7cd446aabd5921e8f41a5bb9e783
2019-11-20 00:25:07 -08:00
Tyler Gunn
5474568b87 Merge "Add prioritized enableCarMode API in UiModeManager"
am: 8e7a1f8528

Change-Id: I81d8b4a457c567e19c3c8e499cc1f08e1c8af3b3
2019-11-20 00:17:34 -08:00
Tyler Gunn
8e7a1f8528 Merge "Add prioritized enableCarMode API in UiModeManager" 2019-11-20 07:08:19 +00:00
Makoto Onuki
9432f7d43c Add Context.createContextAsUser()
Without it, apps (mainline modules) will need to use createPackageContext...,
which is a bit painful.

Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id640e03862462724df1a4a3101f0b08faafba22f
(cherry picked from commit b844001d6a)
Merged-in: Id640e03862462724df1a4a3101f0b08faafba22f
2019-11-19 20:51:04 -08:00
Tyler Gunn
f05f2c2cc2 Add prioritized enableCarMode API in UiModeManager
Per design doc (go/android-car-mode-design), added new system API to
enable car mode and specify a priority for the calling app.
Also modified UiModeManager to pass the package name of the caller to
UiModeManagerService.

Bug: 136109592
Test: Added new unit tests and CTS tests.
Test: Added Telecom test app functionality to verify.
Change-Id: I2848039c9ea18ba93e7694e04c4e5dc70759daa3
Merged-In: I2848039c9ea18ba93e7694e04c4e5dc70759daa3
2019-11-19 23:15:52 +00:00
Hall Liu
ae63546d19 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
am: dab3711435

Change-Id: Ib75482a87545f7743f0049c8e51c354d2294c2af
2019-11-19 15:12:28 -08:00
Hall Liu
dab3711435 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
Change-Id: Ie08d8bb30e48a9e7ade85334c6195a791ecc0d9b
2019-11-19 12:37:24 -08:00
Satakshi Rana
2613be298f Merge "Screenshot Notification Smart Action: AiAi and - Sys UI integration" into qt-qpr1-dev
am: 73b4e1923a

Change-Id: Ib545347db4b8aa49f2467e785d0572ce2f5d5b25
2019-11-19 09:22:01 -08:00
Satakshi Rana
73b4e1923a Merge "Screenshot Notification Smart Action: AiAi and - Sys UI integration" into qt-qpr1-dev 2019-11-19 17:14:49 +00:00
Felipe Leme
8d4c825ce3 Fixes usage of WallpaperManager to make it optional.
As the main javadoc states:
"An app can check whether wallpapers are supported for the current user,
by calling {@link #isWallpaperSupported()}, and whether setting of
wallpapers is allowed, by calling {@link #isSetWallpaperAllowed()}."

Test: manual verification on automotive
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest # on automotive

Bug: 138939803
Bug: 132111956

Change-Id: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
Merged-In: I88946f92ff54e556d289c41c28e22da3a4b8c8b8
(cherry picked from commit 34a861add1)
2019-11-19 01:24:52 +00:00