52110 Commits

Author SHA1 Message Date
Jeff Sharkey
7527990420 Collect historical network stats.
Periodically records delta network traffic into historical buckets to
support other services, such NetworkPolicyManager and Settings UI.

Introduces NetworkStatsHistory structure which contains sparse, uniform
buckets of data usage defined by timestamps.  Service periodically
polls NetworkStats and records changes into buckets.  It only persists
to disk when substantial changes have occured.  Current parameters
create 4 buckets each day, and persist for 90 days, resulting in about
8kB of data per network.

Only records stats for "well known" network interfaces that have been
claimed by Telephony or Wi-Fi subsystems.  Historical stats are also
keyed off identity (such as IMSI) to support SIM swapping.

Change-Id: Ia27d1289556a2bf9545fbc4f3b789425a01be53a
2011-06-01 17:44:52 -07:00
Fabrice Di Meglio
77c1cc0aa4 Merge "Fix bug #4509967 (layout_gravity not always respected)" 2011-06-01 17:40:11 -07:00
Daniel Lehmann
df357caf31 Merge "Enable strict mode as a public api to catch sql injections" 2011-06-01 17:30:50 -07:00
Jeff Sharkey
9599cc5f21 Tests for NetworkPolicyManager rule generation.
Verifies that policy changes trigger rule updates that respect current
foregroundActivities status.  Also verifies logic that promotes a UID
based on its most-foreground PID.  Verifies that policy changes result
in immediate rule changes.

Also verifies that BACKGROUND_DATA_SETTING_CHANGED broadcasts are sent
by policy changes.

Change-Id: I4fd0dad9e1dbccee2c5968244bb1814e6cb2c6e1
2011-06-01 17:26:30 -07:00
Jeff Sharkey
1b861278a2 Teach NetworkPolicyManager how to dumpsys itself.
Includes details on all internally known UIDs, which can be used for
debugging purposes.

Change-Id: I340d25212e3c7a76a57de0a94ffeea34b6748941
2011-06-01 17:21:17 -07:00
Jeff Sharkey
751fb11082 Merge "Policy and rules work for ConnectivityManager." 2011-06-01 17:18:15 -07:00
Yu Shan Emily Lau
8900fa6504 Merge "Convert the video editor performance test suite output from float to int." 2011-06-01 17:13:30 -07:00
Jeff Sharkey
c006f1aec1 Policy and rules work for ConnectivityManager.
Teach ConnectivityManager about UID-specific rules derived from policy,
such as rejecting network traffic on "paid" interfaces.  Calls that
return NetworkInfo now filter based on any REJECT rules in effect for
the calling UID.  (Added uid parameter if callers that still want all
interfaces.)

Changed NetworkPolicyManager to derive rules based on current policy
combined with PowerManager and ActivityManager status, which it passes
to ConnectivityService for eventual enforcement through netd.  When
rules change the usability of a NetworkInfo for a specific UID, it also
dispatches CONNECTIVITY_ACTION broadcasts to that UID.  Combined paid
and background policy together to match current working definition.

Change-Id: I797ea49439fcc487cfe2cbc16703d4b91ceb9af6
2011-06-01 17:00:42 -07:00
Christopher Tate
9e08ff3737 Merge "Filter backup/restore confirmation buttons when obscured" 2011-06-01 16:55:31 -07:00
Dianne Hackborn
e66763516a Work around OpenFeint bug.
Change-Id: Ib8320e50bb63fc56dc0118d5c8e9e328dbd3fcb1
2011-06-01 16:52:36 -07:00
Glenn Kasten
993fccec5b Remove unnecessary level of priority indirection
Change-Id: I942d43973c20a7ace8b0d3f78b4da97e45e996c6
2011-06-01 16:46:29 -07:00
Fabrice Di Meglio
de35ceeeb9 Fix bug #4509967 (layout_gravity not always respected)
- fix FrameLayout
- code refactoring on LinearLayout
- add more unit tests

Change-Id: I49302582c61aa31a4eb7eded92327b10408f71a4
2011-06-01 16:46:25 -07:00
Christopher Tate
e42a6058d4 Filter backup/restore confirmation buttons when obscured
I.e. don't let people fake the user out by putting some other UI over
the top of it in order to phish for a confirmation.

Addresses bug 4521629

Change-Id: I40ae057ebedeb92ed264fb52fa1c7c297c9d3ec2
2011-06-01 16:43:45 -07:00
Yu Shan Emily Lau
fa22e62589 Convert the video editor performance
test suite output from float to int.

Change-Id: I62fada18a4c34d06b8d0ed91885e5bd98f12523f
2011-06-01 16:33:35 -07:00
Scott Main
f9e43b8cba doc typo
Change-Id: Iab3246e12059582096594eb795f2eb42da46f667
2011-06-01 16:28:19 -07:00
Brett Chabot
50e51b81b1 Merge "Move bluetooth tests to their own package." 2011-06-01 16:08:20 -07:00
Brett Chabot
b525f089cf Move bluetooth tests to their own package.
Bug 4501764

