Commit Graph

75290 Commits

Author SHA1 Message Date
Petar Šegina
5ab7bb242e Draw SmartSelectSprite in TextView
Instead of the SmartSelectSprite drawing its contents into a View's
ViewOverlay, the SmartSelectSprite can now be drawn on any Canvas. In
order to perform the smart select animation, it is now the TextView that
performs the actual drawing.

Since the TextView can adjust the canvas for its padding and offset,
there is no more need to manually transform the selection rectangles, so
that part can be removed.

Test: manual - verify smart select animation still works
Change-Id: Ibaccf59fd44d5701e6f37d6b4fa97f2b05fd77cc
2017-09-06 14:26:28 +01:00
Rubin Xu
d375476bda Merge "Fix resetPasswordWithToken before user unlock" into oc-mr1-dev am: 2e21fba2b5
am: c17f1d412b

Change-Id: If147939b9c74803ca2c6177e770736b0e82fdc96
2017-09-06 12:27:42 +00:00
Rubin Xu
c17f1d412b Merge "Fix resetPasswordWithToken before user unlock" into oc-mr1-dev
am: 2e21fba2b5

Change-Id: I83688cd83cf18f37b3507ebe69d29dbc2669178b
2017-09-06 12:19:51 +00:00
Rubin Xu
2e21fba2b5 Merge "Fix resetPasswordWithToken before user unlock" into oc-mr1-dev 2017-09-06 12:12:36 +00:00
Jack He
2241bf20bc Merge "Bluetooth: Thread-safe binder invocation" am: 94f1fd0da2 am: a672ffa42f am: 9a68d78b44
am: c86e2f98a4

Change-Id: I9c7500e80b1a97203348516dcdc4860549209101
2017-09-06 01:34:32 +00:00
Vinay Kalia
86fb7a3c37 Merge "Update documentation for startScan" am: 7d2219d170 am: 04d061e891 am: 2ace7d5b63
am: e4eddfd682

Change-Id: I293184cb15b64d41208726393d3468ec7572a68f
2017-09-06 01:14:55 +00:00
Jack He
c86e2f98a4 Merge "Bluetooth: Thread-safe binder invocation" am: 94f1fd0da2 am: a672ffa42f
am: 9a68d78b44

Change-Id: I08808aaec456fbb53126fcf0130c02afac82f29b
2017-09-06 00:53:03 +00:00
Jack He
9a68d78b44 Merge "Bluetooth: Thread-safe binder invocation" am: 94f1fd0da2
am: a672ffa42f

Change-Id: If02485ca3e3c16da3bc58532604576d577684528
2017-09-06 00:39:55 +00:00
Vinay Kalia
e4eddfd682 Merge "Update documentation for startScan" am: 7d2219d170 am: 04d061e891
am: 2ace7d5b63

Change-Id: Ia7349df7a8e06b3d91bcff2b18b50fdbe1eef66a
2017-09-06 00:34:20 +00:00
Jack He
a672ffa42f Merge "Bluetooth: Thread-safe binder invocation"
am: 94f1fd0da2

Change-Id: I8f9c76996f02c70b8d2ea21d4eb567eaa9da246a
2017-09-06 00:30:09 +00:00
Vinay Kalia
2ace7d5b63 Merge "Update documentation for startScan" am: 7d2219d170
am: 04d061e891

Change-Id: Ib88766933fef830d2613b9b92bc744aed75c6e9f
2017-09-06 00:21:37 +00:00
Jack He
16eeac356c Bluetooth: Thread-safe binder invocation
* Binder object may become null between null check and actual invocation
  if using a instance private variable assignable by service connection
  callbacks
* The solution to this problem without locking is to assign existing
  binder variable to a local final variable before the null check
* Any further invocation to a disconnected binder object will result in
  RemoteException that is caught by the try-catch block
* Read and write to volatile variable is always atomic and hence thread-safe
* Removed unnecessary synchronization in BluetoothAdapter constructor
* Private mConnection objects should be final
* Simplfied several return statements where booleans can be returned
  directly
* Removed unnecessary catches for NPE since there won't be any

Bug: 64724692
Test: make, pair and use devices, no functional change
Change-Id: Ifc9d6337c0d451a01484b61243230725d5314f8e
2017-09-06 00:09:47 +00:00
Vinay Kalia
04d061e891 Merge "Update documentation for startScan"
am: 7d2219d170

Change-Id: I5ea7a5a9b0a69168a1715986e4850276299af78a
2017-09-06 00:08:24 +00:00
Vinay Kalia
875d27e45e Update documentation for startScan
With change c4a1e1, unfiltered BLE scans are stopped on screen off
and resumed when screen is turned back on. This is done to save power.
This change updates the documentation accordingly.

BUG: 62264269
Test: Documentation update.
Change-Id: I2d8e9f9f122f978c4d4f59d4139cb51cd4e4a123
2017-09-05 11:52:35 -07:00
Todd Kennedy
bdb4bc4fc0 Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev am: 8bb58a145c
am: ad64df2bac

