The screen on blocker is used to keep the screen blank while the
system is drawing new content to prevent the user from seeing a
flash of stale content while the screen is being turned on.
This patch ensures that the screen on blocker functionality
is also applied while dozing.
Bug: 17516245
Change-Id: I77c2d0f2b99476a59ad212099f44c63aa2ef9c34
Recently we relaxed revokeUriPermission() to allow apps to revoke
Uri permissions that had been granted to them, but this uncovered
bugs in apps that had been relying on the previous no-op behavior.
To mitigate this, only revoke ownerless Uri permissions when in the
unprivileged state; an active owner indicates that another component
of the calling app still needs the permission.
Bug: 17554268
Change-Id: Icc412933b29041ffb699d20136a623440ecc71ec
When services call Service.stopForeground(), remove
FLAG_FOREGROUND_SERVICE from the notification that was supplied
to Service.startForeground().
This enables services to post notifications that become user
dismissable when they switch to being a background service.
Restrict this to targetSdk=L apps to reduce the risk of breaking
existing apps.
Bug: 17551106
Change-Id: Iff8541e5bb2a23ad1fbc9ad80df5fd6eb683148b
...to the primary user, even if it was not whitelisted to be forwarded.
The path where getActivityInfo is called for the ResolverActivity
would not correctly apply the requested user ID to the result, so
it wouldn't run under the correct user.
Change-Id: I1da47c54bbed26091832a28236d0b06762c92437
When a TaskDescription is sent up to the system process, the Bitmap
contained in the mIcon member is immediately flushed to disk and the
name of the file replaces it in the TaskDescription. Thereby saving
mucho RAM for better uses.
Fixes bug 17527308.
Change-Id: Ifac63ea5d12ed091d1eb03e178b8b847a827f940
The BT and Wifi mechanisms for enabling Tethering did their own
permission checks. This set of changes unifies the check into
a ConnectivityManager function so they can be kept in sync.
bug:17435527
Change-Id: I8c157a5acf56ffbddd349cb6a45160ae7be8541b
Currently, carrier requirement is specified through CAPABILITIES key, whose original purpose is to indicate
the capability of the hardware, not to enable/disable features in GPS HW. With this fix, carrier requirement
on GPS features can be specified properly without messing up with the real capability. This will satisfy
VzW, Sprint and USC's requirement on SUPL mode, without sacrificing the capability of HW geofence.
Bug: 17423585
Bug: 17288144
Change-Id: I71173722d4b12bfc17562f7b5444d22b01ff4590
Background:
In ag/406771 we stopped deleting empty stacks in activity manager
and window manager. This fixed a problem where dormant tasks were
being added back to stacks later.
In ag/476888 we introduced a callback to inform the ActivityView
holder that the embedded task was complete. This callback was made
from the new method ActivityContainer.onTaskListEmpty().
In ag/483035 onTaskListEmpty() was expanded to detach the stack of the
ActivityView and also removed the stack from window manager. There
was a mistake in that CL that causes it to remove any non-home stacks,
not just ones in ActivityViews.
That mistake left us with an empty stack in activity manager and no
corresponding stack in window manager. As a result, when trying to
bring back a task that used to be in this stack window manager threw
up an exception.
This fix limits the stacks detached by onTaskListEmpty() to those
on VirtualDisplays.
Fixes bug 17469145.
Change-Id: I85a4452e8e85625e657d88e4cb9f366fd4026441
Previously PendingIntent.getBroadcast() would match an existing Intent
which had the wrong token. Fixed by distinguishing Intents by action.
bug:17482680
bug:17509008
Change-Id: Ib15bb006888850683cc47ca09920962f0707b351
...give time in some cases
This switch to multiple stacks broke the check to determine if it
should actually wait for a new activity to be shown. The new check
now also requires that the top activity be resumed, which means
we may get some false positives where we decide to wait and shouldn't,
but that is better than consistently not deciding to wait in some
cases when we should. (And we will always finish waiting then next
time something becomes visible).
Also add another time, which is how long it took from the startActivity
call to return with the result. And fix when we decide to report that
we are done so that, in the case where we are bringing an existing
activity to the foreground, we don't wait until its animation is complete.
Change-Id: Id38ca0070f04e7bf8c73e131fb055808553a0e2f
Remove token from deferred list of tokens to be removed once token
is removed. Leaving it in the list leads to logging messages like
"WindowManager: removeAppFromTaskLocked: token=AppWindowToken{...
} not found" when an attempt to remove it a second time fails.
Discovered in logs from b/17512377.
Change-Id: Ic83d81841b9b74ae5c4c433d1086d3bbda8e1d64
CTS tests cause the TaskPersister queue to fill faster than it can
drain. Since it contains screenshots this can consume massive
memory. Monkey may also cause the queue to back up.
Several optimizations are added to drain the queue when it gets
large:
- High water mark to recognize when queue gets too deep. Queue is
completely drained at this point so that obsolete files can be
removed from storage.
- Use Thread.yield() to give the TaskPersister write thread some cpu
cycles.
- Remove images from write queue when TaskRecord is removed from
recents.
May fix bug 17177273.
May fix bug 17381033.
Change-Id: If21c03c8f380e5f6816cf4701a40fcfe34ace3f1
When HDMI-CEC system audio mode is activated.
1. Hide volume bar when volume button is pressed in TV
2. Show volume bar when TV receives volume notification from
Audio Receiver.
Otherwise, (system audio mode off) follows normal TV's behavior.
Bug: 17347499
Change-Id: I1f5bc14285d60d8626a8fbbef9e1959cae7d193b
Introduce a concept of a "root affinity" to a task -- this is the
affinity of the initial activity in the task. Use this instead of
the current affinity in findTaskLocked(), where we look for an
existing task to use for a NEW_TASK intent.
This changes the semantics of the new "relinquish task identity" mode
so that it doesn't relinquish the root affinity of the task. This
means when we are in the old style application-based recents matching
of findTaskLocked(), we will never count these tasks as the same as
the application's tasks only because they have relinquished their
identity to that application. This is probably okay, it is basically
putting a different line between new document-centric recents and
old application-centric recents when they are mixed together.
Change-Id: I73a22ead9bd08e98bf67ad035a017f828c6a6715
When TIF client tries to connect a session while TV input is being
updated, updateServiceConnectionLocked() may fail to bindServiceAsUser()
and the session state may remain indefinitely until a client tries to
create another session to connect the service. Reconnect the session by
calling updateServiceConnectionLocked() when package is updated.
Also, remove the session state when client dies before onSessionCreated().
This was causing the stale session in the above scenario (without
reconnection) to be connected to TIS even when client no longer exists.
Bug: 17518751
Change-Id: I5484df0d80c71649d22438521adf182ab59a6ce4
Fixes two bugs introduced by change
I7bd32531130d199c0734ffcb800194e77b7e16c3:
When the system window insets consumed by DecorView
change as a result of changing flags, the insets must
be redispatched to the hierarchy.
Also fixes a bug where, as a result of removing the wrong
implication of the SYSTEM_UI_FLAG_LAYOUT_STABLE flag by
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, the status bar was
being forced to black when returning from recents.
Bug: 17489047
Bug: 15046646
Change-Id: I127b0ff3b17c4873a7c28d67020f84298ed09db2
- Clear the logical address on the hotplug event.
- Don't reset mIsActiveSource flag on the hotplug event.
Bug: 17517438
Change-Id: Id129a9cce30323090ce21bbfc188b955bd32755b
...irrelevant install state at the end
Quick and dirty impl just doesn't print any of that data when filtering
by package name. In the future that part of the dump should be smarter
to know how to filter by package name. (Probably also moved to a place
earlier in the dump, so the key information -- the overall package
data -- is still at the end.)
Change-Id: I094f7c2f25401438a68a6aa00d10b19c19eb7c7d
This is because of the 5 second timeout from when the user can bring
home to the foreground until regular third party apps can launch an
activity on top of it. Activities launched from notifications look
like they are being launched by the app, so get impacted by the timeout.
Fix this be also looking at the actual caller to see if they are
allowed to pop in front regardless of the timeout.
Change-Id: I63fbc2bcabf585e6d2810a2309f0613fdf91fdf5