Commit Graph

17659 Commits

Author SHA1 Message Date
TreeHugger Robot
4c3c19fbc1 Merge "Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag." 2017-07-01 02:06:02 +00:00
Wale Ogunwale
01ad4345f9 Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag.
When a window with this flag is visible, then any other window added
by an application process that requires OP_SYSTEM_ALERT_WINDOW
permission or that are of TYPE_TOAST will be hidden.

Bug: 62196835
Test: go/wm-smoke
Test: Added the new flag to the RecentsActivity onCreate, launched FB
chat heads and observed the head head become invisible when Recents is
visible and the chat head become visible when Recents is no longer
visible.

Change-Id: I1a3e3c5b1696a5f5b95eac187acb5a03863b4a0b
2017-06-30 14:27:38 -07:00
Fyodor Kupolov
db0da015de Merge "Support for lookaside configuration params" 2017-06-30 16:47:35 +00:00
Albert Chaulk
c8600632b1 Merge "Add getCurrentImeTouchRegion to the WindowManager API" into oc-dr1-dev am: 4bf79089c4
am: 1bfecb614e

Change-Id: I17be0a9b64ae628fedcfa61dbddb4cbcaaa58b79
2017-06-30 03:34:13 +00:00
Chavi Weingarten
a46b76fd50 Merge "Added Activity flags to show on lock screen." 2017-06-29 22:41:05 +00:00
Nate Fischer
a3bcb76fb6 Merge "WebView: add APIs for setSafeBrowsingWhiteList" 2017-06-29 22:35:18 +00:00
chaviw
59b9885bc8 Added Activity flags to show on lock screen.
Added two new flags to the Activity to turn the screen on and
show on the lock screen. These can be used instead of the Window flags
LayouParams.FLAG_TURN_SCREEN_ON and LayoutParams.FLAG_SHOW_WHEN_LOCKED
to prevent the double onStart/onResume lifecycle events.

The flags can be set as an attr for the Activity in the AndroidManifest
using android:showWhenLocked="true" and android:turnScreenOn="true".
They can also be set through methods in the Activity class using
setShowWhenLocked(true) and setTurnScreen(true).

Fixes: 36850100
Test: Created sample application, tests/ShowWhenLockedApp, that set the
      flags in the manifest and code. Tested multiple scenarios to
      launch the Activity with the flags set and unset.
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTransitionTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.ActivityManagerActivityVisibilityTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTests

Change-Id: I44f0e313df4531d49c7ac56108b6bf80e41fefc1
2017-06-29 13:33:43 -07:00
Tomasz Wasilczyk
284bd0180a Merge "Add AM/FM check for BandDescriptor." 2017-06-29 18:02:37 +00:00
Albert Chaulk
2ccb0b72e3 Add getCurrentImeTouchRegion to the WindowManager API
This is a followup to ag/2370980/ to expose the API more
externally as a WindowManager API. This allows application
access without needing to reflect on IWindowManager.Stub.

We require this to get the current IME touch region to
display it properly in VR contexts.

Test: Manual
Bug: 62194867

Change-Id: Ibbf336e1e473b65d4c76a1492da187d50cfda424
2017-06-29 13:44:19 -04:00
John Reck
4dbcd23b5a Merge "Add SharedMemory API" 2017-06-29 17:35:17 +00:00
TreeHugger Robot
ee39d54a8d Merge "Initial implementation of the new Save APIs." 2017-06-29 02:43:36 +00:00
John Reck
dea6a02761 Add SharedMemory API
SharedMemory is parcelable and AIDL friendly
and exposes cool things like dropping write permissions
that are useful for shared memory to have.

Also exposes getFileDescriptor() on MemoryFile
since that was necessary to use MemoryFile
with IPC previously and there are a sizeable
number of reflections that access it, so just make
it public.

Test: SharedMemory CTS tests pass

Change-Id: I71a322abf2eb55267d7299a8e41f847339af8b08
2017-06-28 16:49:12 -07:00
Felipe Leme
979013d027 Initial implementation of the new Save APIs.
Test: manual verification with sample app (CTS tests coming later)

Bug: 62534917