Change-Id: I7fab82efe230dea393fa4b12c9c7ea71c44243fe
2017-09-05 17:00:43 +00:00
Abodunrinwa Toki
7c5df649d7 Merge "Delete old TEXT_SELECTION_MENU_ITEM_ASSIST logs." into oc-mr1-dev am: f28b8a8de3
am: 48063322b4

Change-Id: I23f8204732f1f166aacf10d5d147bd3f21025c6b
2017-09-05 16:51:19 +00:00
Todd Kennedy
ad64df2bac Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev
am: 8bb58a145c

Change-Id: Ic64dde3af1d7edcc75513b76c86ce8d8b8f083de
2017-09-05 16:43:19 +00:00
Abodunrinwa Toki
48063322b4 Merge "Delete old TEXT_SELECTION_MENU_ITEM_ASSIST logs." into oc-mr1-dev
am: f28b8a8de3

Change-Id: I9d9f590d9c1e133ca895c830525f118adccfe92a
2017-09-05 16:35:07 +00:00
TreeHugger Robot
8bb58a145c Merge "Add internal implementation for notifyPackageUse" into oc-mr1-dev 2017-09-05 16:28:13 +00:00
Rubin Xu
7cf4509c31 Fix resetPasswordWithToken before user unlock
1. Fix system server crash when resetPasswordWithToken is called before use
   unlock, due to DPMS enforces user is unlocked when calculating password
   sufficiency.
2. Propogate new password metric from LockSettingsService to DPMS after a
   password reset with token, and fix a bug where stale quality was used.

Bug: 64923343
Bug: 64928518
Bug: 65286643
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.ManagedProfileTest#testResetPasswordWithTokenBeforeUnlock
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: runtest frameworks-services -p com.android.server.locksettings
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceAdminHostSideTestApi24#testRunDeviceOwnerPasswordTest
Test: runtest frameworks-core -c android.app.admin.PasswordMetricsTest
Test: runtest frameworks-services -c com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ibb3736547b3b36da4a8a67af711e08a38427aa56
2017-09-05 14:49:00 +01:00
Abodunrinwa Toki
fadd4288df Delete old TEXT_SELECTION_MENU_ITEM_ASSIST logs.
This field is now being used for new smart selection logging.
See: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest
Change-Id: If1ce8ca038b089500cd7adb9a146330abe909407
2017-09-05 14:19:52 +01:00
Abodunrinwa Toki
d0470d7ebd Merge "TextView text selection interaction logging." into oc-mr1-dev
am: 563a5637d7

Change-Id: Ie9a211b657d9fa370db699d9c11ad553ab5f22d6
2017-09-05 10:50:14 +00:00
Abodunrinwa Toki
5ddd3ed855 TextView text selection interaction logging.
TODO: Log typing over selection

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest

Merged-In: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
Change-Id: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
2017-09-04 20:47:40 +01:00
Abodunrinwa Toki
57ec6ea1bb TextView text selection interaction logging.
TODO: Log typing over selection

Bug: 64914512
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit
CtsAccessibilityServiceTestCases:android.accessibilityservice.cts.AccessibilityTextTraversalTest

Change-Id: Icc9d5b542140bdb01b2ad4211048bd83eae2ce83
2017-09-04 20:40:07 +01:00
Hugo Benichi
f59de479ba Merge "Network Service Discovery test: properly release resources" am: c9d24d203d am: 80e0daa870 am: f467db29f9
am: 84b253b0c5

Change-Id: Icd9033ce7e32d5bddc9d0eba38b3b381fe424004
2017-09-04 12:59:49 +00:00
Hugo Benichi
84b253b0c5 Merge "Network Service Discovery test: properly release resources" am: c9d24d203d am: 80e0daa870
am: f467db29f9

Change-Id: Id9be284a16112f999d752751a7972fd735573cda
2017-09-04 12:42:56 +00:00
Hugo Benichi
f467db29f9 Merge "Network Service Discovery test: properly release resources" am: c9d24d203d
am: 80e0daa870

Change-Id: I03c0cff6dfdcd8dfc94de8399161ceab0f7a901a
2017-09-04 12:25:10 +00:00
Hugo Benichi
80e0daa870 Merge "Network Service Discovery test: properly release resources"
am: c9d24d203d

Change-Id: If34b3770a5c0fef65d124201e0ca1374cc6b1eca
2017-09-04 12:14:11 +00:00
Hugo Benichi
e062ae07f9 Network Service Discovery test: properly release resources
Bug: 32561414
Bug: 62918393
Bug: 62044295
Test: runtest frameworks-net
Change-Id: If23993b5e391947ecbdc01677f0a643144794b2b
2017-09-02 14:54:29 +09:00
TreeHugger Robot
e82e1fad14 Merge "Adding user forced app standby to alarms" 2017-09-02 01:15:15 +00:00
Andrii Kulian
555aad412b Merge "Fix NPE in ActivityView on surface destruction" into oc-mr1-dev am: 9352329ee1
am: e68942db8e

Change-Id: I1133759dace1e365516eed5675bea445bdb531e4
2017-09-02 00:48:04 +00:00
Andrii Kulian
e68942db8e Merge "Fix NPE in ActivityView on surface destruction" into oc-mr1-dev
am: 9352329ee1

