Commit Graph

16620 Commits

Author SHA1 Message Date
Eran Messeri
57b58c7257 Control lock sceen message on organization-owned device
Grant the profile owner of an organization-owned device the ability to
control the owner information shown on the lock screen.

Bug: 138709470
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest
Test: atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testLockScreenInfo
Change-Id: Ie4e3bd421a655c88a311f1378ef3c265b37502f0
2019-11-30 21:14:04 +00:00
Ruslan Tkhakokhov
e794ceea61 Add a System API to block keys in KV restore
BackupManager#excludeKeysFromRestore can be used to pass a
list of keys that will be excluded from restore for the given package.
It is useful in situations when a key being restored can cause bad UX on
certain devices.

Bug: 145126096
Test: atest KeyValueRestoreExclusionHostSideTest
Change-Id: Ibbfd5e9196122c9bc3d31a3f0cc9430e433b9fd8
2019-11-28 20:33:42 +00:00
Ruslan Tkhakokhov
9e111f19df Add BackupManager#excludeKeysFromRestore()
Add the method as a hidden API for now. Move to System API later.

Bug: 145126096
Test: 1. Call BM#excludeKeyFromRestore for a test package
      2. Reboot the device
      3. Run restore for the test package
      4. Verify excluded keys are not restored

Change-Id: Ice57299eaf54cee8428b86e2d4f78de12b8db4fc
2019-11-28 20:33:24 +00:00
Neil Fuller
8c6790cc7e Merge "Add a new time zone detection service" 2019-11-28 13:00:28 +00:00
Neil Fuller
3e3b5405b6 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
2019-11-28 12:58:05 +00:00
Peter Wang
7701f57250 [Telephony Mainline] Exposed sendOrderedBroadcast
with appOp as String and options as Bundle

Bug: 139077993
Test: Build, GsmInboundSmsHandlerTest, CdmaInboundSmsHandlerTest and WapPushOverSmsTest
Change-Id: I60e21c7202d1bc7c5d28dfad2e2edde902f28a15
2019-11-27 15:20:42 -08:00
Neil Fuller
e376756b0c 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
2019-11-27 10:44:13 +00:00
Neil Fuller
0715e47f92 Merge "Allow for empty time suggestions" am: a241a15ccc am: e02dcaa9d1
am: 4fae9dd7c8

Change-Id: I5ba3b458bce9ef89a998bbc4f9b6b24fe4f65c82
2019-11-27 02:18:17 -08: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
TreeHugger Robot
c688e6ad8e Merge "Hook up notification history to NMS." 2019-11-27 09:44:12 +00:00
TreeHugger Robot
10fb57adeb Merge "Convert EventLogTags.AM* events log points to EventLogTags.WM" 2019-11-27 01:21:40 +00:00
Makoto Onuki
13cace2cbd Merge "Expose APIs to register service manager wrappers." 2019-11-26 22:10:33 +00:00
TreeHugger Robot
7761845259 Merge "Adding temp whitelist methods to PowerWhitelistManager interface." 2019-11-26 20:56:24 +00:00
Makoto Onuki
0ceb3e0394 Expose APIs to register service manager wrappers.
Bug: 143788029
Test: boot & tree hugger
Change-Id: I6a1ce9d9603ce79d2ddb14f2a946fb51be25a9e4
2019-11-26 12:11:55 -08:00
Julia Reynolds
b317ff7fa2 Hook up notification history to NMS.
All of the lifecycle events for the history are in place now with
the exception of triggering a write when the power button is
long pressed

The new tests interacted with DeviceConfig in such a way that
callbacks were being received after tests were completed, so I
also had to add an unregistration step for the DeviceConfig
listener.

Test: atest
Bug: 137396965
Change-Id: I9ad1197105a5c2434444965a1649485e36e4b692
2019-11-26 14:31:13 -05:00
Kweku Adams
835283f000 Adding temp whitelist methods to PowerWhitelistManager interface.
Migrating temp whitelist APIs to PowerWhitelistManager to allow
telephony to add apps to the temp whitelist.

Bug: 138239060
Bug: 140141678
Bug: 141155196
Bug: 142420609
Bug: 144864180
Test: atest PowerWhitelistTest
Change-Id: Iefd6ecf89aad46de042ef3a1ec0c20d6c35da5a6
2019-11-26 11:07:29 -08:00
Eran Messeri
18d21312ca Rename PO Device IDs access -> Org Owned device
Repurpose the "Profile Owner was granted access to device identifiers"
to "Profile Owner of an Organization-owned device".

The old method now throws an exception, as it should not be called by
anything other than ManagedProvisioning (which is changed in this topic).

The new method now provides the functionality the old method provided,
and there's a new permission associated with it.

No functionality has been added or removed in this CL beyond that.

