8061 Commits

Author SHA1 Message Date
Jeff Sharkey
9e3cb0461c Merge "Browse mode for DocumentsUI, removed volume state." 2015-04-12 23:10:16 +00:00
Jeff Sharkey
59d577a518 Browse mode for DocumentsUI, removed volume state.
The existing management mode is too specific, and requires that
storage backends add queryChildDocumentsForManage(), etc.  Instead,
to offer more natural browsing support, add a new BROWSE_ROOT intent.

It behaves mostly like MANAGE_ROOT, except that it doesn't mutate
its Uris with setManageMode(), and it shortcuts straight to VIEW on
clicked documents.

It can be launched like this:

$ adb shell am start -a android.provider.action.BROWSE_ROOT
    -d content://com.android.externalstorage.documents/root/8405-1DFB
    -c android.intent.category.DEFAULT

Also rename a MetricsConstants to make it clearer, and don't
auto-mount all emulated volumes.

Fix bugs around parceling of DiskInfo/VolumeInfo.  Method to resolve
the best description for a VolumeInfo, which might need to fall
back to DiskInfo.

Add back "removed" volume state so we send broadcast when a volume
is destroyed, matching the expected public API behavior.

Bug: 19993667
Change-Id: I13aff32c5e11dfc63da44aee9e93a27f4690a43f
2015-04-12 16:03:50 -07:00
Jim Miller
ce7eb6daf0 Clean up FingerprintManager API and make it public.
Change-Id: I6a99dccd485c053cb47dbd0ec08b41a2dc5b17c8
2015-04-11 12:34:56 -07:00
Jeff Sharkey
6036cd5126 Merge "Support moving apps to expanded storage." 2015-04-11 15:55:27 +00:00
Fabrice Di Meglio
30ca50a3dd Merge "Add Default Browser App support and relax Hosts validation for AppLinks" 2015-04-11 02:07:39 +00:00
Svetoslav
975ab5c0f0 Merge "Add a mechanism to make pending intents immutable." 2015-04-11 01:30:46 +00:00
Svetoslav
b0a78390ed Add a mechanism to make pending intents immutable.
bug:19618745

Change-Id: Ice742e0162cb9b7c0afbc32e0eea03d501666e2b
2015-04-10 18:19:03 -07:00
Fabrice Di Meglio
6227172310 Add Default Browser App support and relax Hosts validation for AppLinks
- add private PackageManager APIs for setting/getting the default
Browser App package name
- serialize / deserialize the default Browser App package name per User

Also relax the Hosts name validation for the AppLinls feature. Now we
just care if the IntentFilter is having an HTTP or HTTPS scheme.

Change-Id: I4436f66ac6beff57e14f7f3a2a00b0b582c03be9
2015-04-10 17:54:02 -07:00
Fyodor Kupolov
2e29aa5ea7 Merge "Added getUserCreationTime to query user/profile creation time" 2015-04-10 23:33:29 +00:00
Svetoslav
c8f786b1ed Merge "Fix accounting of permission gids." 2015-04-10 22:45:06 +00:00
Svetoslav
b3a6defec8 Fix accounting of permission gids.
bug:20143490

Change-Id: I718d4db74ebf003616241710a67774b2e2e5384f
2015-04-10 15:33:03 -07:00
Olawale Ogunwale
5033c1ef5b am 448cb9f9: am 6159f6eb: am 4406568e: Merge "Check caller status precisely when registering receiver."
* commit '448cb9f9ee8c6bd0a53662362f4a71a1fa4bbd5b':
  Check caller status precisely when registering receiver.
2015-04-10 21:01:22 +00:00
Olawale Ogunwale
6159f6eb23 am 4406568e: Merge "Check caller status precisely when registering receiver."
* commit '4406568ebac6f6bbf627aeb6909b409d948cecf4':
  Check caller status precisely when registering receiver.
2015-04-10 20:37:00 +00:00
Olawale Ogunwale
4406568eba Merge "Check caller status precisely when registering receiver." 2015-04-10 20:14:54 +00:00
Bryce Lee
662ed801ad am e0233e7e: am 73b56873: am eccaf729: Allow going to home action to work for SHORT_PRESS_POWER_GO_HOME with keyguard enabled.
* commit 'e0233e7e1162ce3e699d6eb6648e82d1b403e51e':
  Allow going to home action to work for SHORT_PRESS_POWER_GO_HOME with keyguard enabled.
2015-04-10 20:11:39 +00:00
Jeff Brown
f42d493697 Merge "Tweak systrace for power manager." 2015-04-10 20:01:13 +00:00
Jeff Brown
faec22c8e1 Tweak systrace for power manager.
Add name to photonic modulator thread.
Print light color in hex.