Change-Id: Id65de5d96516720e75dfbb5d522f465187e73913
2011-06-01 16:04:30 -07:00
Andy Stadler
ca680af21b Merge "Use unchecked admin lookup for getStorageEncryption()" 2011-06-01 15:59:58 -07:00
Teng-Hui Zhu
b145112eff Merge "Correctly detect when switching back from full screen" 2011-06-01 15:53:18 -07:00
Brian Carlstrom
aef1987f4e Merge "Restore ResponseCodes for use with getLastError" 2011-06-01 15:31:46 -07:00
Andy Stadler
c994d693b6 Use unchecked admin lookup for getStorageEncryption()
Due to a copy/paste typo, getStorageEncryption() was protected by
getActiveAdminForCallerLocked(), which made the API unreadable if the
caller is not an admin.  This doesn't match the rest of the DPM API which
allows the "get" calls to be made anonymously.

This fix supercedes the proposed workaround CL in the DPM ApiDemo sample.

Change-Id: If1a6237634e97ced09a7c6a8876bb6b0f60c9be9
2011-06-01 15:30:54 -07:00
Brian Carlstrom
7e4b1a488d Restore ResponseCodes for use with getLastError
Change-Id: I41b5bc9cbb6c05672c92d5864e889fd2b0186141
2011-06-01 15:29:29 -07:00
Daniel Lehmann
50b1f8d3fc Enable strict mode as a public api to catch sql injections
Bug: 4368912
Change-Id: Ia4919f58cc5264da8758d6cd61d93e031676b74a
2011-06-01 15:24:23 -07:00
Glenn Kasten
54f40eb222 Merge "Revert "Use AudioTrack::event_type not int in callback"" 2011-06-01 15:22:49 -07:00
Glenn Kasten
e46a86fcb6 Revert "Use AudioTrack::event_type not int in callback"
This reverts commit 2225e4b7049fa3fb9d39a068b8268b63c952d7c1
2011-06-01 15:20:35 -07:00
Fabrice Di Meglio
c78416fdce Merge "Fix View default horizontal direction" 2011-06-01 15:16:41 -07:00
Christopher Tate
1a536e642f Merge "Restore from a previous full backup's tarfile" 2011-06-01 15:14:36 -07:00
Christopher Tate
75a99709ac Restore from a previous full backup's tarfile
Usage:  adb restore [tarfilename]

Restores app data [and installs the apps if necessary from the backup
file] captured in a previous invocation of 'adb backup'.  The user
must explicitly acknowledge the action on-device before it is allowed
to proceed; this prevents any "invisible" pushes of content from the
host to the device.

Known issues:

* The settings databases and wallpaper are saved/restored, but lots
  of other system state is not yet captured in the full backup.  This
  means that for practical purposes this is usable for 3rd party
  apps at present but not for full-system cloning/imaging.

Change-Id: I0c748b645845e7c9178e30bf142857861a64efd3
2011-06-01 15:09:55 -07:00
Romain Guy
cb0975b3c1 Merge "Add support to OpenGLRendere to draw BiDi text. Bug #4350336" 2011-06-01 14:56:19 -07:00
Romain Guy
726aeba80f Add support to OpenGLRendere to draw BiDi text.
Bug #4350336

Change-Id: I1cf31693f7ca9653fa3a41b5b91c27ef288d680f
2011-06-01 14:55:42 -07:00
Glenn Kasten
0523c55e5f Merge "Use AudioTrack::event_type not int in callback" 2011-06-01 14:40:45 -07:00
Teng-Hui Zhu
1a88acbed9 Correctly detect when switching back from full screen
In full screen mode, the play message can be trigger, that means we can't
assume that the play message only comes from inline mode.

bug:4498120

Change-Id: Ibf85bb74778df207a6ce786dc63b0845356a281c
2011-06-01 14:34:59 -07:00
Brian Carlstrom
7ae03cda10 Merge "Integrating keystore with keyguard (Part 1 of 4)" 2011-06-01 14:33:31 -07:00
Brian Carlstrom
5cfee3fabb Integrating keystore with keyguard (Part 1 of 4)
Summary:

frameworks/base
  keystore rewrite
  keyguard integration with keystore on keyguard entry or keyguard change
  KeyStore API simplification

packages/apps/Settings
  Removed com.android.credentials.SET_PASSWORD intent support
  Added keyguard requirement for keystore use

packages/apps/CertInstaller
  Tracking KeyStore API changes
  Fix for NPE in CertInstaller when certificate lacks basic constraints

