The comment for the PHONE pattern says:
"<digit><digit|sdd>+<digit>"
But the actual pattern requires that the string contains
more than that. A phone number should be allowed to be
three digits.
Change-Id: I86d2f3d634cd0c1654dad9814906f151055dc23a
-- In environment where there are too many APs, sometimes, the AP will not show in the scan list.
Part of the reason is due to the change that the scanning on each frequency is shortened to save power.
to avoid that, change the test to connect without scanning.
-- Increase the timer to wait for WiFi to be connected
Change-Id: If1a72607b3c7ad13dbbf788607665986eaf5b6b3
Many media files and source code files were marked as executable in Git.
Remove those.
Also a shell script and python script were not marked as executable.
Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
- Disable lock screen after screen is turned on.
Without disabling lock screen, device will screen off automatically after around 10 seconds
- Add a longer timer for ping test when the data traffic is stalled.
For a short ping test, it is hard to tell whether it is a transient issue or a real issue.
bug# 7426823
Change-Id: If1a560e11dcdff519562bb2a22651d1fd523b5a2
Amazingly, some apps still don't use the nativeLibraryPath. So add a lib
symlink for non-primary users to fix that.
Also, there was an error when the symlink existed that it would give up.
This shouldn't really happen, but in that case, just remove it and
create a new one to be safe.
Also, move the downgrade code to the appropriate place. This downgrade
case triggered the above symlink existing bug.
Bug: 7318366
Bug: 7371571
Change-Id: Ia175b36d98f00bdc2f2433b909aafd524eb34d15
RegisteredServicesCache is used to track account authenticators and
sync adapters, which can vary based on user. This change requires
that callers now provide a userId when making cache requests. It
continues persisting into a single file for now, which is keyed based
on UID.
It now watches for package broadcasts from all users, and scans
packages on-demand. It changes cache callers to provide a relevant
userId, and evicts cache entries when users are stopped.
Changes SyncManager to only work with accounts from running users,
only kicking off pending syncs once a user is started.
Bug: 7276595, 7316150
Change-Id: I79466a84aa69aa37e4bd9691c5d6221d3662ff29
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.
Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:
1. When sending paths to DefaultContainerService, always scope
OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
visible to root.
3. Always use the original untouched path when talking with apps.
Mount OBB containers using shared app GID, so that an app can read
the mount point across users.
Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService. Move tests to servicestests, and
add tests for new path generation logic.
Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
Also fix a bunch of system services that should be doing this. And
while doing that, found I needed to fix PendingIntent to evaluate
USER_CURRENT at the point of sending, not creation.
Note that this may end up with us having some notification shown to
non-primary users that lead to settings UI that should only be for
the primary user (such as the vpn notification). I'm not sure what
to do about this, maybe we need a different UI to come up there or
something, but showing the actual notification for those users at
least seems less broken than not telling them at all.
Change-Id: Iffc51e2d7c847e3d05064d292ab93937646a1ab7
Settings.Global namespace. Also run as a system app, since only system
apps can change airplane mode.
Change-Id: I317f9c94361cfca182356fd292e5b0b41553d1ab
When a user is removed, migrate all network stats belonging to that
user into special UID_REMOVED bucket. Also removes those stats from
kernel to avoid double-counting if another user is created.
Bug: 7194784
Change-Id: I03f1d660fe3754566326b7749cae8068fc224ea9
Callers with INTERACT_ACROSS_USERS_FULL permission can now observe content
for a given user's view (and can notify content uri changes targeted to a
specific user). An observer watching for UserHandle.USER_ALL will see all
notifications for the given uri across all users; similarly, a notifier
who specifies USER_ALL will broadcast the change to all observers across
all users.
The API handles both USER_ALL or USER_CURRENT, and explicitly forbids
any other "pseudouser" designations.
This CL also revs the Settings provider to notify with USER_ALL for
changes to global settings, and with only the affected user's handle
for all other changes.
Bug 7122169
Change-Id: I94248b11aa91d1beb0a36432e82fe5725bb1264f
Send package name, version code and the uid of the application requesting the
install to package verifiers.
Bug: 7164155
Change-Id: I2464dc5d4551f60b4f38f7982495a8920c83e1cd
Oops. Stacked bugs: first, the desired user handle was not properly
being passed from the call() entry point to the database operations;
then on top of that, the client-side cache management was still
looking in the local user's cache for the data, so a request to read
a different user's settings would return the local user's instead if
that key was already known to the local user's cache.
Reads and writes of a different user's settings are now uncached,
so they're relatively much slower. They're rare, however, so this
is not something to worry about unless we encounter a real world
case where it's a significant factor.
This CL also adds a bit of cross-user settings read/write testing
to the existing provider suite. These new tests caught both the
known wrong-user-write bug and discovered the client-side cache
bug, so yay.
Finally, the existing wholesale mutual-exclusion approach would
deadlock in certain circumstances due to the fact that the
settings database creation code might have to call out to the
Package Manager while populating the bookmark/shortcut table,
and the Package Manager would then call back into the settings
provider in the course of handling that request. The synchronization
regime has been significantly tightened up now: now the database
code [which is known to deal with concurrency itself] is allowed
to cope with multiple parallel openers of the same db; this
allows the settings provider to avoid calling out to other parts
of the system even implicitly while its internal lock is held.
Change-Id: Ib77d445b4a2ec658cc5c210830f6977c981f87ed
A header view that was scrolled off screen using the DPAD would not be
reattached properly when scrolled back into view, due to the flag
recycledHeaderFooter. Solved this by using detachViewFromParent()
instead of removeViewInLayout(). Compare to
AbsListView.trackMotionScroll().
Change-Id: I0ac0ec0f9bf23bc62430c1f62ae7d1a8570b0a24
Quick Settings and global actions (aka longpress-Power) toggles are
included in this CL. The Settings app manipulations are updated in
a different CL because that's a different git package.
Bug 7132230
Change-Id: I50838f5e8d7b25a750d2bcae90bf384b09816dbb
Instead of unpacking libraries into /data/data/<appname>/lib, unpack
them into /data/app-lib so that multi-user applications can use the same
libraries.
Change-Id: I636dafb5a9eea8cf5a41f1360698e7695455f385
In order to make sure we have unpacking and deletion working, add a fake
JNI library to every APK.
This can be expanded in the future to make sure replacement is working
correctly as well.
Change-Id: I1ad04c61df9518429aa17795b8a9d3608791cd8e
Make sure that native library paths have the correct permissions and
owners. Also make it easier to do a "String#startsWith" test so we can
get better errors when it fails.
Change the observer to have more sane semantics with a CountDownLatch
instead of weird synchronization on a local variable.
Change-Id: I2437e5ea886d6e6cb8b4edeab80d6053b79857d4
Change all the test method headers to throw Exception so we don't have
to try to catch anything during the tests. Catching an exception might
mask an error during the tests.
Also fix a lot of formatting errors that have built up over the years.
This includes 3-space indentations instead of 4-space, missing spaces
between braces and parens, too-long lines, wrapping when it isn't
needed, etc.
Change-Id: Ifccea5f0706b6f9235f37974a5f80bee76c654dd
installd was not creating a compatibility symlink when
installing a forward locked application. Fix.
Bug: 7121527
Change-Id: Ied507ab2b759d8658af563e6ac8f0dbb0d286cce
Replaced all remaining places that used it with explicit user
specification.
While doing this, I ran into stuff that was creating PendingIntent
objects (that now need to specify the explicit user they are for),
which are also posting notifications... but have no way to specify
the user for the notification.
So the notification manager in the system process now also gets a
formal concept of a user associated with the notification, which
is passed in to all the necessary aidl calls. I also removed the
old deprecated aidl interface for posting/cancelling notifications,
since we now always need a user supplied.
There is more work that needs to be done here, though. For example
I think we need to be able to specify USER_ALL for a notification that
should be shown to all users (such as low storage or low battery).
Along with that, the PendingIntent creation needs to be tweaked to
be able to handle USER_CURRENT by evaluating the user at the point the
pending intent is sent.
That's for another change, however.
Change-Id: I468e14dce8def0e13e0870571e7c31ed32b6310c
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.
Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.
New Context APIs for more kinds of sending broadcasts as users.
Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.
Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.
Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
This add a new per-user state for an app, indicating whether
it is installed for that user.
All system apps are always installed for all users (we still
use disable to "uninstall" them).
Now when you call into the package manager to install an app,
it will only install the app for that user unless you supply
a flag saying to install for all users. Only being installed
for the user is just the normal install state, but all other
users have marked in their state for that app that it is not
installed.
When you call the package manager APIs for information about
apps, uninstalled apps are treated as really being not visible
(somewhat more-so than disabled apps), unless you use the
GET_UNINSTALLED_PACKAGES flag.
If another user calls to install an app that is already installed,
just not for them, then the normal install process takes place
but in addition that user's installed state is toggled on.
The package manager will not send PACKAGE_ADDED, PACKAGE_REMOVED,
PACKAGE_REPLACED etc broadcasts to users who don't have a package
installed or not being involved in a change in the install state.
There are a few things that are not quite right with this -- for
example if you go through a full install (with a new apk) of an
app for one user who doesn't have it already installed, you will
still get the PACKAGED_REPLACED messages even though this is
technically the first install for your user. I'm not sure how
much of an issue this is.
When you call the existing API to uninstall an app, this toggles
the installed state of the app for that user to be off. Only if
that is the last user user that has the app uinstalled will it
actually be removed from the device. Again there is a new flag
you can pass in to force the app to be uninstalled for all users.
Also fixed issues with cleaning external storage of apps, which
was not dealing with multiple users. We now keep track of cleaning
each user for each package.
Change-Id: I00e66452b149defc08c5e0183fa673f532465ed5
Introduce API to get per-user storage information, keep track
of services associated with users, and various small cleanup.
Change-Id: I5d4e784e7ff3cccfed627d66a090d2f464202634