186526 Commits

Author SHA1 Message Date
Christopher Tate
11ae768cf1 Add payload-size preflight stage to full transport backup
We now peform a total-size preflight pass before committing data to the
wire.  This is to eliminate the large superfluous network traffic that
would otherwise happen if the transport enforces internal quotas: we
now instead ask the transport up front whether it's prepared to accept
a given payload size for the package.

From the app's perspective this preflight operation is indistinguishable
from a full-data backup pass.  If the app has provided its own full-data
handling in a subclassed backup agent, their usual file-providing code
path will be executed.  However, the files named for backup during this
pass are not opened and read; just measured for their total size.  As
far as component lifecycles, this measurement pass is simply another
call to the agent, immediately after it is bound, with identical
timeout semantics to the existing full-data backup invocation.

Once the app's file set has been measured the preflight operation
invokes a new method on BackupTransport, called checkFullBackupSize().
This method is called after performFullBackup() (which applies any
overall whitelist/blacklist policy) but before any data is delivered
to the transport via sendBackupData().  The return code from
checkFullBackupSize() is similar to the other transport methods:
TRANSPORT_OK to permit the full backup to proceed; or
TRANSPORT_REJECT_PACKAGE to indicate that the requested payload is
unacceptable; or TRANSPORT_ERROR to report a more serious overall
transport-level problem that prevents a full-data backup operation
from occurring right now.

The estimated payload currently does not include the size of the
source-package metadata (technically, the manifest entry in its
archive payload) or the size of any widget metadata associated with
the package's install.  In practice this means the preflighted size
underestimates by 3 to 5 KB.  In addition, the preflight API currently
cannot distinguish between payload sizes larger than 2 gigabytes;
any payload estimate larger than that is passed as Integer.MAX_VALUE
to the checkFullBackupSize() query.

Bug 19846750

Change-Id: I44498201e2d4b07482dcb3ca8fa6935dddc467ca
2015-03-26 18:57:36 -07:00
Jason Sams
756ecf7bbb am 5f786f0d: am 226fc774: am ee80414d: Merge "Fix doc bug for object size."
* commit '5f786f0dabe93eb1bf391ffc3f57f03b9b9ce575':
  Fix doc bug for object size.
2015-03-27 01:50:56 +00:00
Michael Runge
e00ed23491 am 34ec4cc7: am 7b1237e5: am 0f9b7015: am 9e3976b6: am 9a91bf1d: am 96f47f5b: am b0197033: Increase timeout when uncrypting OTA
* commit '34ec4cc7b31b28da896258cdeb7135ecaa876ec5':
  Increase timeout when uncrypting OTA
