* changes:
Clean <plurals> in DateTimeView
Clean <plurals> in CertificateMonitor
Clean <plurals> in FillUi
Clean <plurals> in BugreportProgressService
Clean <plurals> in keyguard
Clean <plurals> in ChooserActivity
Clear <plurals> in TextUtils
Clean <plurals> in FindActionModeCallback
Clean <plurals> in ZenModeConfig
Add util class for plurals
Since restarting a process must be done from the system server side,
we accomplish this by passing a IBinder through to the GameSession
allowing the GameSession to make IPCs to its hosting
GameServiceProviderInstanceImpl. As an additional layer of security,
the implementation takes a taskId and only restarts the given
game if the taskId matches an active game session.
Test: atest FrameworksMockingServicesTests and manual e2e testing
Bug: 210127167
Bug: 202414447
Bug: 202417255
CTS-Coverage-Bug: 206128693
Change-Id: I944da060323ac1779cd2c61d1e411e9868caed91
The frame number at the server side is not used anymore since BLAST.
Bug: 161810301
Test: presubmit
Change-Id: I01c6fb0750799aa94766f2582ce6ac031c9426cf
This is a step to move the layout logic to the client side. We won't
obtain the surface size from the server then.
This CL also moves the logic about adjusting the LayoutParams of
wallpaper to the client side.
Bug: 161810301
Test: presubmit
Change-Id: I3a81e174035c67a285cab449c0701ee2fe6f6a24
Client apps need the ACCESS_AMBIENT_CONTEXT_EVENT permission to use the service. The permission protection level is internal|role.
API overview: http://go/ambient-framework-api
PRD: http://go/ambient-attribution-prd
Design doc: http://go/ambient-service-api
Test: CTS test
Bug: 192476579
Change-Id: I9daede83af34f215c278cb0530238faba1be5c70
Ignore-AOSP-First: to prevent new feature leak.
This is a step to move the layout logic to the client side. We won't
invoke IWindowSession#relayout then.
Bug: 161810301
Test: atest WmTests
Change-Id: Ib5ac048a573907af0a81f3e228575d9458862cfd
Introduce GameSession#onGameTaskFocusChanged method that is called to
inform GameSession implementations abouts when their game task goes into
our out of focus.
Also introduce a new LifecycleState to the abstract GameSession class
to ensure that transitions follow the following rules:
- All GameSessions start in the INITIALIZED state
- All GameSessions will then transition to the CREATED state [onCreate()
is called]. If a GameSession transitions from INITIALIZED directly to
DESTOYED, onCreate() and onDestroy() will both be called.
- A GameSession in the CREATED state may transition to either the
TASK_FOCUSED state [onGameTaskFocusChanged(true) is called] or the
DESTROYED state [onDestroy() is called]. If a game task starts in a
non-focused state and never comes into focus, the GameSession will
never transition to the TASK_FOCUSED or TASK_UNFOCUSED states.
- A GameSession in the TASK_FOCUSED state may only transition
to the TASK_UNFOCUSED state [onGameTaskFocusChanged(false) is called].
If a GameSession transitions from TASK_FOCUSED to DESTROYED, it will
call onGameTaskFocusChanged(false) to complete that part of the
lifecycle before transitioning to the DESTROYED state.
- A GameSession in the TASK_UNFOCUSED state may transition back to the
TASK_FOCUSED state [onGameTaskFocusChanged(false) is called again] or
the DESTROYED state [onDestroy() is called].
In this way, all GameSessions are guaranteed to have
onGameTaskFocusChanged(true) be called if they are ever in focus before
being destroyed (generally as soon as the GameSession is created) and to
have onGameTaskFocusChanged(false) be called before they are destroyed.
GameSessions are also guarnateed to have onCreate() be called before
onDestroy().
Test: Manual e2e testing
Bug: 214104366
Bug: 202414447
Bug: 202417255
CTS-Coverage-Bug: 206128693
Change-Id: Id4e1eec50eb891ffb6df74650c27ea3a27a8b9c3
- Rename TAG to mTag, for it is a private non-static variable
- A few variables can be final
- Unnecessary "final" for private method
- Unnecessary return at the end of method
- Double white spaces
- Misspellings
Test: manual
Change-Id: Id8523a0857e2a8333a2756cdc778b7d468463f40
The screenshot is taken using a new method added to the
WindowManagerService: captureTaskSnapshot. The existing
WindowManagerService methods for getting a TaskSnapshot
are not suitable because they rely on previously cached
snapshots (e.g., taken when the task is put into the background).
To access the WindowManagerService functionality from
the GameSessionService, an IBinder is passed from the
GameServiceProviderInstanceImpl, which is running on the system server
side (and thus can call the new method) to the GameSessionService when
it is created. The GameSessionService then makes this reference
available to each GameSession when the GameSession is created via the
new GameSession#attach method. The GameSession can then use the IBinder
reference to make an IPC back to the GameServiceProviderInstanceImpl
instance which hosts the GameSessionService. This reference is then used
by the GameSession to request a screenshot.
By using the IBinder in this way, only GameSessions which are created
via the system GameService can access the sensitive screenshot
functionality implemented by GameServiceProviderInstanceImpl via the
new captureTaskSnapshot method.
Test: Manual e2e testing
Bug: 210119689
Bug: 202414447
Bug: 202417255
CTS-Coverage-Bug: 206128693
Change-Id: If42dc9a5a5b6068db8670666a371117cf5865f20
This change doesn't change the content of LocalFloatingToolbarPopup,
we just rename the file. This helps to review the follow up selction
toolbar service implementation change easier.
Bug: 190030331
Bug: 205823018
Test: build pass
Change-Id: I0a98fe7f2057fd3a04a408ab1acf1b4090515cb9
This reverts commit 331be9a643.
Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).
Original commit message:
Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
set by multiple applications.
Handle lock screen dimming regardless if it shares the same wallpaper
with the system to apply composite keyguard + additional dimming.
Test: manual testing and unit tests
Bug: 202841384
Change-Id: Iabd665e9a8e377185b123494eac2198a4436b0c6
CTS-Coverage-Bug: 213426781
With this change, the GameServiceProviderInstanceImpl no longer
automatically creates a game session every time a new game task is
started. Instead, the GameServiceProviderInstanceImpl calls the new
GameService#onGameStarted method with details about the game task that
just started.
The GameService can implement onGameStarted with appropriate logic to
determine whether a game session should be created. If the service
determines that a session should be created, then the GameService can
call GameService#createGameSession.
After calling onGameStarted, the GameServiceProviderInstanceImpl will
maintain a GameSessionRecord in the NO_GAME_SESSION_REQUESTED state.
Only games with a record in this state will have a session created in
response to createGameSession being called. When createGameSession
is called for a record in this state, the record will transition to the
GAME_SESSION_REQUESTED state. Once the game session is finally created
and attached to the record, it will switch to the GAME_SESSION_ATTACHED
state.
Test: Manual e2e testing and unit tests
Bug: 207035150
Bug: 202414447
Bug: 202417255
CTS-Coverage-Bug: 206128693
Change-Id: I799f8410da6936ab242fa925d77b0276875cc20f
Change-Id: Id6da59fd3a5951ba5f032c825d1f1f28d3320965
trust agent.
Still TODO: Add CTS test once SystemUI code is in to call this.
Test: manual testing with temporary call from SystemUI & logcat
Bug: 213631672
Change-Id: If76c033a73580e16a25ad0a6775e4e145644d926
Details for the design are in go/android-active-unlock-t and
go/android-active-unlock-t-api. This change
defines the API without implementing its use.
Test: non-functional API change. Existing regression tests check for regressions.
Test: manually verified smart lock still revokes trust when bluetooth
device disconnected
Bug: 213631675
Bug: 213631677
Bug: 213631672
Bug: 213911325
CTS-Coverage-Bug: 213944235
Change-Id: I206f3e5c5c456a7433be325ea0186b79319d3a66
We met the ClassNotFoundException when putting the service under
system service folder. Cannot find the root cause to fix it now. We
need to more time to find the reason so the workaround is to move the
class to the framework/base/core/service/selectiontoolbar to fix the
problem now. We will go back to fix the problem later.
Bug: 214122495
Test: manual. Can bind to DefaultSelectionToolbarRenderService and
the methods can be called successfully.
Change-Id: I9218c9ceee25a105fe592c0c63905ba2e2f8a305