Change-Id: I813e875b04c381b26e0f79773a209417eca21e21
2015-04-10 12:59:27 -07:00
Svetoslav
caa41648f4 Merge "Allow only system signed apps to grant permissions at install" 2015-04-10 18:45:07 +00:00
Svetoslav
805b63e253 Allow only system signed apps to grant permissions at install
bug:20099946

Change-Id: Ifcc5c6638b4174ffb3ba452ae68a5a53b2d1ff0a
2015-04-10 11:41:29 -07:00
Craig Lafayette
2a91bbfb4d Merge "Reset protection in PersistentDataBlockManager" 2015-04-10 17:15:49 +00:00
Craig Lafayette
66445a639d Reset protection in PersistentDataBlockManager
Add method to allow authorized data block wipe in support of factory
reset protection. This will allow ManagedProvisioning to respond to
and pass factory reset protection challenges during automated device
setup.
- Adds the wipeIfAllowed method to clear the data block
- Creates a protected-broadcast to send to allowed package

Bug: 19792435
Change-Id: I897f2ea2afb1222a1fc8ac49290ee45ea4d3f2d7
2015-04-10 13:14:24 -04:00
Nick Kralevich
a3e28e69e5 am 12a597a2: am a55ec9c2: am 08d76a94: Merge "Impose an ordering on created SELinuxMMAC Policy objects."
* commit '12a597a2bc92eda2f33bc85bb1c525989c261abf':
  Impose an ordering on created SELinuxMMAC Policy objects.
2015-04-10 16:58:17 +00:00
Nick Kralevich
a55ec9c2ab am 08d76a94: Merge "Impose an ordering on created SELinuxMMAC Policy objects."
* commit '08d76a946b898af28f3c8125cdf4966195b718fb':
  Impose an ordering on created SELinuxMMAC Policy objects.
2015-04-10 16:31:23 +00:00
Nick Kralevich
08d76a946b Merge "Impose an ordering on created SELinuxMMAC Policy objects." 2015-04-10 16:10:27 +00:00
riddle_hsu
b15506f95e Check caller status precisely when registering receiver.
Fine tune commit 9ac9609f.
Because process may reuse same process record to restart.
It is better to check below conditions to skip:
1. Simple dead and has been cleaned.
 => .thread will be null
2.The process has restarted with new pid but has not attached yet.
 => .thread will be null
3.The process has restarted and attached.
 => The IBinder will be different

Change-Id: Ic052f5025558ca93e1a6ab11bca61fe995126bb9
2015-04-10 15:41:19 +00:00
Robert Craig
4caa6b1efb Impose an ordering on created SELinuxMMAC Policy objects.
Imposing an order on Policy objects allows us to extend the
policy writers ability to union mac_permissions.xml files.
Policy developers can now create new mac_permissions.xml
entries under their device specific directories. This is
in contrast to current methods which only allow differing
stanzas to appear outside the base mac_permissions.xml.

Also, report on stanzas with duplicate input selectors and
treat these as errors. There are some ambiguities that can
arise otherwise.

Lastly, impose an XOR condition on signer stanzas w.r.t seinfo
and package tags. This finer distinction helps the union feature
of policy to become clearer and simpler to code.

Change-Id: Idd86df8ad9a63d1b8ba6e8270670814ca6cee8d2
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2015-04-10 11:14:37 -04:00
Chris Wren
250662a4ae Merge "Support ad hoc counters in the framework" 2015-04-10 14:12:25 +00:00
John Spurlock
1d7d2248ec Zen: New option to allow repeat callers.
Bug: 20064962
Change-Id: I11a5519c02bf8fa8e332559092c865c5e612fbd2
2015-04-10 09:21:08 -04:00
Jeff Sharkey
b9f3674c11 Support moving apps to expanded storage.
Start deriving the data path for apps based on the volume UUID where
the app lives.  This path is used for all higher-level APIs, giving
us a clean place to switch app storage.

When parsing a package, keep track of the volume UUID where it lives
and update PackageSetting once installed.  For now continue treating
moves as installs, but we'll eventually clean this up to avoid the
additional dexopt pass.  Wire up move to use the new installd command
to move private data between devices.

Cache LoadedApk only for the current user, since otherwise the data
dir points at the wrong path.