2015-03-27 01:50:49 +00:00
Amith Yamasani
dd8c05b6ea am bf67d25b: am cffe727e: am a5c20b98: am c704bc64: am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
* commit 'bf67d25be9fe400ad5099df6d100f9817d2c380f':
2015-03-27 01:50:43 +00:00
Deepanshu Gupta
cc0c7037cc am ec2a4096: am c55858ff: am fc18e950: am cfdd1e18: am 862f5900: am 44b5a1c8: am e541f350: Merge "Update JRE for runConfigurations." into lmp-dev
* commit 'ec2a40969ca4900f2646a68c9c0467ae2a9775ca':
2015-03-27 01:50:36 +00:00
Deepanshu Gupta
dfc724eb34 am 1bf6d543: (-s ours) am 5935ee2f: am 836f5d98: am 85afc992: am dbb38b30: am cbb4ec78: am 6f5fac81: Merge "Fix project settings. [DO NOT MERGE]" into lmp-dev
* commit '1bf6d5432f90d210e8cd01a820e83950b5de076e':
2015-03-27 01:50:29 +00:00
Deepanshu Gupta
b51ba53ed5 am 218ab6f4: am e91d8d82: am 18755bfa: am 0c8ccefc: am e97079d9: am a16bb347: am 44fea603: Merge "Fix RoundRect radius." into lmp-dev
* commit '218ab6f48dba121ae48ffb403fa92116c6b6a430':
2015-03-27 01:50:23 +00:00
Deepanshu Gupta
1c27b7491d am 1a3b4701: am 1a715a54: am 7a5a976c: am c07448d2: am 2b98abde: am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev
* commit '1a3b4701f7cfbab8e28e9d4de3daa07dc2b5aa82':
2015-03-27 01:50:15 +00:00
Deepanshu Gupta
85d26496bf am 703e0aec: am 1ea4657b: am 02e11a59: am 75614212: am 6fa9d554: am 0b76cf6f: am 34751c79: Merge "Better shadows." into lmp-dev
* commit '703e0aec57acaa50d16b79690c08cbf80af9dc94':
2015-03-27 01:50:09 +00:00
Deepanshu Gupta
b0f89d1fa1 am 070c3427: am 46e61156: am 173e931d: am 5bbc0265: am 5bc625d8: am a62a18e3: am 311a0f54: Merge "Fix layoutlib tests." into lmp-dev
* commit '070c3427c24ef0c1f2897e69a22b40243ac62342':
2015-03-27 01:50:03 +00:00
Jeff Brown
b0bbc61d8d am 833ed282: am 16869c8e: am a15ce03e: am 64646def: am d6216305: Merge "Disable more hotkeys while in setup." into lmp-mr1-dev
* commit '833ed282e17ad20ff79ef6391c43c8b6b2af61ea':
2015-03-27 01:49:56 +00:00
Svetoslav
6ea6d48213 Merge "Fix a typo" 2015-03-27 01:43:02 +00:00
Svetoslav
b4a16b16e7 Fix a typo
Change-Id: I74da330f7319bd2f571d1c328365e3d5e482dc78
2015-03-26 18:39:57 -07:00
Jason Sams
5f786f0dab am 226fc774: am ee80414d: Merge "Fix doc bug for object size."
* commit '226fc77468647303a81a05198851c81222e68efc':
  Fix doc bug for object size.
2015-03-27 01:24:54 +00:00
Michael Runge
34ec4cc7b3 am 7b1237e5: am 0f9b7015: am 9e3976b6: am 9a91bf1d: am 96f47f5b: am b0197033: Increase timeout when uncrypting OTA
* commit '7b1237e52c2553a78b1839017b36718b5f3e6095':
  Increase timeout when uncrypting OTA
2015-03-27 01:24:48 +00:00
Amith Yamasani
bf67d25be9 am cffe727e: am a5c20b98: am c704bc64: am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
* commit 'cffe727eb2f2e559c20a9eed92f96982a53c4625':
2015-03-27 01:24:45 +00:00
Deepanshu Gupta
ec2a40969c am c55858ff: am fc18e950: am cfdd1e18: am 862f5900: am 44b5a1c8: am e541f350: Merge "Update JRE for runConfigurations." into lmp-dev
* commit 'c55858ffd0039afb49f01ad06ed430bf206aa0d7':
2015-03-27 01:24:40 +00:00
Deepanshu Gupta
1bf6d5432f am 5935ee2f: am 836f5d98: am 85afc992: am dbb38b30: am cbb4ec78: am 6f5fac81: Merge "Fix project settings. [DO NOT MERGE]" into lmp-dev
* commit '5935ee2fc9a7f0cfd8be303c8474937aca2ef40c':
2015-03-27 01:24:37 +00:00
Deepanshu Gupta
218ab6f48d am e91d8d82: am 18755bfa: am 0c8ccefc: am e97079d9: am a16bb347: am 44fea603: Merge "Fix RoundRect radius." into lmp-dev
* commit 'e91d8d82ebbc23ac9a067687d8a32a28685a939e':
2015-03-27 01:24:33 +00:00
Deepanshu Gupta
1a3b4701f7 am 1a715a54: am 7a5a976c: am c07448d2: am 2b98abde: am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev
* commit '1a715a540f24895fc13bb58dc5c4919d9534f2b1':
2015-03-27 01:24:29 +00:00
Deepanshu Gupta
703e0aec57 am 1ea4657b: am 02e11a59: am 75614212: am 6fa9d554: am 0b76cf6f: am 34751c79: Merge "Better shadows." into lmp-dev
* commit '1ea4657bbb6bc58e573e7b3e791fa659c4bec4fc':
2015-03-27 01:24:24 +00:00
Deepanshu Gupta
070c3427c2 am 46e61156: am 173e931d: am 5bbc0265: am 5bc625d8: am a62a18e3: am 311a0f54: Merge "Fix layoutlib tests." into lmp-dev
* commit '46e61156a080152c504f2b9c674e990f19dee8e2':
2015-03-27 01:24:20 +00:00
Jeff Brown
833ed282e1 am 16869c8e: am a15ce03e: am 64646def: am d6216305: Merge "Disable more hotkeys while in setup." into lmp-mr1-dev
* commit '16869c8e25a7dbafb1c0aed29f2bd8e164fa9b67':
2015-03-27 01:24:16 +00:00
Jason Sams
226fc77468 am ee80414d: Merge "Fix doc bug for object size."
* commit 'ee80414d0ddd6a27bbf86e0de47dd86bc335431d':
  Fix doc bug for object size.
