18669 Commits

Author SHA1 Message Date
Jeff Sharkey
20e0c50f60 Offer force-dex-opt when running as root.
Recently we removed the PackageManager inotify triggers, meaning the
only supported ways of installing apps were:

-- adb install -r Foo.apk
-- adb shell stop && adb sync && adb shell start

Iterating on most system apps (like Settings) can use the first
approach, but it doesn't work for "persistent" processes like
SystemUI.  (ActivityManager is very particular about how it deals
with persistent apps, and it always sticks with the first
ApplicationInfo found at boot.)

So to enable rapid iteration on persistent apps, we now offer the
one missing piece of forcing a dexopt with a new pm force-dex-opt
command only available to -eng or -userdebug builds.  Typical use
for iterating on persistent apps now looks like this:

$ mmm frameworks/base/packages/SystemUI/ && adb sync &&
    adb shell pm force-dex-opt com.android.systemui &&
    adb shell kill `pid systemui`

Yay!

Change-Id: I0ae2467f1d7cda56c70ba20953cd25fa8ee766ff
2014-07-25 21:11:47 +00:00
Jeff Sharkey
16c8e3f494 PackageInstaller changes based on feedback.
Mostly cosmetic changes from API council feedback.

Bug: 16543552
Change-Id: Ic926829b3f77c31f50a899c59b779353daf00d59
2014-07-25 11:59:48 -07:00
Craig Mautner
5ec618e3c3 am a9c5257a: am a0bb44ef: Merge "Finish crashed activities immediately" into klp-modular-dev
* commit 'a9c5257a15f2efb5c017d2ecadb5a7360230bfee':
  Finish crashed activities immediately
2014-07-25 17:43:37 +00:00
Craig Mautner
a9c5257a15 am a0bb44ef: Merge "Finish crashed activities immediately" into klp-modular-dev
* commit 'a0bb44efe96ca70635b64dac8922b225d1a19407':
  Finish crashed activities immediately
2014-07-25 02:19:53 +00:00
Craig Mautner
a0bb44efe9 Merge "Finish crashed activities immediately" into klp-modular-dev 2014-07-24 20:48:02 +00:00
Craig Mautner
8e5b133bf6 Finish crashed activities immediately
By finishing crashed activities right away the VirtualDisplays
associated with ActivityView are removed immediately rather than
being deferred. Also there is no waiting for Pause (0.5 sec) and
Destroy (10 sec) timeouts to expire.

Fixes bug 15092354.

Change-Id: Ie4941cb19dcc6f6fc61b2475162ea2794c9558a2
2014-07-24 13:32:37 -07:00
Prashant Malani
bc3699b1c3 am b4dcc64f: Merge "Revert "Remove circular mask"" into klp-modular-dev
* commit 'b4dcc64fe6314b139ac17aa296419bbf153df2f6':
  Revert "Remove circular mask"
2014-07-24 18:06:03 +00:00
Adam Lesinski
3c153519ca Add Per-User logging of UsageStats
Change-Id: I4518c5d3c56b3821292accb886f9fb21f3a8b25f
2014-07-25 17:18:54 +00:00
Amith Yamasani
f7496d7e0c Merge "Don't update user's setup state unless it changed" into lmp-dev 2014-07-24 15:36:21 +00:00
Amith Yamasani
0da218be00 Don't update user's setup state unless it changed
Eliminates an extra write on every boot.

Bug: 16416936
Change-Id: I9ca16676c1b39dafeed3fc744a69c5bde819990c
2014-07-25 08:03:00 -07:00
Kenny Guy
466d203c4f Add method to launch settings app details page.
Add a method to LauncherApps to allow launchers to
show application details for an app in a managed profile.

Bug: 16371359
Change-Id: I23acb4365c09e4a7b9fa742ae6fc7e04434f45aa
2014-07-25 15:59:51 +00:00
Narayan Kamath
ed1391a929 Merge "Handle apps that share a UID with the system_server correctly." into lmp-dev 2014-07-24 15:36:04 +00:00
Narayan Kamath
340ca8b7e8 Handle apps that share a UID with the system_server correctly.
The system process does not explicitly declare any ABI, or
package any native code that it depends on but its ABI is
dictated by the zygote configuration. We need to account for
it correctly to have apps that share a UID with it work
correctly.