Change-Id: I51c19df8f9ad2832102a126778fbc5927d61f094
2017-09-02 00:31:22 +00:00
TreeHugger Robot
9352329ee1 Merge "Fix NPE in ActivityView on surface destruction" into oc-mr1-dev 2017-09-02 00:16:48 +00:00
Suprabh Shukla
db6bf66ee3 Adding user forced app standby to alarms
The app op RUN_ANY_IN_BACKGROUND can be set to ignored to indicate that
any alarms for the receiving app will be delayed until the app op is set
to allowed or the app comes into the foreground. Power whitelisted apps
are exempted.

Test: cts-tradefed run cts-dev -m AlarmManagerTestCases

Fixes: 64446607
Change-Id: Ic48b52383ad5ccd726c62769cdca25202d1e3814
2017-09-01 15:45:43 -07:00
Andrii Kulian
d93da5c6e2 Fix NPE in ActivityView on surface destruction
Instance variable mSurface in ActivityView was not updated after surface
destroy/create cycle, which lead to NPE when we were trying to release
it again after second destroy callback.

Bug: 63338670
Test: Create app with activityView, cause activity restart.
Change-Id: I96447ebe77d175050565641ba94b748d2b633d99
2017-09-01 21:31:18 +00:00
Fyodor Kupolov
a816016de4 Merge "Do not close idle connections by default" into oc-mr1-dev am: 6f8afdc501
am: eb952ab3d0

Change-Id: I5b4583fc8d663afe87cdc79b32536e85a29756cd
2017-09-01 18:01:07 +00:00
Fyodor Kupolov
eb952ab3d0 Merge "Do not close idle connections by default" into oc-mr1-dev
am: 6f8afdc501

Change-Id: Icda0c6495682077725849f96855421f395cd8ff5
2017-09-01 17:45:27 +00:00
Fyodor Kupolov
6f8afdc501 Merge "Do not close idle connections by default" into oc-mr1-dev 2017-09-01 17:34:41 +00:00
TreeHugger Robot
9eb7a69e78 Merge "Removed deprecated BIND_AUTOFILL permission." 2017-09-01 15:11:56 +00:00
Benjamin Franz
64affcbf48 Resolve stopship to add P API level
Bug: 64383815
Test: make docs
Change-Id: I317d976f4a360e9c52d4e5cc7dcc42b7c197b217
2017-09-01 13:53:05 +01:00
Julia Reynolds
8c6fe753dd Merge "Add more functionality to channel groups" 2017-09-01 12:49:49 +00:00
TreeHugger Robot
2117dfc13d Merge "Improve and simplify final polygon drawing" 2017-09-01 12:46:29 +00:00
TreeHugger Robot
4456a99918 Merge "Update DPM.setKeyguardDisabled to also dismiss the keyguard" 2017-09-01 10:59:45 +00:00
Petar Šegina
aee97ac902 Improve and simplify final polygon drawing
The final step of the smart select animation, drawing the outline of all
the rectangles, was not working properly in cases where the rectangles
would touch or intersect, which we cannot guarantee that they won't.

Instead of the previous implementation, we now rely on Path to create
the outline of the rectangles, making much of the code simpler.

Now the polygon generation should work in the general case, which is one
of the prerequisites in getting the smart select animation to work
properly in multiline scenarios.

Test: manual - test the smart select animation with various rectangle
sets
        (100, 100, 500, 500), (300, 300, 700, 700)
        (100, 100, 500, 500), (500, 100, 900, 500)
        (100, 100, 500, 500), (500, 300, 900, 700)
        (100, 100, 500, 500), (300, 300, 700, 500), (200, 500, 400, 700)

Change-Id: I51dd72e18c5efe36df734aa62ab47d57a5946399
2017-09-01 11:57:37 +01:00
TreeHugger Robot
6307647e24 Merge "Create a flag to allow starting managed user in background" 2017-09-01 09:59:49 +00:00
Benjamin Franz
32a3bf3521 Update DPM.setKeyguardDisabled to also dismiss the keyguard
Currently if the keyguard is shown, setKeyguardDisabled does not
dismiss it but disables it for the future. This change also dismisses
the keyguard in this situation.

Test: manual
Bug: 64383815
Change-Id: Idb89f363510a18c741d335d96d11c5492c0eaee3
2017-09-01 09:19:39 +01:00
TreeHugger Robot
bc0134c1f5 Merge "Introducing activityType window configuration." 2017-09-01 02:16:21 +00:00
TreeHugger Robot
b41b74bfa1 Merge "AOSP format StrictMode" 2017-09-01 01:58:38 +00:00
TreeHugger Robot
d74357d29c Merge "MagnificationGestureHandler refactoring and unit test" 2017-09-01 01:58:16 +00:00
Lei Yu
b868891671 Merge "Hook up AOD knobs to Settings.Global" into oc-mr1-dev am: 67594c6f54
am: 04e7d1fa20

Change-Id: I9b4a60017a5e2273e572d90929d269e31352b5a0
2017-09-01 01:24:17 +00:00