packages/apps/KeyChain
  Tracking KeyStore API changes

Details:

frameworks/base

   Move keystore from C to C++ while rewriting password
   implementation. Removed global variables. Added many comments.

	cmds/keystore/Android.mk
	cmds/keystore/keystore.h
	cmds/keystore/keystore.c => cmds/keystore/keystore.cpp
	cmds/keystore/keystore_cli.c => cmds/keystore/keystore_cli.cpp

   Changed saveLockPattern and saveLockPassword to notify the keystore
   on changes so that the keystore master key can be reencrypted when
   the keyguard changes.

	core/java/com/android/internal/widget/LockPatternUtils.java

   Changed unlock screens to pass values for keystore unlock or initialization

	policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java
	policy/src/com/android/internal/policy/impl/PatternUnlockScreen.java

   KeyStore API changes
   - renamed test() to state(), which now return a State enum
   - made APIs with byte[] key arguments private
   - added new KeyStore.isEmpty used to determine if a keyguard is required

	keystore/java/android/security/KeyStore.java

   In addition to tracking KeyStore API changes, added new testIsEmpty
   and improved some existing tests to validate expect values.

	keystore/tests/src/android/security/KeyStoreTest.java

packages/apps/Settings

    Removing com.android.credentials.SET_PASSWORD intent with the
    removal of the ability to set an explicit keystore password now
    that the keyguard value is used. Changed to ensure keyguard is
    enabled for keystore install or unlock. Cleaned up interwoven
    dialog handing into discrete dialog helper classes.

	AndroidManifest.xml
	src/com/android/settings/CredentialStorage.java

    Remove layout for entering new password

	res/layout/credentials_dialog.xml

    Remove enable credentials checkbox

	res/xml/security_settings_misc.xml
	src/com/android/settings/SecuritySettings.java

    Added ability to specify minimum quality key to ChooseLockGeneric
    Activity. Used by CredentialStorage, but could also be used by
    CryptKeeperSettings. Changed ChooseLockGeneric to understand
    minimum quality for keystore in addition to DPM and device
    encryption.

	src/com/android/settings/ChooseLockGeneric.java

    Changed to use getActivePasswordQuality from
    getKeyguardStoredPasswordQuality based on experience in
    CredentialStorage. Removed bogus class javadoc.

	src/com/android/settings/CryptKeeperSettings.java

    Tracking KeyStore API changes

	src/com/android/settings/vpn/VpnSettings.java
	src/com/android/settings/wifi/WifiSettings.java

   Removing now unused string resources

	res/values-af/strings.xml
	res/values-am/strings.xml
	res/values-ar/strings.xml
	res/values-bg/strings.xml
	res/values-ca/strings.xml
	res/values-cs/strings.xml
	res/values-da/strings.xml
	res/values-de/strings.xml
	res/values-el/strings.xml
	res/values-en-rGB/strings.xml
	res/values-es-rUS/strings.xml
	res/values-es/strings.xml
	res/values-fa/strings.xml
	res/values-fi/strings.xml
	res/values-fr/strings.xml
	res/values-hr/strings.xml
	res/values-hu/strings.xml
	res/values-in/strings.xml
	res/values-it/strings.xml
	res/values-iw/strings.xml
	res/values-ja/strings.xml
	res/values-ko/strings.xml
	res/values-lt/strings.xml
	res/values-lv/strings.xml
	res/values-ms/strings.xml
	res/values-nb/strings.xml
	res/values-nl/strings.xml
	res/values-pl/strings.xml
	res/values-pt-rPT/strings.xml
	res/values-pt/strings.xml
	res/values-rm/strings.xml
	res/values-ro/strings.xml
	res/values-ru/strings.xml
	res/values-sk/strings.xml
	res/values-sl/strings.xml
	res/values-sr/strings.xml
	res/values-sv/strings.xml
	res/values-sw/strings.xml
	res/values-th/strings.xml
	res/values-tl/strings.xml
	res/values-tr/strings.xml
	res/values-uk/strings.xml
	res/values-vi/strings.xml
	res/values-zh-rCN/strings.xml
	res/values-zh-rTW/strings.xml
	res/values-zu/strings.xml
	res/values/strings.xml

packages/apps/CertInstaller

  Tracking KeyStore API changes
	src/com/android/certinstaller/CertInstaller.java

  Fix for NPE in CertInstaller when certificate lacks basic constraints
	src/com/android/certinstaller/CredentialHelper.java

packages/apps/KeyChain

  Tracking KeyStore API changes
	src/com/android/keychain/KeyChainActivity.java
	src/com/android/keychain/KeyChainService.java
	support/src/com/android/keychain/tests/support/IKeyChainServiceTestSupport.aidl
	support/src/com/android/keychain/tests/support/KeyChainServiceTestSupport.java
	tests/src/com/android/keychain/tests/KeyChainServiceTest.java