Change-Id: I085a9c933bb5e8316d673976e059e13abd7098e5
2017-06-28 15:13:21 -07:00
Tomasz Wasilczyk
2880b9a15b Add AM/FM check for BandDescriptor.
Bug: b/36864090
Test: it builds
Change-Id: I846eb73fb284ebb8137557c0bdf68fab852145d7
2017-06-28 14:31:03 -07:00
Fyodor Kupolov
d3b0c7e7e2 Support for lookaside configuration params
Modified SQLiteDatabase to allow passing lookaside configuration to its
static initializer. Encapsulated config in OpenParams and added an
overloaded version of openDatabase with the new parameter.

Configuration is changed in SQLiteConnection::nativeOpen, immediately
after opening the database since lookaside memory configuration can only
be changed when no connection is using it.

Added SQLiteOpenHelper.setLookasideConfig method that is called from
the constructor of the subclass.

Test: bit FrameworksCoreTests:android.database.DatabaseGeneralTest
Test: bit FrameworksCoreTests:android.database.SQLiteOpenHelperTest
Bug: 38499845
Change-Id: Ifb761229b43c89c090939030fc25b8c480b9b9e2
2017-06-28 14:07:53 -07:00
Nate Fischer
bf158ec3d8 WebView: add APIs for setSafeBrowsingWhiteList
This adds the APIs for the static method
WebView#setSafeBrowsingWhiteList().

BUG: 63084528
Test: N/A
Change-Id: I6eff32d9f8356e8c1a2c631782e07d52ba9b6ad5
2017-06-27 23:25:15 -07:00
TreeHugger Robot
c1323664d4 Merge "Make the android.R.string.autofill public." 2017-06-28 01:55:57 +00:00
Jeff Sharkey
f23a5e104b Allocate well-known tag for app store updates.
This way an app store can shift blame for update-related network
traffic onto the app that is being updated.

Using a well-known tag makes it easy for developers to identify
that they didn't explicitly request the traffic at runtime, similar
to how backup/restore traffic is handled.

Bug: 38282350
Test: builds, boots
Change-Id: I003dd7c9615d4ab318250f1e44fa5d195ac94d23
2017-06-26 19:50:48 -06:00
Jeff Sharkey
ddc3bfddd4 Add @TestApi for StrictMode tests.
Bug: 62037127
Test: builds, boots
Change-Id: Ibb0f450400bc498c2b4d4fe3399c7e4d573eef60
2017-06-26 19:39:20 -06:00
Felipe Leme
555bcac6b2 Make the android.R.string.autofill public.
Fixes: 62444792
Test: manual verification with app that uses it the string
Test: CtsAutoFillServiceTestCases pass

Change-Id: Ic859a7a80ab25f6e240a308715b7c50708c497f3
2017-06-26 12:55:17 -07:00
TreeHugger Robot
1c0e40d26c Merge "Add API to allow apps more control over instantiation" 2017-06-22 16:57:33 +00:00
Felipe Leme
49a38c6f1c Added BaseAdapter.setAutofillOptions()
Also changed ArrayAdapter to use it, when set.

Fixes: 37518906
Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases  -t android.widget.cts.BaseAdapterTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsWidgetTestCases  -t android.widget.cts.ArrayAdapterTest
Test: m update-api

Change-Id: I5e883555b0fb9d084b57b9239595bf0632fc41af
2017-06-21 13:36:56 -06:00
Jeff Sharkey
257529dcae Fix searching for overridden methods.
If the superclass is an abstract class, we want to search it for
possibly overridden methods; we don't want to search ourselves.

This bug resulted in (incorrectly) thinking that overridden "default"
methods from interfaces were standalone methods on the class.  (The
expected behavior has always been to omit any overridden methods from
the public API surface area to avoid redundant noise.)

Test: make update-api
Bug: 62675475
Change-Id: Ic92544908692bd9af329d302165e18c7b4738e43
2017-06-21 11:08:45 -06:00
TreeHugger Robot
02d082dd0b Merge "Add Window.isWideColorGamut()" 2017-06-21 01:02:56 +00:00
Romain Guy
adae59b020 Add Window.isWideColorGamut()
This API returns true when all the following conditions are met:
- The app has requested the window to be in wide color gamut mode
- The display has a wide color gamut
- The device supports wide color gamut rendering