Bug: 19993667
Change-Id: I53336e3b147d5fd3130e6800869af172b628da37
2015-04-10 00:24:03 -07:00
John Spurlock
ec88e8956c Merge "An update on Downtime." 2015-04-10 01:48:06 +00:00
John Spurlock
b2278d6571 An update on Downtime.
The update is that Downtime is obsolete.  Replaced by the
ability to define multiple named schedule calendars.

 - Make changes to ZenModeConfig to properly model manual
   and automatic rules.
 - Refactor the zen mode helper (and supporting classes) to
   properly handle / report multiple claims on zen mode.
   The "manual" rule (specified by the user in the UI) vs
   one or more automatic rules.
 - Automatic rules are still backed by condition providers,
   but the layering is now cleaner.  ConditionProviders is now
   completely generic, has no ties to zen mode.
 - Specifically, the new layering for zen mode (below noman) is:
   ZenModeHelper: Source of truth for zen state
     ZenModeFiltering: Subhelper dedicated to filtering rules.
     ZenModeConditions: Subhelper dedicated to managing automatic rules.
       ConditionProviders:  Underlying engine for reporting named boolean state.
 - Migration story for users with existing downtime config, migrated
   to a single new calendar named downtime.
 - For users with no existing downtime, two default calendars are created
   for weeknights + weekends (icu4j for all locales will be done in a followup).
 - Remove obsolete DowntimeConditionProvider/NextAlarmConditionProvider and tracking.
 - Clean up obsolete resources.
 - Add common zen summary description string computation.
 - Add proper noman wrappers for the new model.
 - Change the semantics of the global zen setting.  It is now read-only.  Setters
   must call noman, added a "reason" to all calls for better attribution.
 - Update zenmodepanel + volumedialog to the new model.
 - Display the one or more automatic rules in the new zen footer summary.
 - "Snooze" the automatic rules when the user explicitly turns zen off.

Bug: 20064962
Change-Id: Idd9deb865a6035ad0cfae660198dccb517e6d7cc
2015-04-09 21:45:08 -04:00
Mathieu Chartier
56a6d371bd am da164973: Merge "Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category""
* commit 'da164973f35aa32e44d0b9336deef28df5b13544':
  Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
2015-04-09 23:36:06 +00:00
Fabrice Di Meglio
5f76360ff9 Merge "Add IntentFilter auto verification - part 5" 2015-04-09 23:23:38 +00:00
Fabrice Di Meglio
e48c137acd Add IntentFilter auto verification - part 5
- optimize IntentFilter verification: dont do stuff we dont want
if we dont need to do them.

- improve IntentFilter candidates filtering and also improve
at the same time fix for bug #20128771: we can return the candidates
list rigth the way if the Intent is not related to a Web data URI and
include the "undefined verification state" ones if the first filtering
pass does not leave any.

Change-Id: I19f5c060f58b93530e37b4425d19ed23d2a0f4c0
2015-04-09 16:19:44 -07:00
Mathieu Chartier
537691fc2d Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
Example output of "adb shell dumpsys meminfo -d":

Total PSS by category:
   193605 kB: Dalvik
               87561 kB: .Heap
               77863 kB: .LOS
               15333 kB: .Zygote
               12848 kB: .NonMoving
                6770 kB: .GC
                2597 kB: .LinearAlloc
                1180 kB: .JITCache
                1180 kB: .IndirectRef
   103936 kB: EGL mtrack
   101827 kB: Native

Bug: 17643507

(cherry picked from commit 546edc5a31bb5a843048e11d8afb0b1f6441ddb4)

Change-Id: If34627cf93ba5305b428d2278f350a2649d63d5e
2015-04-09 15:53:17 -07:00
Mathieu Chartier
b47ba1e7d5 Merge "Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"" 2015-04-09 22:48:53 +00:00
Dianne Hackborn
24f683523e Merge "More work on device idle mode and other power stuff." 2015-04-09 22:35:36 +00:00
Jeff Sharkey
95f534143d am 84debe27: am e0001185: am 1d3c77a2: Merge "Start passing volume UUID to installd."
* commit '84debe2761433cfaa8203d5a2defa4ba2ed64b61':
  Start passing volume UUID to installd.
2015-04-09 22:21:50 +00:00
Yohei Yukaw
fba00864f8 Merge "Verify that EditorInfo.packageName and uid are consistent" 2015-04-09 22:10:48 +00:00
Jeff Sharkey
e000118549 am 1d3c77a2: Merge "Start passing volume UUID to installd."
* commit '1d3c77a21e9c8fc59200b42503d9f0effd3f1551':
  Start passing volume UUID to installd.
2015-04-09 21:57:41 +00:00
Jeff Sharkey
1d3c77a21e Merge "Start passing volume UUID to installd." 2015-04-09 21:41:12 +00:00
Mathieu Chartier
546edc5a31 Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
Example output of "adb shell dumpsys meminfo -d":