Change-Id: Ic141fb5d4b43d12fe62cb1e29c7cbd891b4be35d
2011-06-01 14:29:59 -07:00
Shimeng (Simon) Wang
19e6a16f68 Merge "Fix overview scale setting for mobile sites." 2011-06-01 14:28:54 -07:00
Amith Yamasani
23a5996b2b Merge "Keep track of USER_QUERY to pass to the intent." 2011-06-01 14:15:09 -07:00
Shimeng (Simon) Wang
73bb5734f0 Fix overview scale setting for mobile sites.
This fix will only set the overview scale in case the screen
is rotated from landscape to protrait, since in this case
the overview scale will be smaller and need explicit setting.
For the other way around, there's no need to set and it has wrong
effect for mobile sites.

issue: 4343683
Change-Id: I92cbf848bc2ed4184bd0c6b67992ff5cbc633c9f
2011-06-01 13:57:43 -07:00
Glenn Kasten
2225e4b704 Use AudioTrack::event_type not int in callback
Change-Id: Ifefc708d46874e04fd0d01cb6e2d43b987ee796c
2011-06-01 13:50:23 -07:00
Teng-Hui Zhu
3fafd39d07 The screen shot support for inline video on Java side
Basically, the GL texture bound with Surface Texture is not a singleton any
more. And the Surface Texture will be recreated every time a new video starts.
This can help to recycle the decoder's memory while using the GL texture to
show the screen shot.

The corresponding webkit change is: 112500

Change-Id: I3c35f6a0abc70b9039c316ca82b236c797d81c7e
2011-06-01 13:42:46 -07:00
Adam Powell
b30dda6b55 am 036c40f4: am fa8ee177: Merge "Framework: bugfix for menu selector not showing up properly." into honeycomb-mr2
* commit '036c40f443a6d83881bc336a94b5da41bbc0bbcc':
  Framework: bugfix for menu selector not showing up properly.
2011-06-01 12:53:15 -07:00
Dianne Hackborn
c11f6c3e33 am 7cae137e: am 79841acb: Merge "Compatibility mode never needed for normal size screens." into honeycomb-mr2
* commit '7cae137ed155f2d311f020bbb3e75730344fd5fc':
  Compatibility mode never needed for normal size screens.
2011-06-01 12:51:08 -07:00
Adam Powell
036c40f443 am fa8ee177: Merge "Framework: bugfix for menu selector not showing up properly." into honeycomb-mr2
* commit 'fa8ee17702a79a2597670374679a0b1952f4630f':
  Framework: bugfix for menu selector not showing up properly.
2011-06-01 12:49:47 -07:00
Adam Powell
fa8ee17702 Merge "Framework: bugfix for menu selector not showing up properly." into honeycomb-mr2 2011-06-01 12:48:03 -07:00
Dianne Hackborn
7cae137ed1 am 79841acb: Merge "Compatibility mode never needed for normal size screens." into honeycomb-mr2
* commit '79841acb6275348b4747d30bae6d813e15b1425d':
  Compatibility mode never needed for normal size screens.
2011-06-01 12:47:29 -07:00
Dianne Hackborn
79841acb62 Merge "Compatibility mode never needed for normal size screens." into honeycomb-mr2 2011-06-01 12:43:56 -07:00
Dianne Hackborn
b9e2f68b28 am 13e2bef4: am 80cf4e79: Merge "Fix issue #4500511: Holo effect background doesn\'t reach top of screen anymore" into honeycomb-mr2
* commit '13e2bef4f67c5bc5ce93aade1431ae3332d361f0':
  Fix issue #4500511: Holo effect background doesn't reach top of screen anymore
2011-06-01 12:43:35 -07:00
Dianne Hackborn
39ec8fb957 Compatibility mode never needed for normal size screens.
Change-Id: I3482fa692618b9272e1e19384e766a77f2a53c5d
2011-06-01 12:42:55 -07:00
Dianne Hackborn
13e2bef4f6 am 80cf4e79: Merge "Fix issue #4500511: Holo effect background doesn\'t reach top of screen anymore" into honeycomb-mr2
* commit '80cf4e79d2acd1f94b6a9866255459c6ab2760be':
  Fix issue #4500511: Holo effect background doesn't reach top of screen anymore
2011-06-01 12:39:36 -07:00
Dianne Hackborn
80cf4e79d2 Merge "Fix issue #4500511: Holo effect background doesn't reach top of screen anymore" into honeycomb-mr2 2011-06-01 12:34:48 -07:00
Dianne Hackborn
a239c84525 Fix issue #4500511: Holo effect background doesn't reach top of screen anymore
Change-Id: Iebefe924e71206f3e6388eaee64f7b1416bc3239
2011-06-01 12:30:38 -07:00