Bug: 62832666
Test: CtsColorModeTest
Change-Id: Idae1527b88959689bb637b6dd4db756d09fabe77
2017-06-20 16:01:57 -07:00
Nate Fischer
5c937a4b6a Merge "Add WebViewClient#onSafeBrowsingHit() API" 2017-06-20 03:01:39 +00:00
Julia Reynolds
b852e56668 Migrate managed services from setting to policy xml
Change-Id: Ie20f91dbdd0ba6b57b5909cbf0152a32754fe02d
Fixes: 62263757
Test: runtest systemui-notification, cts AudioManagerTest,
cts-verifier DND tests, verify bug reports after toggling
access for various types of managed services, verified
default approved services aren't renabled on boot; verified that
they are reenabled after a device reset, verified that
settings are migrated after a restore from OC backup.
2017-06-19 17:43:30 +00:00
Nate Fischer
0c3043622e Add WebViewClient#onSafeBrowsingHit() API
This adds the WebViewClient#onSafeBrowsingHit() API and its default
implementation.

This also adds the relevant constants. This includes
SAFE_BROWSING_THREAT_UNKNOWN, in case we expose new threat types in the
future.

Bug: 62723291
Test: N/A
Change-Id: I0b424a952466b23db4cf296573680a0a6c61b981
2017-06-16 16:53:44 -07:00
Lucas Dupin
2276eede81 Merge "Merge "WallpaperColors refactor" into oc-dr1-dev am: 04d2ec59e8" into oc-dr1-dev-plus-aosp
am: fcee629aa6

Change-Id: Idf98ceb1465c1e83de1cc5c0aa46077289ed2f6d
2017-06-16 20:33:29 +00:00
Lucas Dupin
84b89d9d59 WallpaperColors refactor
Hiding color extraction into WallpaperColors.
This enables us to create WallpaperColors from a a Bitmap
or Drawable.

Fixes: 62197187
Fixes: 62490115
Test: runtest --path cts/tests/app/src/android/app/cts/WallpaperColorsTest.java
Change-Id: I614cfa205e02b551a141642eac6de21251c3bff6
2017-06-16 09:27:43 -07:00
Lucas Dupin
84a333c7eb Merge "Hide WallpaperService.Engine colors API." into oc-dr1-dev am: 1133cf2b8a
am: edc2917b69

Change-Id: Id25fbbca90dbac2b4149c5aaa6ca3d3ee4c8b537
2017-06-16 04:58:21 +00:00
Lucas Dupin
2b0dab0da7 Hide WallpaperService.Engine colors API.
All apps that need it are bundled in DR.
We need to unhide it for MR1.

Test: make
Bug: 62490115
Change-Id: I58d0a020ec7b1af8cb2659d6957de4bf4d4fa596
2017-06-14 18:30:51 -07:00
TreeHugger Robot
2d84bdcaea Merge "Expose USER_SETUP_COMPLETE as Test API." 2017-06-14 01:37:37 +00:00
Jeff Sharkey
52feccbf41 Merge "Revert "Hide APIs not intended to ship in DR."" 2017-06-13 17:40:58 +00:00
Adam Vartanian
57a8d53130 Merge "DO NOT MERGE Remove createSocket(Socket, InputStream, boolean) from APIs." into oc-dr1-dev am: 87587fbda2
am: 0cbfb82f38

Change-Id: I7c7876d9fe871178be0918f0c8c48218527a18e0
2017-06-13 08:27:31 +00:00
Adam Vartanian
87587fbda2 Merge "DO NOT MERGE Remove createSocket(Socket, InputStream, boolean) from APIs." into oc-dr1-dev 2017-06-13 08:13:34 +00:00
Jeff Sharkey
9039636535 Revert "Hide APIs not intended to ship in DR."
This reverts commit 0c28d43fe1.
2017-06-12 16:26:53 -06:00
Jeff Sharkey
83559ba8d5 Merge "Hide APIs not intended to ship in DR." into oc-dr1-dev am: 3d4c62de10
am: dd96cfc4ef