bug: 16317188

Change-Id: I84713c64409d7fdcc314114231e87a9263d5c5e7
2014-07-25 15:32:37 +01:00
Narayan Kamath
045e648980 Handle renderscript apps in the system partition correctly.
Get rid of various pointless calls to setBundledAppAbisAndRoots.
This method should only need to be called during scanPackageLI.

There's no other good reason to call it.

bug: 16484595
Change-Id: I2830b140058f0fffdbedb51d673e514852854626
2014-07-25 15:28:48 +01:00
Yuncheol Heo
3ae16ddabc Merge "Check the validity of the port id of HdmiCecMessage only in TV." into lmp-dev 2014-07-24 16:04:26 +00:00
Ji-Hwan Lee
a65118e13b TIF: Remove ClientState.mInputIds
It's no longer used since callback is now global, instead of per-input.

Change-Id: I82e4d9b8999fb9c18819a12e8436cd94e7174206
2014-07-25 06:59:55 +00:00
Yuncheol Heo
e946ed8f54 Check the validity of the port id of HdmiCecMessage only in TV.
In playback device, we don't track the port info, so we can't verify
the validity of the port id part of the physical address parameter of
HdmiCecMessages.

Bug: 16274232
Change-Id: I41f95dba0505d45688e2c9031b78863dc93248ce
2014-07-25 15:08:43 +09:00
Christopher Tate
db573fc0bb Merge "A couple of restore fixes:" into lmp-dev 2014-07-24 20:48:02 +00:00
JP Abgrall
5f054cea32 MountService: Fix android.process.media crash repeatedly problem
When the framework restarts because of certain exception, the
external volume id will disappear. At this time, mount service
will issue "volume list" command to vold to get the status of
each storage.

The fix is to re-broadcast the uuid and user label again via
vold "volume list broadcast" command.

Bug: 16253597
Bug: 16306775
Change-Id: I227e8bc597a4f5338035d3401036490f14557211
2014-07-25 02:05:36 +00:00
Christopher Tate
7ff106c20d A couple of restore fixes:
* Fix crasher after transport-level failure attempting to ask for
  the name of the next package to be restored

* Current-dataset single-package restore path no longer requires
  that the package have its own backup agent.

Bug 16548983

Change-Id: Id37f2f0e6075d53c414d9a997bf738bbf0cfff8b
2014-07-24 18:58:23 -07:00
Sreeram Ramachandran
ba6e4c60e7 Merge "Don't create a ConnectivityManager when the service isn't ready yet." into lmp-dev 2014-07-24 20:48:02 +00:00
Sreeram Ramachandran
62a61314bc Don't create a ConnectivityManager when the service isn't ready yet.
Bug: 16550853
Change-Id: Ib244c93dc982cbfe5d065a20e4b8f0aeefb15b8f
2014-07-24 16:26:59 -07:00
Amith Yamasani
422570ea3f Call PRE_BOOT_COMPLETED on starting any user
Refactor PRE_BOOT_COMPLETED delivery code.
Continue to call it on all existing users on system update.
Call it on any user being started, as part of
initialization.

Change-Id: Ie188a823fb19afde3781d6c45ada55d6e92edfac
2014-07-24 23:24:38 +00:00
Jinsuk Kim
68bed6c5d7 Merge "Add portID information in HdmiCecDeviceInfo" into lmp-dev 2014-07-24 16:04:26 +00:00
Jinsuk Kim
2b152015ff Add portID information in HdmiCecDeviceInfo
This change makes it convenient to get the HDMI port ID from the device
info without having to look it up through a separate HdmiPortInfo, which
happens in many places.

Also removed port information lookup loop by introducing two maps variable
in Control Service: port path ->port ID, and port ID -> port info.

Bug: 16547583
Change-Id: Ibfff722a16b626230766058efcc819e9c8ca0663
2014-07-25 02:14:55 +00:00
Jungshik Jang
1660611911 Merge "Replace osd message for record status with IHdmiRecordCallback." into lmp-dev 2014-07-24 16:05:03 +00:00
Jungshik Jang
12e5dcefe1 Replace osd message for record status with IHdmiRecordCallback.
Add new interface, IHdmiRecordCallback, in order to handle
result of all recording features, One Touch Record and
Timer Recording.
HdmiRecordCallback is clientside interface which uses
RecordSource as return of getOneTouchRecordSource,
instead of raw byte array.