2015-03-27 01:13:26 +00:00
Michael Runge
7b1237e52c am 0f9b7015: am 9e3976b6: am 9a91bf1d: am 96f47f5b: am b0197033: Increase timeout when uncrypting OTA
* commit '0f9b70159a07f09f34c3688cce4b30362afa1855':
  Increase timeout when uncrypting OTA
2015-03-27 01:10:25 +00:00
Amith Yamasani
cffe727eb2 am a5c20b98: am c704bc64: am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
* commit 'a5c20b98cd1c0b18fa3d434f0ecf44cd8db155f4':
2015-03-27 01:10:17 +00:00
Deepanshu Gupta
c55858ffd0 am fc18e950: am cfdd1e18: am 862f5900: am 44b5a1c8: am e541f350: Merge "Update JRE for runConfigurations." into lmp-dev
* commit 'fc18e950bf5a05ac29e1b070b0bdfd5002903cae':
2015-03-27 01:10:01 +00:00
Deepanshu Gupta
5935ee2fc9 am 836f5d98: am 85afc992: am dbb38b30: am cbb4ec78: am 6f5fac81: Merge "Fix project settings. [DO NOT MERGE]" into lmp-dev
* commit '836f5d986f9dc4d6915aade059ef5ff7e584cde1':
2015-03-27 01:09:56 +00:00
Deepanshu Gupta
4e6ae02a29 am 17bb697b: am ec8df9af: Fix tests for Java 6.
* commit '17bb697b3bce1b23137553829dd62e0e7c16b472':
  Fix tests for Java 6.
2015-03-27 01:09:53 +00:00
Deepanshu Gupta
e91d8d82eb am 18755bfa: am 0c8ccefc: am e97079d9: am a16bb347: am 44fea603: Merge "Fix RoundRect radius." into lmp-dev
* commit '18755bfa3e346c42212f235e79856de54aae2095':
2015-03-27 01:09:45 +00:00
Deepanshu Gupta
1a715a540f am 7a5a976c: am c07448d2: am 2b98abde: am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev
* commit '7a5a976c9e054303ddd19a26c587c5e34368a339':
2015-03-27 01:09:39 +00:00
Deepanshu Gupta
1ea4657bbb am 02e11a59: am 75614212: am 6fa9d554: am 0b76cf6f: am 34751c79: Merge "Better shadows." into lmp-dev
* commit '02e11a595ec064c94ac71336d6197eb3018eece1':
2015-03-27 01:09:32 +00:00
Deepanshu Gupta
46e61156a0 am 173e931d: am 5bbc0265: am 5bc625d8: am a62a18e3: am 311a0f54: Merge "Fix layoutlib tests." into lmp-dev
* commit '173e931d4587c2dd1e6777a615a8c388e5df7caf':
2015-03-27 01:09:27 +00:00
Jeff Brown
16869c8e25 am a15ce03e: am 64646def: am d6216305: Merge "Disable more hotkeys while in setup." into lmp-mr1-dev
* commit 'a15ce03ee716be8b59965e0aeb6e6fcb23a8c237':
2015-03-27 01:09:22 +00:00
Deepanshu Gupta
17bb697b3b am ec8df9af: Fix tests for Java 6.
* commit 'ec8df9af2f35eb5be4df01d66b1add4a4e7546c7':
  Fix tests for Java 6.
