If permission review is enabled toggling bluetoth on or off
results in a user prompt to collect consent. This applies
only to legacy apps, i.e. ones that don't support runtime
permissions as they target SDK 22.
Also added a configuration resource which controls whether
permission review mode is enabled. By default it is not and
an OEM can change this via an overlay. For now we also keep
the old mechanism to toggle review mode via a build property
which is still used and will be removed when clients have
transitioned.
bug:28715749
Change-Id: I94c5828ad6c8aa6b363622a26ff9da4fc2e2fac7
(cherry picked from commit ac69be543f89ea6e9a27204492e0a170d9b3450e)
This new command is used to attach runtime agents to a running application:
attach-agent <PROCESS> <FILE>
Attach an agent to the specified <PROCESS>,
which may be either a process name or a PID.
Test: m test-art-host, manual testing:
. invalid syntax, missing arguments
. invalid syntax, extra arguments
. invalid numeric PID
. invalid process name
. valid process, not debuggable
. valid process, missing agent
. valid process, valid agent
Bug: 31682382
Change-Id: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6
Adds reporting of connect events including netId, destination IP address,
destination port, uid and connect latency.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.
Test: for now just the benchmarking, in the future CTS
Bug: 29748723
(cherry picked from commit 965894eeb90c13255b5559b925d13fd22528f8cb)
Change-Id: I0c563f26ac39a7e1870153f30d073fc7d0006abc
This adds hostname, array of addresses, total count of IP addresses
and uid to the existing pipeline.
Currently ignores the new data it receives, further work will be
done in the subsequent CLs.
Test: for now just the benchmarking, in the future unit and CTS
(cherry picked from commit 14c9d2d0df7fab2b0470c3c404f600d87d4f0f93)
Bug: 29748723
Change-Id: Ice7db208282934e74f0e1808ffbae96d476c4216
Check that we tolerate various dependencies not being available.
Bug: 31946071
Test: These are tests
Change-Id: Ic0a9cd6f255ba9ff4c774dee640df1a0bdf8dc39
Symptom:
System crash by NPE is observed on ActivityStarter
during phone boot-up.
Detail and sample:
ActivityStarter has possibility to be called itself recursively
by calling TaskRecord$performClearTaskLocked().
Then class variable of mReusedTask is initialized to null
after the call, because the recursive call isn't guarded by
synchronized block.
Then NPE crash occurs on next statement.
Solutions:
Avoid to use the class variable on null possibility statement.
Bug: 32361138
Change-Id: Iaea3e066a6f7134fcae4338ff864bb236241194c
Symptom:
Even though one process is executing one BroadcastReceiver,
it may be killed as one EMPTY process occasionally
Detail and sample:
https://code.google.com/p/android/issues/detail?id=221524
Root cause:
app.curReceiver can only remember the last running.
If an application is both receiving FG and BG broadcast,
when one is finished, app.curReceiver becomes null,
the state of application becomes EMPTY.
Solution:
save all running receivers at ProcessRecord
Change-Id: I01b8813af652a8c434be7de0678dc06f99831ae0
Signed-off-by: yangzhenyu <yangzhenyu@xiaomi.com>
If a device isn't voice capable, it shouldn't show the emergency
option.
Test: use tablet which isn't voice capable, insert indian sim and
make sure no emergency option is displayed in global actions.
Bug: 31953703
Change-Id: I351e87320f3ffec76d1c1fc5aac78e5c48c0ac54
cherry-picked from b07f1409045091476e5296f9b0dd41c8712fe49a
Before attempting to retrieve a carrier entitlement setting, first make
sure we have a carrier config manager and if we do have a carrier config
manager, the config it holds is not null.
Bug: 31929638
Test: unittests coming in follow on CL
Change-Id: Iee476c476cb3de109cdccbd955b7fb986dd4267b
Added a service that listens whether emergency affordances
are necessary.
If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.
Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
Starting activity failed and the mFocusedActvity become null,
consider this condition when adjust focus.
Because in this condition, the focus mismatch between
ActivityManagerService#mFocusedActivity and
InputDispatcher(inputfilnger)#mFocusedApplication, ANR may occur.
Test: monkey test 48h with no ANR
Change-Id: Id1a2bf0d6ca6530e34443d359fbe2aa6c11b878c
This adds a new init-spawned daemon, webview_zygote, that starts a JVM and
acts as a zygote process for WebView isolated_app services.
Test: m
Test: angler boots
Test: Turn on Settings>Developer>Multiprocess Webview. webview_zygote32 or
webview_zygote64 start (requires dependent CLs).
Bug: 21643067
Change-Id: Ida98bd04b4d77736b672b03af651c4eb97ce88c1
The original logic cuts down the mShownPosition, causing 1 pixel offset,
sometimes this will cause flash.
To fix this, Use Math.round() instead.
google issue:
https://code.google.com/p/android/issues/detail?id=224185
Change-Id: I8a2fe55a2df6eaa9eda4ba78966a74ea492ab8ea
We call uncrypt services to setup / clear bootloader control block (BCB)
for scheduling tasks under recovery (applying OTAs, performing FDR).
However, we cannot start multiple requests simultaneously. Because they
all use the same socket (/dev/socket/uncrypt) for communication and init
deletes the socket on service exits.
This CL fixes the issue by a) adding synchronized blocks for the service
requests; b) checking the availability of the socket before initiating a
new one.
Note that adding synchronized blocks to RecoverySystem doesn't help,
because the calls could be made from different processes (e.g. priv-app,
system_server).
Bug: 31526152
Test: FDR works while a priv-app keeps calling clear BCB.
Change-Id: I95308989e849a9c98a9503ac509f2bc51ed3de19
https://code.google.com/p/android/issues/detail?id=223731
It is possible that an activity in pending launches be resumed while
it's package was stopped by some other reason, like uninstall pkg.
Merged-In: I130ded89cee162aa59ac2bf330f026e49e16ef69
Change-Id: I130ded89cee162aa59ac2bf330f026e49e16ef69
Signed-off-by: liulvping <liulvping@xiaomi.com>
* changes:
OtaDexopt: Fix after-ota space measure
OtaDexoptService: Add tron logging
OtaDexopt: Downgrade apps when low on space
Installer: Support delete_odex command
Package Manager: Sort list of packages to dexopt
Actually measure the available space.
Bug: 31458900
Change-Id: I16ecee6c275229bc21e908b88b24152484025bc8
(cherry picked from commit 8d1d2ab5b94f011ed611259df387391f1a1fe60f)
When running low on space, attempt to "downgrade" apps to lower
states in the optimization flow to free up space before starting
the OTA.
Bug: 31347757
Change-Id: I3a44b106b83d86d7290f4c557267b319f28de12a
(cherry picked from commit dab38e000436bf8234955b0333eaecf389e65b6f)
Add support for deleting odex files.
Bug: 31347757
Change-Id: I29bca8751bcee8d6981c682fbbc816c73b78ac68
(cherry picked from commit e5fedb95761fbffbd80200440f32e99e0d8c6f90)
Sort the list by last-use-time, if available. Interleave the
dependencies with the packages.
Clean up the code a bit for better code reuse and ease of writing
filters.
This should help with prioritization under space constraints.
Bug: 31347757
Change-Id: Ia0ec62faf013a379dc4c80b18fd6b2bfbfa470c4
(cherry picked from commit d3e07d46d41e8411def67c2150a0bae064e900dc)
Log the error code to uncrypt_status if uncrypt gets killed because
of timeout.
Test: We log the error code correctly in uncrypt_status when uncrypt timeouts.
Bug: 31603820
Change-Id: Ia623c333714295e68f4269257fbb4297a867e42b
A template fingerprint data is not loaded in fingerprintd when
fingerprintd is died and restarted.
FigerprintService tries to set userId after a restart of fingerprintd,
but it's skipped because the service tries to set same userId already
set to mCurrentUserId.
To load correct template fingerprint data, reset mCurrentUserId
when fingerprintd died.
Bug: 31734514
Change-Id: I0d3452fc6c1f82bb2a2af10f61d3f3a47df9dec6
Add a missing call to remove all MESSAGE_BIND_PROFILE_SERVICE
message when unbinding and finishing.
Bug: 31442739
Test: manual, and "frameworks/base/core/tests/bluetoothtests" unit tests
Change-Id: I7e9a8f79a38d4eb8ab8b53be04650226fc72732e
If a package with sharedUserId had been setInstalled
with false, then the result of getPackagesForUid()
should not include it.
https://code.google.com/p/android/issues/detail?id=212255
Change-Id: I7b984051db34ecc2d0ef9518786d51100ab9ac79
Signed-off-by: liulvping <liulvping@xiaomi.com>
A restarted process will reuse original process record.
If only reset KilledByAm flag, not reset Killed flag.
When app process have been killed by AMS can skip unnessary ANR,
but not catch lowmemorykiller in AppErrors.appNotResponding()
Change-Id: Ie4653edf4252797eaeefbf9a4a35ac00cfa857d8
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>
The service will be extended to include listening for connect events as well.
Test: this is just a renaming change
Bug: 29748723
Change-Id: I4e50e24d1bfb0b5ead4010cc7df3434d38b753d8
Calling untether() on an interface name leaves the system
in an inconsistent state, since this is an API for use by
network subsystems to start or stop the tethering of a prepared
downstream network interface. The proper way to disable tethering
is to call stopTethering() with an appropriate technology.
untetherAll() is called in parts of the system UI to disable
all tethering on system state changes (e.g. on the enabling
of data saver).
Bug: 31405407
Test: Enabling data saver now correctly disables tethering
Change-Id: I8e5724a31e015721910a8d278e100daf697c34d7
No longer do this in ConnectivityService#tether/untether.
Instead, have Tethering do it when an interface is actually
tethered.
Bug: 31405407
Test: Toggling hotspot now disables data saver
Change-Id: I9910a2e488c30c92d45f817c8f5df0fac5510de6
When AlarmManagerService is broken, starting the framework fails in
weird and inconsistent ways. So if we detect your kernel is missing the
required timerfd support, give up immediately and explain why.
Bug: 28357356
Test: manually break timerfd_create syscall, check adb logcat during boot
Change-Id: Iaa153fca38e9cd8e801f3e71c3e1ae2351907828
Signed-off-by: Greg Hackmann <ghackmann@google.com>
We've removed the Android alarm driver from our supported kernels. It's
time to remove the userspace callers too: they make the native side of
AlarmManagerService more complex, and send the wrong signal about
/dev/alarm still being supported.
Bug: 28357356
Test: cts-tradefed run singleCommand cts -d -c android.app.cts.AlarmManagerTest
Change-Id: I619e2d8a98e4c4728131a2d826b1295f858abedd
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Setting the WiFi network interface up or down is racy because it
is not synchronized with the WiFi components managing the interface.
This causes a problem for hostapd when the interface is marked down
before hostapd starts because it causes the driver to enter the
de-initialization process. hostapd does not know how to react to this
change of events.
Bug: 31205821
Test: bug no longer reproduces on upcoming devices, unit tests pass
Change-Id: I96938e2aef89b400593d42ce1b0a6ccc2d2e5754
When app process been killed by AMS or lowmemkiller just before ANR report,
because process record info has been cleared after received death recipient,
it also cannot dump trace log because process already dead,
so report ANR & show ANR UI to let user wait seems is unnecessary.
(compare normal ANR case, if kill app process by command,
ANR dialog will also dismissed, it seems reasonable.)
To check above condition, if ANR process record killed set as true,
it means process already dead & can skip report this ANR.
Change-Id: I483cb02bacb10c32db80ca1097310b02abbac24d
frameworks/base/core/jni/android_text_StaticLayout.cpp does actually use
ScopedIcuLocale, so I've left that for now.
Change-Id: I6458cd133871281a747a9da2e304da10b445051a