backup.
Bug: 144155744
This solves a bug which makes staged installs hang. This is
happening because when installing, the PackageManager is waiting for a response to be sent back from
the BackupManagerService after it finishes restoring. In the case of staged installs which happen at boot,
isUserReadyForBackup is false, so the method does nothing and the
PackageManager keeps on waiting on a response.
Test: 1) atest RunBackupFrameworksServicesRoboTests and atest AutoRestoreHostSideTest
2) Manual:
- Applied ag/9722795
- run `atest com.android.tests.rollback.host.StagedRollbackTest#testStagedInstallHang`
- The log file doesn't contain any "Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in handler on main thread (main)".
Change-Id: I294c309b0c7e5a9e12bdbd0c3fc4946767f91cee
This reverts I0f9ac456104759887c0410fe64acc32cab19b62b
And adds an additional check to only fallback handle the EXDEV
from paths on /storage
We are bringing back the interceptor because the implementation of
scoped storage in R uses a FUSE filesystem mounted on /sdcard with an
sdcardfs filesystem mounted on /sdcard/Android/<package> (for now,
just /sdcard/Android in Ic17a5751b5a94846ee565ff935644a078044ab06)
Test: atest
android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageRename
with FUSE enabled passes
Bug: 135341433
Change-Id: I7876bfe00890f24559576f260ba456afb07e9482
Pass the list of the keys excluded from KV restore to the backup agent to make it aware of what data has been removed (in case it has any application-level consequences) as well as the data that should be removed by the agent itself.
Bug: 145126096
Test: atest CtsBackupTestCases
Change-Id: I34415b149b379fb5bb67b0fbcd70ec9b9858acfe
Add DevicePolicyManager#setCrossProfilePackages and
DevicePolicyManager#getCrossProfilePackages. This provides admin consent
for apps that can ask for user consent to communicate cross-profile.
Some Javadoc can be improved once all CLs are in, since different APIs
should refer to each other.
BUG: 136249261
BUG: 144577776
BUG: 141690885
BUG: 145970297
TEST: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I3f931bb7c1d5e490d04e5450f3010465ed6a5dc6
Android has dual sim devices, which means multiple "phone" time
signals. NITZ is generally trusted and considered "good enough" in the
absence of better signals, but it is provided by carriers and it's not
unusual for the signals to be incorrect by minutes. We don't want the
device system clock just flicking to the latest signal received.
The changes to the SimpleTimeDetectorStrategy try to balance recency and
provide some consistency / determinism. See comments in the code for
details. The time zone detection works in a similar way, particularly
with respect to choosing the lowest phoneId in the event of a tie.
There will be a follow-up change to remove the word "Simple" from
SimpleTimeDetectorStrategy as it no longer applies.
Test: atest services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java
Test: atest android.app.timedetector
Bug: 140712361
Change-Id: I228aff8709eabfcec910af22f7ab08fee32d566a
Sometimes the test fail because activity starts for more than 5
seconds, and it seems only happen when calling startActivitySync
and running for split screen tests.
If there are two activities A and B are running in the same
process. Consider the following sequence:
1. Start ActivityA then move it to primary split screen.
2. Start ActivityB with startActivitySync, it would launched on
second split screen and wait for enter animation complete.
3. Resume ActivityA naturally, but since ActivityB is blocking mSync
in waitForEnterAnimationComplete, performResume for ActivityA would
waiting for mSync on main thread.
4. Animation complete, scheduleEnterAnimationComplete for ActivityB,
however ENTER_ANIMATION_COMPLETE cannot be executed due to main
thread was blocked.
The deadlock occurs until mAnimationCompleteLock timeout.
Note: There is also another case where the first activity is started
more than 5 seconds at the beginning of the test.
Bug: 127741025
Test: atest ActivityThreadTest
Test: atest android.server.wm.lifecycle
Change-Id: I8b4fe44f962dd31d130ee6b38dabf6e0c90b4060
* changes:
statsd: Allow wifi mainline module to log its metrics
wifi-services-srcs: Stop using KeyValueListParser from android.internal
WifiNetworkSuggestion: Don't store packageName/uid
WifiAwareManager: Add requestMacAddresses @hide API
UserManager: Add StringDef for all restrictionKey values
WifiActivityEnergyInfo: Use time values for energy calculation
Previously, these APIs did not support explicitly querying the parent profile.
This CL allows the WP DPC to now call these methods, which means the WP DPC
can disable the camera device-wide and not just for the WP.
Bug: 138709470
Test: manual testing using Personal and WP TestDPC and Camera
atest com.android.cts.devicepolicy.ManagedProfileTest
atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: I7e7ce7be766850c6e2f58c72a0a44990817e9b73
Time has come that we can finally ditch untrusted password reset i.e.
changing lockscreen password without providing the existing password or
an activiated password reset token. In this change, we are:
1. Preventing any DPC / legacy device admin from invoking
DPM.resetPassword(), the primary route to invoke untrusted password
reset. Depending on their target SDK level, resetPassword() will either
throw SecurityException, or fail silently.
2. Still allowing privilleged app holding RESET_PASSWORD permission to
call this API, but it's limited to setting a new passowrd on an
unsecured device.
3. Removing synthetic password caching mechanism in LockSettingsService,
whose sole purpose was to support untrusted password reset.
Bug: 137939224
Test: atest com.android.server.locksettings
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Change-Id: Ie3e5e277984b6fc2f1d378880363028752bad775
DDM APNM currently only reports the application/process name. For
services that need to know the underlying package name, those
services need to manually resolve the process's UID and map it to
the package name via the shell - a slow and error-prone process.
This change adds the package name to the APNM packet so users of
newer versions of DDMLib can directly get the package name.
Test: manual
Change-Id: I92517d5bb641cc263c0d58db667b00e67fc5e58b
Based on API council feedback for the recently added
hasUserRestrictionForUser API.
Bug: 144924593
Test: Compiles
Change-Id: Ib78c334d48a57c2e97f8f1b29d7d663d3eb2f1c1
This implementation continue to uses libbinder, as opposed to
libbinder_ndk.
We also move many (but not all) statsd aidl files from
frameworks/base/core into the apex.
Test: m -j128 && bit statsd_test:*
Change-Id: I95f06e937e50c1e2a638163b13587682402956a7
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.
This CL adds 2 public method:
- Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.
If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.
- Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.
Bug: 135116095
Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native
Change-Id: Id09160ba1513fef4dac979162bcda3bfeaace0e6
Adding @hide public methods to commonly subclassed classes like Activity
is never safe, as they can clash with existing methods in apps. Moving
@hide interface implementations into an inner class avoids the need to
add new @hide public methods in many cases.
Bug: 144361565
Test: Build, flash, boot device.
Change-Id: Ie8459c5a542e6ff4058d4ce783e27ebcf9c41dbb
StatsManager used to synchronize on "this", which is dangerous because
an app can get StatsManager and also sychronize on it, which would block
all calls. We now lock on a private final object.
Test: make
Bug: 144315658
Fixes: 144315658
Change-Id: Ia34b1c586b09a48b244cc16dba77fe54e81f62cf
- Send intent (android.internal.intent.action.BUGREPORT_REQUESTED) to bug report handler app after pressing Bug Report Shortcut
- Add config "config_bugReportHandlerEnabled" to enable this feature
- Add config "config_defaultBugReportHandlerApp" to get the package of default bugreport handler app
- Add settings CUSTOM_BUGREPORT_HANDLER_APP to get the package of custom bugreport handler app
- Add settings CUSTOM_BUGREPORT_HANDLER_USER to get the user id of custom bugreport handler app
BUG:142921485
Test: After pressing Bug Report Shortcut in manual local test:
- the intent can be sent to bugreport handler app.
- the intent can be sent to Shell if the chosen and the default bugreport handler app can't handle it.
- the intent can be sent to system user profile's default bugreport handler app if the custom profile(like work profile) is removed.
Change-Id: Idc33b47f0cc65b90cbf648bda54a1d900fef007a
and revokeDefaultPermissionsFromLuiApps from PermissionManagerService to
Permmission Manager
Bug: 142019744
Test: Build
Change-Id: Ic39e1a66b650e7969242eb2116f342de488b1ca6
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.
Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f