2015-03-27 01:02:58 +00:00
Jason Sams
ee80414d0d Merge "Fix doc bug for object size." 2015-03-27 00:58:46 +00:00
Adam Lesinski
d10b49a4fa Merge "Retrieve WiFi info outside of BatteryStatsImpl" 2015-03-27 00:52:29 +00:00
Michael Runge
0f9b70159a am 9e3976b6: am 9a91bf1d: am 96f47f5b: am b0197033: Increase timeout when uncrypting OTA
* commit '9e3976b6feba28b027122af25b21c9eca6705f0f':
  Increase timeout when uncrypting OTA
2015-03-27 00:50:41 +00:00
Amith Yamasani
a5c20b98cd am c704bc64: am 0afd1905: Merge "Fix NPE if FPE service does not exist." into lmp-mr1-dev
* commit 'c704bc647270c30b5c38d53d10228325befeb0b7':
2015-03-27 00:50:33 +00:00
Deepanshu Gupta
fc18e950bf am cfdd1e18: am 862f5900: am 44b5a1c8: am e541f350: Merge "Update JRE for runConfigurations." into lmp-dev
* commit 'cfdd1e18a8039b8c0b1c1f260018cac3a613c3ec':
2015-03-27 00:50:27 +00:00
Deepanshu Gupta
836f5d986f am 85afc992: am dbb38b30: am cbb4ec78: am 6f5fac81: Merge "Fix project settings. [DO NOT MERGE]" into lmp-dev
* commit '85afc992ea0058155c73b2ad06f130df7bc697f4':
2015-03-27 00:50:19 +00:00
Deepanshu Gupta
18755bfa3e am 0c8ccefc: am e97079d9: am a16bb347: am 44fea603: Merge "Fix RoundRect radius." into lmp-dev
* commit '0c8ccefc54f4ddb2cc91df093bc09bd4ac8a1215':
2015-03-27 00:50:00 +00:00
Deepanshu Gupta
7a5a976c9e am c07448d2: am 2b98abde: am 8f9ebc65: am 3bd5cbb1: Merge "Use right colors for status bar and nav bar." into lmp-dev
* commit 'c07448d22ccc802acef341684d182898b6d449b6':
2015-03-27 00:49:53 +00:00
Adam Lesinski
4b6bd8d36b Retrieve WiFi info outside of BatteryStatsImpl
In order to not deadlock the system, we need to retrieve
WiFi energy info outside of the BatteryStats lock. We do this,
then pass that data down to BatteryStatsImpl to process.

b/19729960

Change-Id: Ib8beba1d5ac81d89144d502c4b688d0a88c5b102
2015-03-26 17:49:51 -07:00
Deepanshu Gupta
02e11a595e am 75614212: am 6fa9d554: am 0b76cf6f: am 34751c79: Merge "Better shadows." into lmp-dev
* commit '75614212d44c6874d5c7af1e7611566979b3471f':
2015-03-27 00:49:46 +00:00
Deepanshu Gupta
173e931d45 am 5bbc0265: am 5bc625d8: am a62a18e3: am 311a0f54: Merge "Fix layoutlib tests." into lmp-dev
* commit '5bbc026536f460c90f17f4554bad554f72df0009':
2015-03-27 00:49:40 +00:00
Jeff Brown
a15ce03ee7 am 64646def: am d6216305: Merge "Disable more hotkeys while in setup." into lmp-mr1-dev
* commit '64646defa7d01ca4105a5da8cc8d0999dac1543d':
2015-03-27 00:49:33 +00:00
Jason Sams
fb4f5cf614 Fix doc bug for object size.
Change-Id: I3c810abcb9734196bd8804a22efc010dd3a73291
2015-03-26 17:39:34 -07:00
Miao Wang
aac10a21e3 Merge "[RenderScript] Remove @hide for the new APIs for Allocation.CopyTo" 2015-03-27 00:35:31 +00:00
Michael Runge
9e3976b6fe am 9a91bf1d: am 96f47f5b: am b0197033: Increase timeout when uncrypting OTA
* commit '9a91bf1d18d3855b4bdaaa613fa10372da6e530e':
  Increase timeout when uncrypting OTA
2015-03-27 00:35:12 +00:00