Along with it, add TimerRecordingAction.

Bug: 16160962

Change-Id: If0ed7abc5f45b020b39555cac585becbe8ee7da4
2014-07-25 11:33:39 +09:00
Michael Wright
42dc32d829 Merge "Flip the permissions checks for video capture." into lmp-dev 2014-07-24 15:36:21 +00:00
Craig Mautner
8746a478ab Create end of animation callback for Activity
Activities cannot draw while their entering animations are active.
This change introduces a callback, onEnterAnimationComplete() so
that activities can know when their draws will be effective.

Fixes bug 13658460.

Change-Id: Ic48540cd4c7e37538f10cb2dc0852aa3f55d11e1
2014-07-25 01:35:02 +00:00
Michael Wright
0ccc2b0a44 Flip the permissions checks for video capture.
Currently they're backwards in DisplayManagerService. Oops.

Bug: 16315225
Change-Id: I9bbfc0f4aef1bd21e43594cc36c6e8fd112f0b81
2014-07-25 01:25:03 +00:00
Svetoslav
a4725efd0b Improve the window query API performamce.
We are caching the window data in the accessibility service process.
When windows change we were sending the dalta of the windows the
service knows about. To make this work when the app asked for all
windows we had to call into the system as new windows may have
appeared. This was slow.

Now we are telling the service some windows change and if it gets
the windows we cache them. We call into the system only on a cache
miss and evict all windows from the cache on window change event.
We do not evict the nodes of the window as the former may have
just moved. If views in a window change they fire accessibility
events that trigger the correct eviction.

Change-Id: I586a72a2497b0d44a75288fa758e7e88817f3300
2014-07-25 01:17:02 +00:00
Dongwon Kang
2380f36e67 Merge "Disable TvInputManagerService on non-TV devices." into lmp-dev 2014-07-24 16:05:03 +00:00
Christopher Tate
b9583c9d93 Turn on debugging override of idle time
'adb shell am idle-maintenance' has traditionally been used to force
the system to consider itself to be in an "idle" state.  Unfortunately
the new Job Manager hadn't yet been aware of this.  Rectify the situation.

Also fixes a bug in debug logging that would cause a system server
crash under certain race circumstances.

Change-Id: I8a29bd7757924f8e464865235c344233fc03d8c3
2014-07-25 00:30:07 +00:00
Prashant Malani
85d5144984 resolved conflicts for merge of bc3699b1 to lmp-dev
Change-Id: I1b219b5b48afb08ce3704a4f064a85652d2d9339
2014-07-24 15:29:27 -07:00
Robert Greenwalt
fab50167a8 Fix DUN-based tethering.
It was calling into dead ConnectivityService code rather than using
the new ConnectivityManager shim code.

bug:15221541
Change-Id: I1e3eea8a658a162ce36673ed1cf7b1e7e4372c42
2014-07-24 14:39:51 -07:00
Narayan Kamath
cf0cf47545 Merge "Handle renderscript apps in the system partition correctly." into lmp-dev 2014-07-24 15:36:04 +00:00
Adrian Roos
c3d5ead837 Merge "Restart trust agents when updated or when they are dead" into lmp-dev 2014-07-24 15:36:04 +00:00
Adrian Roos
c5f95cea26 Restart trust agents when updated or when they are dead
ActivityManager restarts the trust agent service for us
when it gets killed automatically. This does not apply
when its process crashes too often or when its package
gets updated however.
To catch the update case, the trust agent connection
is removed as soon as the package disappears, and then
readded when the new package appears.
To catch the repeated crashing case, the connection is
reset if it hasn't successfully connected for several minutes.

Also adds a button to SampleTrustAgent to simulate a crash.