Change-Id: I02eab4f04913de48c182176da6559fb14559f459
2017-06-12 22:09:16 +00:00
TreeHugger Robot
9af361bb69 Merge "Deprecate screen brightness boost detection." 2017-06-12 21:34:27 +00:00
Felipe Leme
9923012638 Expose USER_SETUP_COMPLETE as Test API.
Test: m -j90 update-api
Fixes: 62538627

Change-Id: I247d27341ce06b29f257d00a9058be4c0f662db0
2017-06-12 14:33:03 -07:00
TreeHugger Robot
70919cc55f Merge "TIF: add TvContract.isRecordedProgramUri() method" 2017-06-12 19:16:50 +00:00
Jeff Sharkey
0c28d43fe1 Hide APIs not intended to ship in DR.
This CL will be reverted once it merges into the next release branch
to re-introduce the proposed APIs.

This CL also makes the following code changes to preserve API
compatibility:

-- It keeps the recently added RemoteViews.clone() synchronized logic
intact, but moves it inside the method to avoid changing the API
signature.

-- It reverts the RttCall.read() behavior to the oc-dev logic, since
we can't throw IOException until we get an API level bump.  (The
original logic returned null instead of throwing.)

Test: builds, boots
Bug: 62427252, 62431886, 62427329
Bug: 62468911, 62431162, 62428935, 62429096
Bug: 37290820, 37359238, 36886243
Bug: 30143923, 35761231, 62192626, 29829689
Change-Id: I83d723f598cb0ee1fe198e65debd86ef7fd0420c
2017-06-12 10:26:01 -06:00
Roozbeh Pournader
aa8380fa22 Merge "Internationalize InputFilter.AllCaps" 2017-06-09 22:23:52 +00:00
Julius D'souza
b22da80734 Deprecate screen brightness boost detection.
Deprecated:
PowerManager#isScreenBrightnessBoosted
ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED

Bug: 62348163
Test: isScreenBrightnessBoosted should return false.
Change-Id: Ia580daeffb249110a6adf1e46052966a718226cb
2017-06-09 12:24:38 -07:00
Adam Vartanian
3120b33204 DO NOT MERGE Remove createSocket(Socket, InputStream, boolean) from APIs.
This method wasn't intended to be new API for DR1.

Bug: 62428936
Test: make
Change-Id: I5c0d523d0f61ab544cd987fa92daefcc79fc0732
2017-06-09 12:25:36 +00:00
Roozbeh Pournader
205a993928 Internationalize InputFilter.AllCaps
The new code support non-BMP characters, as well as locale-specific
uppercasing and fine-grained span copying.

The modern capitalization code in AllCapsTransformationMethod is
moved to TextUtils now, so InputFilter.AllCaps can share it.

Fixes: 37222101
Test: New CTS and core tests are added.
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: I021ff2a97a60396fb1b6e4940d91d3cd6ccb6196
2017-06-08 15:38:28 -07:00
Jason Monk
6945710e12 Add API to allow apps more control over instantiation
Let them control construction of standard manifest elements (like
activities) through Application. This will allow for things like
dependency injection and class loader magic.

Test: manual
Change-Id: Iaa2215b225c3b97f4e9ac809dfe499f98c7ad5f1
2017-06-08 16:48:59 -04:00
Svetoslav Ganov
62031b8937 Merge "Ensure only test print services enabled - framework" into oc-dev
am: 053fb9120e

Change-Id: I5f07488ba286cb3d01c75d96e1003edba845daf8
2017-06-08 16:01:54 +00:00
Svetoslav Ganov
2dcedc1276 Ensure only test print services enabled - framework
Test: cts-tradefed run cts-dev -m CtsPrintTestCas

bug:62232727

Change-Id: I1050272586d1c03dc1b1dfdb8b10e258912a249b
2017-06-07 18:50:05 -07:00
TreeHugger Robot
d131f19c50 Merge "Add new haptic feedback constant for virtual key release." 2017-06-06 21:35:51 +00:00