Commit Graph

16034 Commits

Author SHA1 Message Date
Treehugger Robot
58ea8819f5 Merge "Expose the onCarrierPrivilegedAppsChanged as SystemApi" 2019-12-16 18:40:50 +00:00
Chen Xu
435d1c1a53 remove API RoleManager.getFinancialSms
getFinancialSms is not functional and not used today, thus
remove it to avoid future confusion

Bug: 138745655
Bug: 140908357
Test: atest android.telephony.cts.SmsManagerTest
Change-Id: Ib57d0fc189b6c894227894ee02b592f7ee46f22f
(cherry picked from commit d6b2673181)
Merged-in: Ib57d0fc189b6c894227894ee02b592f7ee46f22f
2019-12-13 20:48:41 -08:00
yinxu
4631f7231f Expose the onCarrierPrivilegedAppsChanged as SystemApi
(cherry picked from commit 0016eefe11)

Bug: 145944877
Test: N/A
Merged-in: I0fd32f38587ae46d1d170bc8353d23bbc9928cd0
Change-Id: I0fd32f38587ae46d1d170bc8353d23bbc9928cd0
2019-12-13 11:01:43 -08:00
Neil Fuller
312da9b9fc Handle multiple phoneIds in time detection
Android has dual sim devices, which means multiple "phone" time
signals. NITZ is generally trusted and considered "good enough" in the
absence of better signals, but it is provided by carriers and it's not
unusual for the signals to be incorrect by minutes. We don't want the
device system clock just flicking to the latest signal received.

The changes to the SimpleTimeDetectorStrategy try to balance recency and
provide some consistency / determinism. See comments in the code for
details. The time zone detection works in a similar way, particularly
with respect to choosing the lowest phoneId in the event of a tie.

There will be a follow-up change to remove the word "Simple" from
SimpleTimeDetectorStrategy as it no longer applies.

Test: atest services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java
Test: atest android.app.timedetector
Bug: 140712361
Change-Id: I228aff8709eabfcec910af22f7ab08fee32d566a
2019-12-10 19:15:38 +00:00
Neil Fuller
6e3020490d Merge "TimeDetector improvements" 2019-12-06 11:53:14 +00:00
Neil Fuller
106f18a666 Add suggestManualTimeZoneSuggestion to the client
Add TimeZoneDetector.suggestManualTimeZone() to set the time zone
"manually" and switch the device policy manager code over to using
it.

Add RequiredPermission annotations to TimeZoneDetector while there.

Bug: 140712361
Test: treehugger only
Test: atest services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Change-Id: Id247fddfdd793732dd88294ee215eda37cd0be4c
2019-12-05 12:12:14 +00:00
Charles Munger
17d1d950ec Merge "Deprecate IntentService" 2019-12-04 22:17:28 +00:00
Treehugger Robot
2b65793cd6 Merge "Merge Android10 QPR1 into AOSP master" 2019-12-03 23:15:02 +00:00
Neil Fuller
0db51fc310 TimeDetector improvements
TimeDetector improvements for production code and tests. Many of these
are based on feedback given for TimeZoneDetector and to improve
consistency across the two.

1) Add a builder for PhoneTimeSuggestion, making it immutable (except
for debug info that doesn't affect behavior).
2) Improve debug logging.
3) Improve comments / annotations.

Test: atest android.app.timedetector
Test: atest com.android.server.timedetector
Bug: 140712361
Change-Id: Ibd0d357c536d512ffe4995c4e6560e483a260ae5
2019-12-03 20:22:05 +00: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
7d8a624085 Merge "Add a new time zone detection service" 2019-12-03 08:40:07 +00: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
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
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
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
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
Charles Munger
6f8b090299 Deprecate IntentService
IntentService always had some issues, such as delivering null, adding
latency, inconsistently silently dropping tasks scheduled on its thread
local handler, etc. But with android O's background task restrictions,
it's really not useful anymore, and there are jetpack APIs that provide
its same functionality.