Bug: 16137258
Change-Id: I1b18fc7a3025e23e25ca1623b6af658d5430a94b
2014-07-24 21:44:02 +02:00
Nicolas Prevot
0417982b65 Merge "Migrate extras to ClipData for image/video capture intents." into lmp-dev 2014-07-24 15:36:05 +00:00
Nicolas Prevot
d1c99b1fe8 Migrate extras to ClipData for image/video capture intents.
The intents ACTION_IMAGE_CAPTURE, ACTION_IMAGE_CAPTURE_SECURE and ACTION_VIDEO_CAPTURE are now handled in a way
similar to ACTION_SEND and ACTION_SEND_MULTIPLE.
Migrate the uri in the EXTRA_OUTPUT extra to clipData, and add the flag GRANT_WRITE_URI_PERMISSION.

The userIds are now added to extra uris in the process receiving the intent, (not in the system process), because the
system process may not be able to parcel/unparcel the extras.

BUG: 15534203

Change-Id: I8f79666b726bc6d7745bf777ad3c7518945c5cc3
2014-07-25 10:22:19 +01:00
Craig Mautner
6714e86a54 Refactor screen blocking logic.
Because of the call to turn on the screen introduced in ag/495255
is now made earlier we may not have sent the wakeup broadcast by
the time the windows have all drawn. In such a case onScreenOn()
did not release the wakelock and the screen stayed off.

This change ensures that no matter the timing of onScreenOn()
the wakelock will be released but only for the onScreenOn()
called in response to the most recent screen on transition.

Fixes bug 16404078.

Change-Id: Ic1e3e61e16c1fc34d4ec657e0e53ac49a05ca6a4
2014-07-24 20:49:57 +00:00
Dongwon Kang
0fdcb74cc3 Disable TvInputManagerService on non-TV devices.
The block condition is based on FEATURE_LEANBACK instead of
FEATURE_TELEVISION which is deprecated in favor of FEATURE_LEANBACK.

Bug: 16497355
Change-Id: I433051362fe94ea453afe9344800fb4f8c7076a9
2014-07-24 16:28:35 +09:00
Prashant Malani
a04ea61db5 Revert "Remove circular mask"
This reverts commit 2e8b27e898af3af1165a79e7c5f8b59f63f20a2f.

It also makes the circularMask option configurable via overlay.
It is set to false by default.

An offset dimension entry is also provided, for displays which have
a "chin". This is set to 0 by default.

Bug: 16380982
Change-Id: I16ec3e8d8882a6683c9155055944e5c2f5cd781e
2014-07-23 17:26:08 -07:00
Nicolas Prevot
f1939901d2 Making the clipboard work across users.
When copying from the parent: the ClipData can be pasted in the managed profile.
When copying from a managed profile: it can be pasted in the parent,
unless the policies says it's disabled. In which case, the clipboard of the parent becomes empty.
Supporting content uris.

BUG: 15186236

Change-Id: I522564a7c07ff21df137adcda980bb52e5739964
2014-07-24 10:25:57 +00:00
Ji-Hwan Lee
abca0ee794 TIF: Handle null main session
Change-Id: I5d9007e706d2adf4b559839c1db31221527214ec
2014-07-24 17:51:25 +09:00
Ji-Hwan Lee
982abe693f TIF: Fix crash on setMainSession
Change-Id: Iddf5032a99dbf855e418448b39ba66a68be8b07c
2014-07-24 17:11:03 +09:00
Ji-Hwan Lee
4c52697dbe TIF: Support HDMI-CEC active source management
Add system API TvView.setMain() and TvInputService.onSetMain().

Bug: 15994065
Change-Id: I60ac24659453ca616380993c4accd8c17e714639
2014-07-24 15:07:43 +09:00
Terry Heo
a8177c8879 Merge "TIF: Enable capturing TV input of TvInputPassthroughWrapperService" into lmp-dev 2014-07-23 19:35:21 +00:00
Terry Heo
79124a717c TIF: Enable capturing TV input of TvInputPassthroughWrapperService
Also fixed usage of Log.e() in TvInputService to show stack trace.

Bug: 16441553
Change-Id: I5c160de4a628698907ffd00510d982d597c0ea01
2014-07-24 10:51:23 +09:00
Antoine Labour
7699651ec4 Merge "WindowManager: fix clipping" into lmp-dev 2014-07-23 18:56:15 +00:00