Total PSS by category:
   193605 kB: Dalvik
               87561 kB: .Heap
               77863 kB: .LOS
               15333 kB: .Zygote
               12848 kB: .NonMoving
                6770 kB: .GC
                2597 kB: .LinearAlloc
                1180 kB: .JITCache
                1180 kB: .IndirectRef
   103936 kB: EGL mtrack
   101827 kB: Native

Bug: 17643507
Change-Id: Idd3e5560f376157c32094a5fbb84e8b6be4b2843
2015-04-09 14:39:00 -07:00
Jeff Sharkey
790a4ecac7 Start passing volume UUID to installd.
This change adds new method overloads to provide volume UUID.  The
older methods remain for now, and pass through the "null" UUID to
reference internal storage.

Follows the existing pattern where null arguments are passed as "!".

Bug: 19993667
Change-Id: Ia1b7c8550cabc13e4f6e1182eabb650f2c33e44f
2015-04-09 14:19:07 -07:00
Dianne Hackborn
4870e9d5eb More work on device idle mode and other power stuff.
Add idle mode support to the alarm manager.  Introduce
a new concept of flags associated with alarms to tell
the alarm manager how to treat the alarm -- they allow
everything from the alarm that will bring us out of idle
mode, to alarms that are allowed when idle or should
also bring us out of idle.  The standalone boolean is
now also a flag.

(Note there is currently no protection from user space
setting the flags however it wants; I will be working
on that in a follow-up change.)

When in idle mode, the alarm manager pushes all alarms
that shouldn't execute during that time over to a
separate list that is not executed until out of idle.
To help with this, I reworked a bit how Alarm objects
are managed, so that when rebatching or moving between
lists we don't have to allocated new objects but can
just use the same existing instance.

Also tweaked the sync manager to deal with idle mode,
which currently just means doing the same thing as when
low on storage -- turning off sync.

Add new ACTION_CHARGING and ACTION_DISCHARGING broadcasts
that apps can listen for to know when the device is actively
charging and discharging.  These are better than the old
POWER_CONNECTED and POWER_DISCONNECTED ones because we only
report charging when we actually see that there is enough
power being provided to charge the battery (and will report
discharging if there is not enough power).

The job controller uses these new actions for scheduling
jobs that want to run while plugged in.  Removed the
"stable charging" stuff while doing so, since the new
charging state serves as an even better signal for that.

Introduced two new process states: FOREGROUND_SERVICE and
TOP_SLEEPING.  This will allow us to treat foreground services
specially (such as still allowing network access to them for
background music playback) while not mixing them together with
whatever happens to be the top activity while the device is
asleep.

Also some other small cleanup here and there.

Change-Id: I7a9808b578bad6f50deb8e1baf919298512a0d3a
2015-04-09 14:05:17 -07:00
Chris Wren
723aa768f6 Support ad hoc counters in the framework
with some examples in NotificationManagerService.

New counters in this CL:
  note_with_people
  note_dismiss_longevity
  note_click_longevity

Bug: 20137009
Change-Id: I10b769ff4872d50f4c1c3828ea519f9712be7bc2
2015-04-09 16:33:06 -04:00
Fabrice Di Meglio
7c6a34e64a Merge "Fix bug #20128771 All apps disappeared from app drawer after AAZ08 OTA" 2015-04-09 20:13:57 +00:00
Fabrice Di Meglio
53f35f4a20 Fix bug #20128771 All apps disappeared from app drawer after AAZ08 OTA
- relax a bit Intent resolution. We should still include Apps that
do not support Web domains :-) so in that context add in the result
list the Apps that are with a status INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED

Change-Id: Ibad7b7f577552ac75bba256bb387a75b83524958
2015-04-09 13:10:35 -07:00
Fabrice Di Meglio
c9d83fc2e0 Merge "Add IntentFilter auto verification - part 4" 2015-04-09 17:29:22 +00:00
Richard Uhler
a1b19b7b66 am 00ff42a0: am 7f757130: am f324d245: Merge "Reuse dexopt method for both dex2oat and patchoat."
* commit '00ff42a0ca9d17c4b7ee89d900cf86c9a25c00eb':
  Reuse dexopt method for both dex2oat and patchoat.
2015-04-09 14:51:13 +00:00
Richard Uhler
7f7571308d am f324d245: Merge "Reuse dexopt method for both dex2oat and patchoat."
* commit 'f324d245fdd07ac14ab312d1a5fa04a4e8dfcceb':
  Reuse dexopt method for both dex2oat and patchoat.
2015-04-09 14:31:10 +00:00