Bug: 144042891
Test: No behavior changes
Change-Id: I1a91afeeb73e270c54a9ec266b15b5d865ef8339
2019-11-22 09:12:25 -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
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
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
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
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
dab3711435 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
Change-Id: Ie08d8bb30e48a9e7ade85334c6195a791ecc0d9b
2019-11-19 12:37:24 -08:00
Hall Liu
1d7a53da98 Merge changes from topic "mainline4"
* changes:
  Add new API for Telecom to send phone state
  Minor style correction to avoid merge conflict
  non-mainline telephony related AIDL refactor/decoupling
2019-11-18 22:31:27 +00:00
Beverly
e9e1e8290a Merge "Update equals and hashCode methods of NoMan.Policy"
am: e3d6061a67

Change-Id: I723e70a5e6c856ecd693d9b6eb8c592303fe9f11
2019-11-18 13:53:33 -08:00
Treehugger Robot
e3d6061a67 Merge "Update equals and hashCode methods of NoMan.Policy" 2019-11-18 21:05:15 +00:00
Chen Xu
2d98a66b18 Merge "add a new telephony protection level"
am: cd953e939f

Change-Id: Ie275baf92a865fe1dc5855b00e49944d2598e4b4
2019-11-18 11:16:00 -08:00
Beverly
3fe3e8195a Update equals and hashCode methods of NoMan.Policy
Test: atest AudioManagerTest#testPriorityOnlyChannelsCanBypassDnd
Fixes: 142643922
Change-Id: I15835f784ba73b40eccf92a0a430905d28647669
Merged-In: I15835f784ba73b40eccf92a0a430905d28647669
(cherry picked from commit 4f8b0224e1)
2019-11-18 13:55:43 -05:00
Chen Xu
da02e07b92 add a new telephony protection level
for oems which take telephony mainline module, all telephony related
apks will be signed with non-platform certificate. that said apks won't
be able to grant platform signature permission. Solution is to add a new
telephony protection level.

Bug: 141479803
Test: cts & manual
Change-Id: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
(cherry picked from commit 45c183d201)
Merged-in: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
2019-11-17 17:49:41 -08:00
Chen Xu
8eb62f9485 non-mainline telephony related AIDL refactor/decoupling
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony

Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
Merged-In: I9413ef758cceadd251d03f3b5ea1054cc48ef044
2019-11-15 18:02:40 -08:00
Charles Munger
66f56ac1e8 Merge "Deprecate AliasActivity"
am: 95b815e26e

Change-Id: I9013bd8596ba35bbdaa1e2657c0416f1690a37dc
2019-11-15 10:58:06 -08:00
Jayachandran Chinnakkannu
f3b4fc4dac Merge "Remove exposing of ImsManager and RcsMessageManager in system service registery"
am: ad648ffc9d

Change-Id: I9eaf4c5935f69d12ff25fa4d8ac8cc7ec05d591a
2019-11-15 10:50:57 -08:00
Treehugger Robot
95b815e26e Merge "Deprecate AliasActivity" 2019-11-15 18:38:35 +00:00
Charles Munger
7cd4682614 Deprecate ListActivity and ExpandableListActivity
These classes provide minimal functionality over the view classes,
and are incompatible with appcompat or other activity base classes.
Plus, RecyclerView implements all this functionality in a more
modern way now anyway.

Bug: 144042891
Change-Id: Ibd1faba0f2e05028da867aa4bb3ce5d2ae14e004
Test: No behavior changes
2019-11-15 10:24:23 -08:00
Jayachandran C
c01f4eda35 Remove exposing of ImsManager and RcsMessageManager in system service registery
Since these are hidden it cannot be accessed by system service registery
Removing it for now and can be added later when these becomes SystemApi

Bug: 140768340
Test: Build & basic sanity
Change-Id: Ibb007f0a761bcbd006ebffbb552d0da82b586d03
2019-11-15 18:10:54 +00:00