Bug: 138709470
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDeviceIdAttestationForProfileOwner
Change-Id: I9914e8220213898d0c6b3499af8897e3a6f23819
2019-11-26 14:57:30 +00:00
Eran Messeri
804d53c6f2 Merge "Wiping and relinquishing org-owned devices" 2019-11-26 14:50:38 +00:00
Eran Messeri
b8c46e0862 Wiping and relinquishing org-owned devices
Add the following functionality, on devices with a managed profile
created during provisionining (and as such, considered
organization-owned):

* Let the Profile Owner relinquish a device by calling
  DevicePolicyManager.wipeData. The device then transitions
  to a fully-personal device.
* Let the Profile Owner wipe the entire device by calling
  wipeData on the parent profile DevicePolicyManager instance.

Bug: 138709470
Test: Manual with TestDPC.
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDeviceIdAttestationForProfileOwner
Change-Id: If3cc9741079592cb07bc1ef5ccca8fb2b57a52e9
2019-11-26 09:33:03 +00:00
Jeff Chang
d136e77a5a Convert EventLogTags.AM* events log points to EventLogTags.WM
Since all activity management is now under the WM package we should also
convert the event log points for activities from EventLogTags.AM* to
EventLogTags.WM*.

Bug: 143461660
Test: Build and run, check event logs.
Change-Id: I62034ee353f65ef95b069e1f36db214ccb3c6d85
2019-11-26 15:18:14 +08: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
Charles Munger
b773ec723d Merge "Deprecate ListActivity and ExpandableListActivity" am: 0600b03d46 am: 87119ab3e2
am: e28f085137

Change-Id: If95dea203b5563252785802ba19df8288a162589
2019-11-25 07:29:17 -08:00
Sergej Salnikov
f2c2a1b595 Merge "Delete SearchManager.launchAssistService and convert SearchManager.launchAssist into @SystemApi method that handles both phone and TV devices." 2019-11-25 12:08:08 +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
TreeHugger Robot
abeb293252 Merge "Unlink perission from app-op for package usage stats" 2019-11-22 18:04:24 +00:00
David Su
3a9a1fb8f9 Merge changes from topic "wifi-manager-constructors"
* changes:
  Removed references to Manager AIDL from constructors
  Migrate WifiCommand to WifiShellCommand
2019-11-22 18:00:23 +00:00
cncn
f4878a0094 Merge "Make Notification.Builder.SetFlag public" am: c8bd4aecb3 am: dca2d45630
am: 689403c3d5

Change-Id: I8e8d117020327593833536ae7ee43e5b94899c9e
2019-11-21 19:02:49 -08: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
3674ae2f7b Merge "Use static filter for inflater of RemoteViews" 2019-11-22 01:02:28 +00: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
Philip P. Moltmann
a832dc4bb9 Unlink perission from app-op for package usage stats
... as code expects incomplete behavior

Fixes: 141032267
Test: atest RuntimePermissionProperties
Change-Id: I49f0e0b4f3dd1bcb316a0180bb1cdad06dc8aa8c
2019-11-21 15:02:54 -08:00
cncn
9d0fd9c9d6 Make Notification.Builder.SetFlag public
Bug: 144846447
Test: Build Successfully
Change-Id: If25bede41eec1f7e7ca3ae8fc669df1964d7da05
2019-11-21 22:55:13 +00:00
David Su
409f371488 Removed references to Manager AIDL from constructors
Converted constructors of Wifi Managers to not reference
their AIDL interfaces since they are @hide and cannot be
referenced by the platform.

Bug: 140299412
Test: atest FrameworksWifiApiTests
Change-Id: If43ce6916ddee5357cdcc8cd27d5620a67d21165
2019-11-21 14:46:43 -08:00
Terry Wang
ecc0d1b2c1 Add a new system service for app search project
Bug: 142567528
Test: manual
Change-Id: Iefb426383f94ec89c896065c798b22cfb2977bf3
2019-11-21 14:15:22 -08:00
Jay Aliomer
8fd7fb99cf Dark theme twilight mode backend and tile
am: 381e3300e8

Change-Id: I0d5b96795d5ad818a9b7a21758721e35059d18ed
2019-11-21 12:23:42 -08:00
Jayachandran Chinnakkannu
5d9097c4f1 Merge "Remove access to the telephony manager constructors from SystemRegisteryService" 2019-11-21 19:09:49 +00:00
Bernardo Rufino
32e02950c5 Merge "Add TEST_MAPPINGs for toasts" 2019-11-21 18:07:31 +00: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
Jayachandran C
58fd3eb31a Remove access to the telephony manager constructors from SystemRegisteryService
Introduce a new system API called TelephonyFrameworkInitializer
and invoke from SystemRegisteryService for registering the services

Bug: 144892231
Test: Telephony Sanity
      atest frameworks/opt/telephony/tests/telephonytests/

Change-Id: Ic1a2f66948c53f6426be733563fb050b67dcb320
2019-11-21 17:41:50 +00:00