PackageManagerService shouldn't check features that a package declares
that it uses because this will cause problems in the future when we add
more features that older phones didn't explicitly declare. We must rely
on markets to know about phones and filter them for us to avoid this
situation.
Bug: 3409434
Change-Id: I0d51b2de33d8110edc6824af4b5b8c901f96077f
This reverts commit 6c4d904851772313930f800ac7c323cf90c709bb.
Going with a different tactic that doesn't dump stuff on
PackageManagerService.
Bug: 3214719
Change-Id: I0bbeccf3c21d264deda4256eb53713d2c98284f4
Allow a non-epidited ignore-backoff op to pass through
an expidited backed off op.
To do this, I first refactored the complicated if statement:
if (best == null
|| ((bestSyncableIsUnknownAndNotARetry == syncableIsUnknownAndNotARetry)
? (best.expedited == op.expedited
? opRunTime < bestRunTime
: op.expedited)
: syncableIsUnknownAndNotARetry)) {
best = op;
bestSyncableIsUnknownAndNotARetry = syncableIsUnknownAndNotARetry;
bestRunTime = opRunTime;
}
Into a more readable:
boolean setBest = false;
if (best == null) {
setBest = true;
} else if (bestSyncableIsUnknownAndNotARetry == syncableIsUnknownAndNotARetry) {
if (best.expedited == op.expedited) {
if (opRunTime < bestRunTime) {
// if both have same level, earlier time wins
setBest = true;
}
} else {
if (op.expedited) {
setBest = true;
}
}
} else {
if (syncableIsUnknownAndNotARetry) {
setBest = true;
}
}
if (setBest) {
best = op;
bestSyncableIsUnknownAndNotARetry = syncableIsUnknownAndNotARetry;
bestRunTime = opRunTime;
}
The refactoring was all done automatically with IntelliJ to avoid human error
in the conversion.
After verifying this code still behaved as expected including the error
condition in the bug, I added handling for the cases when a non-expidited op
may override an expedited op if certain conditions occur, specificaly, if the
expidited op is backed off and the non-expidited op is not.
Finally, refactored to make it testable and added tests and logging.
Bug: 3128963
Change-Id: I131cbcec6073ea5fe425f6b5aa88ca56c02b6598
- save Wi-Fi configuration and restore it after the test, other tests
may need data connection
- Fix issue: reset dhcp after parsing a static IP setting.
bug: 3240713
Change-Id: I2158cab6fb6751414893b6a950d9e5bb20021645
- Add a XML parser to parse Wi-Fi configurations
- Add Wifi connection tests
- Fix issue: failure in setup will block the next tests.
call tearDown() if the test fails at setUp().
Change-Id: I1a380fa02ebc96b69165d1514da12df985224e8d
Add a method to the test utils which waits to accept a bonding request from
another device. This is identical to the pairing method except that it
waits for a remote pair request instead of initiating the pairing
request itself. Also, add a test method to the test utils.
Change-Id: I6391d03e9f33c040afd64d73083acfe3184251eb
Adding more detail to the output logging to help track down issues, fixing some
download completed notification counter flakiness and making reboot test more
robust, and reducing the number of concurrent downloads in testMultipleDownloads()
to 10. After talking with Vasu, this is probably more appropriate as it is
closer to typical usage scenarios, and as a side effect should trim some
time from the test runs. Large numbers of downloads will be left for stress
testing.
Change-Id: Ie337cfe9b8d27299d70553e39c60e241ff3afe66
Add address and iterations options to bluetooth pair stress test. Refactored
BroadcastReceiver into two receivers with one specific to pairing. The pairing
receiver checks that we are pairing with the correct device, and also will
accept the pairing dialogue/enter a predefined password automatically.
Change-Id: I9c5283f8e9747e8b0129b7400a6b1345e78e46eb
Switch to using PBKDF2 for the key generation for OBBs. Any previously
generated OBBs will stop being read correctly. A small pbkdf2gen program
is available to allow generation of appropriate keys with the salts.
Bug: 3059950
Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
Rearrange structure of MountService handling of OBBs to be entirely
asynchronous so we don't rely on locking as much. We still need the
locking to support dumpsys which has been improved to output all the
data structures for OBBs.
Added more tests to cover more of the error return codes.
Oh and fix a logic inversion bug.
Change-Id: I34f541192dbbb1903b24825889b8fa8f43e6e2a9
This will help legacy games that use dlopen() to directly access the
/data/data/<app>/lib directory before the
ApplicationInfo.nativeLibraryDir was part of the API.
Change-Id: Ie9f3e7239b6334708b5d086ffafe66a507f6d9da
Add some MountService tests that are based partially on some stuff done
in PackageManagerTests. This allows us to test the OBB changes in an
easy way.
Also, it found some bugs in the DefaultContainerService connection state
machine, so fix those while we're at it.
Change-Id: I18f38593be754eb32fb6e842f88eec47e2beefce
If a system app had a lingering native library in /data/data/<app>/lib,
it would prefer that over the one in /system/lib due to recent changed
in the Dalvik JNI class loading code.
To "fix" that we need to check if there are any native libraries in a
/data/data/<app>/lib directory for any non-updated system apps and
delete them during scanning.
Change-Id: If3a22e41a8531e9e5a44ba001dcea46253d47d45
This change introduces more detailed reporting of why downloads are paused in
the download manager.
First, it adds new, more detailed status constants in android.provider.Downloads
for when a download is paused, in place of the old catch-all
STATUS_RUNNING_PAUSED. I've eliminated some dead code there as well to ease the
change.
Second, in the public API, it changes COLUMN_ERROR_CODE to COLUMN_REASON, which
now reports useful info for STATUS_PAUSED in addition to STATUS_FAILED. It adds
some new PAUSED_* constants for reason values when a download is paused, and
adds code to generate these values appropriately.
Change-Id: Ie617d1c2c59357375e19466086923ace5e2fb122
Changing package at hackbod's request. I'll merge this manually, as
there's some additional master-only code that will be to be
simultaneously changed.
Change-Id: Ibb629ec1c31807fbee31e0193c6a941d04be0117
* improved documentation of the default destination on the download
cache and the concomitant consequences
* removed NETWORK_WIMAX flag for setting allowed networks
* changed request headers behavior to support multiple instances of
the same header (as allowed in the HTTP spec), renamed
setRequestHeader() to addRequestHeader()
* accept user-facing strings as CharSequences instead of Strings
* new convenience methods setDestinationInExternalFilesDir() and
setDestinationInExternalPublicDir() for setting a destination in
either shared or app-private external storage directories
* renamed setMediaType() to setMimeType()
Change-Id: I8781e2214d939c340209cab917bbbba264ab919c
PackageManagerTests was catching assertion errors and just spitting out
a generic "Hey, there was an error!" message. This eliminates that and
adds some expected outcomes in the assertions.
Change-Id: I27baa3c57c85b0cae4ea76aaf1e2a9b61b2c32b7
Merge commit 'ac3c1f550f30aa793ccf5dcd0da55b070fd55364' into gingerbread
* commit 'ac3c1f550f30aa793ccf5dcd0da55b070fd55364':
Add BT test instrumentation for reboot tests.
Methods in BluetoothTestUtils remain the same as they were in
BluetoothStressTest except for the constructor and close(). The constructor
is derived from setUp() and close() from tearDown().
Change-Id: Ifce16346f30eccdcc10ab846800e8a6fd2a24361
Methods in BluetoothTestUtils remain the same as they were in
BluetoothStressTest except for the constructor and close(). The constructor
is derived from setUp() and close() from tearDown().
Change-Id: I09f9637d3969c98e46cbde1d61bc6c3223aec7c1
* Add native library tests during package move
* Fix omission that let PackageSettings and ApplicationInfo get out of
sync.
Change-Id: Ic4958f971cb2c9cfd270522fdc120b4031c1124a