- May 14, 2024
-
-
guangkui.ren authored
mLatch.notifyAll() will not help wake the thread which is blocked by mLatch.await, instead, it will cause system server crash. So, mark state as failed if any package is failed to be deleted, and let mLatch.countDown work until it comes to 0 and wake the thread blocked by await. Bug: 333845008 Change-Id: Ida1c3c128ddef376aaaacda1358717d0d4e9ca8b
-
- Apr 30, 2024
-
-
Ellen Arteca authored
This reverts commit eec02e9f. Reason for revert: Investigating b/338122208, this CL causes an error. Change-Id: I7bb87951011d6bda957efc776bb67bb938d8cdb5
-
- Apr 29, 2024
-
-
Ellen Arteca authored
This CL adds try-with-resources around LockscreenCredential objects, in order to call `close()` when the resource is done being used. This also clears the LSKF `byte[]` representation in the LockscreenCredential. This CL applies the above changes to the DevicePolicyManagerService. Bug: 320392352 Test: build Change-Id: Iad642dd4706ae052affc2f9ac6d6f0695870728d
-
- Apr 25, 2024
-
-
Eric Biggers authored
Since the class 'android.security.KeyStore' is going away, the UID_SELF constant is being moved to a more appropriate location in KeyProperties. Update code that references this constant to use the new location. No change in behavior; the value of the constant remains the same. Bug: 326508120 Test: build Flag: NONE mechanical refactoring with no behavior change Change-Id: I86aa1add526a9eb45bb89a73cc18bb54ba3496c3
-
- Apr 15, 2024
-
-
Jeongik Cha authored
It could be null if there is no metadata in AndroidManifest.xml Bug: 333859398 Test: CtsAdminPackageInstallerTestCases Change-Id: Ic3f6a17fab917d10bce57b59b709a1d388959148
-
- Apr 05, 2024
-
-
Ronald Braunstein authored
See parent cl: aosp/3028633 Test: atest -p cmds/locksettings:postsubmit Test: atest -p services/core/java/com/android/server/locksettings:postsubmit Test: atest -p services/devicepolicy:postsubmit Change-Id: I6d0d0320e0bf8927f9b8b27b471ae58ace56124a
-
- Mar 06, 2024
-
-
Kangping Dong authored
This commit add missing policy configurations for DISALLOW_THREAD_NETWORK. See background go/ae-v-thread-admin-control Test: atest CtsDevicePolicyTestCases:android.devicepolicy.cts.ThreadNetworkTest Bug: 319079428 Merged-In: I90ea527f5352d4ff11248acf8c985321620daa19 Change-Id: I90ea527f5352d4ff11248acf8c985321620daa19
-
- Feb 20, 2024
-
-
Kangping Dong authored
There are two Thread flag files in frameworks/base and packages/modules/Connectivity/thread. Both are currently using the same "com.android.net.thread.flags" package name for their flags. While all flags needs to be built in a aconfig_declarations target, two aconfig_declarations can't have the same package name: ``` FAILED: out/soong/build.aosp_arm.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_arm.variables -o out/soong/b uild.aosp_arm.ninja --globListDir aosp_arm --globFile out/soong/globs-aosp_arm.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_arm.build Android.bp 2 aconfig_declarations found for package com.android.net.thread.flags ``` To resolve this issue, this commit renames the platform flags to package name "android.net.thread.platform.flags". This commit is required by ag/26286387 Bug: 325886480 Merged-In: Icacf88f7c0aa499b4b29f4072ae58840f0b1761f Change-Id: Icacf88f7c0aa499b4b29f4072ae58840f0b1761f
-
Kangping Dong authored
(This is a cherry-pick of aosp/2968526 for resolving merge conflicts) There are two Thread flag files in frameworks/base and packages/modules/Connectivity/thread. Both are currently using the same "com.android.net.thread.flags" package name for their flags. While all flags needs to be built in a aconfig_declarations target, two aconfig_declarations can't have the same package name: ``` FAILED: out/soong/build.aosp_arm.ninja cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" --soong_variables out/soong/soong.aosp_arm.variables -o out/soong/b uild.aosp_arm.ninja --globListDir aosp_arm --globFile out/soong/globs-aosp_arm.ninja -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.aosp_arm.build Android.bp 2 aconfig_declarations found for package com.android.net.thread.flags ``` To resolve this issue, this commit renames the platform flags to package name "android.net.thread.platform.flags". This commit is required by ag/26286387 Bug: 325886480 Merged-In: Icacf88f7c0aa499b4b29f4072ae58840f0b1761f Change-Id: Icacf88f7c0aa499b4b29f4072ae58840f0b1761f
-
- Jan 25, 2024
-
-
Kangping Dong authored
Define UserManager#DISALLOW_THREAD_NETWORK and add mapping to permission MANAGE_DEVICE_POLICY_THREAD_NETWORK Bug: 319044650 Change-Id: I6a05dc8ee3c78e35173d256ea5134d24de34d5e8
-
- Dec 13, 2023
-
-
Pavel Grafov authored
This CL is a refactoring for the follow-up implementation and shouldn't change any behavior. It changes the data types and signatures to allow expressing cross-profile suspension and refactors the code to make adding a flagged functionality change easier in a follow-up. Some changes only make sense in that contex. String package is replaced with UserPackage, which encapsulates both suspending user id and suspending package. In this CL suspending user id is always the same as target user id, so suspension is never cross user. Some userId arguments were renamed to make it clearer whether it refers to the suspending user or the target user. Brief doc: go/ae-xu-suspend Also inline setPackagesSuspendedByAdmin into PMII Bug: 263464464 Test: atest PackageManagerSettingsTests Test: atest PackageUserStateTest Test: atest com.android.server.pm.SuspendPackageHelperTest Test: atest CtsSuspendAppsTestCases Test: atest WmTests:ActivityStartInterceptorTest Change-Id: I71a4c524fb22fc3d3e0c64fd0b984ea44423b5d8
-
- Dec 05, 2023
-
-
Rubin Xu authored
Before this fix, the framework use one single integer to track screen capture disabled policy across the device. This can be either a real userId, or the symbolic USER_ALL or USER_NULL for all users or no user. This has the problem that it can't represent policies from more than one admin (or policies from both the admin and its parent). In addition, due to the way DevicePolicyManagerService refreshes policies, when a non-managed user is started, its default policy state overrides any existing policy, causing screen capture to be no longer disabled. Fix this by properly tracking the policy for each user in an set. We still use USER_ALL in the set to represent screen capture being disabled for all users. In Android 14, the screen capture logic is migrated to policy engine which already contains this fix. Bug: 305664128 Test: ScreenCaptureDisabledTest Test: FrameworksServicesTests:DevicePolicyManagerTest Test: DevicePolicyManagerServiceMigrationTest Test: MixedDeviceOwnerTest#testScreenCaptureDisabled_assist MixedProfileOwnerTest#testScreenCaptureDisabled_assist MixedManagedProfileOwnerTest#testScreenCaptureDisabled_assist Test: MixedManagedProfileOwnerTest#testScreenCaptureDisabled_assist_allowedPrimaryUser Test: MixedDeviceOwnerTest#testCreateAdminSupportIntent MixedProfileOwnerTest#testCreateAdminSupportIntent MixedManagedProfileOwnerTest#testCreateAdminSupportIntent Merged-In: I9da7b026e937a9e729777b4de613b319a4084418 Change-Id: Ib016b740927003f8bd81992f24c722c29ac723b5
-
- Nov 10, 2023
-
-
Elis Elliott authored
Fixes: 307233716 Test: btest a.d.c.DeviceOwnerTest Change-Id: I8ca1b79b261a421c7f96acce7b4dda50187b8540
-
Elis Elliott authored
Fixes: 306267638 Test: btest CtsDevicePolicyTestCases Change-Id: Id9b3ef766a5c107768b9fbc44a6768f8288090f7
-
- Nov 07, 2023
-
-
Muhammad Hasan Khan authored
Instead of checking for Build.IS_ARC use an injector property. Bug: 301629133 Test: m Change-Id: Ie847107bd48244182096198a834fc840480c6c69
-
- Nov 02, 2023
-
-
Pavel Grafov authored
Most of the change just deleted dead code - the flag for the feature has been hard coded as false and could only be manipulated via TestAPI that was only used in already disabled tests. To support upgrades from builds that had the feature turned on, this CL preserves the functionality of unsuspending work apps during boot if necessary. For that the now removed SPH.setPackagesSuspendedForQuietMode is functionally inlined into DPMS code. Bug: 306606563 Test: btest a.d.c.QuietModeTest Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest Test: atest SuspendPackageHelperTest Test: atest CtsSuspendAppsTestCases Test: atest WmTests:ActivityStartInterceptorTest Test: manual, OTA from early U build with the feature enabled Change-Id: Ib9d749348f9b75b472aad479ad5eb9fff608f71b
-
- Oct 27, 2023
-
-
Ilyas Sung authored
Bug: 304999634 Test: atest android.devicepolicy.internal.DumpSysTest Change-Id: I7a7615dc3225c76433f63b0a939544cc80f18cfc
-
- Oct 26, 2023
-
-
Kholoud Mohamed authored
Fixes: 307585321 Test: atest android.compat.sjp.cts.StrictJavaPackagesTest#testBootClasspathAndSystemServerClasspath_nonDuplicateClasses Change-Id: Ied1f9743d3ee9af68b83b1a9ed258247971f8cd9
-
- Oct 20, 2023
-
-
Pavel Grafov authored
Reading flags no longer requires READ_DEVICE_CONFIG, so there is no need to wrap access in Binder.withCleanCallingIdentity(). Bug: none Test: TH Change-Id: I43eb2e18860ac87907b1b79b3906d9f81bf9c078
-
- Oct 18, 2023
-
-
Kholoud Mohamed authored
And flagged a testAPI constant that wasn't flagged Bug: 304478555 Test: Build succeeds Change-Id: If36f52cf3e8db4638b5c9eb08df9d3a44ef4a625
-
- Oct 17, 2023
-
-
Ayush Sharma authored
Bug: 210537972 Test: NA (cherry picked from commit a93b4fdf) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:82e838218f45e0af3365f3b5fe4d6346b8ad7a41) Merged-In: If2f41aea48ac9284ad205debb878d633072431f4 Change-Id: If2f41aea48ac9284ad205debb878d633072431f4
-
- Oct 16, 2023
-
-
Ayush Sharma authored
Bug: 210537972 Test: NA Change-Id: If2f41aea48ac9284ad205debb878d633072431f4 Merged-In: If2f41aea48ac9284ad205debb878d633072431f4 (cherry picked from commit a93b4fdf)
-
- Oct 13, 2023
-
-
Victor Hsieh authored
Previous automerge was skipped by mistake Also add OWNERS. Bug: 303523453 Test: m Test: mma in services/devicepolicy/ services/tests/servicestests/ (cherry picked from https://android-review.googlesource.com/q/commit:d34869871fe5df392d97a80ffb34d52b9bda7384) Change-Id: I5c63ba2e56a7d104c0f7b5758058730aed0a237c
-
- Oct 12, 2023
-
-
Jonathan Scott authored
Test: m Fixes: 261999445 Change-Id: Ie1514b7df70ea0b8ddc2f148e16b85b0df348395 Flag: EXEMPT
-
- Oct 10, 2023
-
-
Ayush Sharma authored
Bug: 210537972 Test: NA Change-Id: If2f41aea48ac9284ad205debb878d633072431f4
-
- Oct 06, 2023
-
-
Victor Hsieh authored
Also add OWNERS. Bug: 303523453 Test: m Test: mma in services/devicepolicy/ services/tests/servicestests/ Change-Id: Ic1d03d1483505b77ac88ac2e185026d668a22292
-
Eric Biggers authored
Everyone who sets a new LSKF is supposed to first validate it against the minimum password metrics. Yet, the SET_AND_VERIFY_LOCKSCREEN_CREDENTIALS or ACCESS_KEYGUARD_SECURE_STORAGE permission is sufficient to set a new LSKF but isn't necessarily sufficient to get the minimum password metrics. This is preventing 'KeyguardManager#setLock(int, byte[], int, byte[])' from being fixed to properly validate the new LSKF. To fix this, make DevicePolicyManagerService#getPasswordMinimumMetrics() accept these permissions. Bug: 219511761 Bug: 232900169 Bug: 243881358 Test: see I46d8bf920526a00d6e6d2145d06c8e39f8047ea8 Change-Id: Ic69fd01dadf95ab49b025295711fa020180690ff Merged-In: Ic69fd01dadf95ab49b025295711fa020180690ff (cherry picked from commit 62dbf253)
-
Eric Biggers authored
Add a method PasswordMetrics#validateCredential() which takes a LockscreenCredential argument and honors the "invalid chars" flag in it. This should be used instead of PasswordMetrics#validatePassword() which does not honor the "invalid chars" flag (which it does not have access to) and only works for PASSWORD and PIN, not PATTERN and NONE. Convert all callers of validatePassword() in frameworks/base to use validateCredential(). After this, two callers remain: one in packages/apps/Settings which I'll convert right away too, and several in packages/apps/Car/Settings which will take a bit longer to get rid of. Bug: 219511761 Bug: 232900169 Bug: 243881358 Test: atest PasswordMetricsTest Test: Verified that 'locksettings set-password' no longer accepts a non-ASCII char that was accepted before Test: see I5f1822a34688473cb103eb64dca56e4c19d4dd08 Change-Id: Ib8f43aef5b5aa5bb059780707582d0419f9ddf9a Merged-In: Ib8f43aef5b5aa5bb059780707582d0419f9ddf9a (cherry picked from commit 813f32c9)
-
- Oct 04, 2023
-
-
Jason Parks authored
Bug: 277908283 Test: manual && atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest Change-Id: I8b06b4439bdf74309bb2027cc4cdb350f1f52f72
-
- Oct 02, 2023
-
-
Alex Johnston authored
Bug: 294228721 Test: android.credentials.cts.CtsDevicePolicyTest Change-Id: I167238e9cccb818643bc491ef56d40e042d80035 Merged-In: I167238e9cccb818643bc491ef56d40e042d80035
-
Alex Johnston authored
Bug: 294228721 Test: android.credentials.cts.CtsDevicePolicyTest Change-Id: I167238e9cccb818643bc491ef56d40e042d80035 Merged-In: I167238e9cccb818643bc491ef56d40e042d80035
-
- Sep 28, 2023
-
-
Anna Zhuravleva authored
Platform_testing large test annotation is for host side tests and restricted, device tests should use androidx annotation. Bug: 293837621 Test: presubmit Change-Id: Ia5faeed2d4cec8c135ea37d5b0d45a338830fec0
-
- Sep 27, 2023
-
-
bkchoi authored
When there was already an active admin, the command created a fresh active admin and replaced the existing one, which cleared some necessary flags that were previously set in the admin. This CL fixes the unwnated side effect by not overwriting the existing admin. Bug: 282239828 Test: adb shell dpm set-device-owner --user 0 <component> adb shell dumpsys device_policy Change-Id: Ib424dcbcec4e3699beb5aa46079424dc9d87d275
-
- Sep 25, 2023
-
-
Alex Johnston authored
Bug: 294228721 Test: android.credentials.cts.CtsDevicePolicyTest Change-Id: I167238e9cccb818643bc491ef56d40e042d80035
-
- Sep 22, 2023
-
-
Ilyas Sung authored
Fix security bug - A malicious DPC can crash the device by setting policies of large sizes using up all the memory on the device and crashing it. Test: atest DeviceManagementCoexistenceTest Bug: 281543351 Change-Id: I3719adef6dbf1f203fd073deb61983d303590b8c
-
- Sep 18, 2023
-
-
Elis Elliott authored
Bug: 297930602 Test: Manual Change-Id: Ife982007b3cc32a51c4cd691a8a45f80388a65e0 Merged-In: I86d8a5d5b719cfeab32383828cfc2f43f5ae9f65
-
- Sep 15, 2023
-
-
Elis Elliott authored
Bug: 297930602 Test: manual Change-Id: Ia0116f9cc4d9b3269bf82d3ce3b7821b622cfc3e
-
- Sep 12, 2023
-
-
Kholoud Mohamed authored
Bug: 299289004 Test: N/A Change-Id: I9be1c628034ab18c663abbde65ab3933a519829f
-
- Sep 11, 2023
-
-
Kholoud Mohamed authored
Bug: 297983169 Test: btest a.d.c.CameraTest#getCameraDisabled_* Merged-In: Id6695fd589e172ff98029bccf1174b9ca4e34d6c Change-Id: Id6695fd589e172ff98029bccf1174b9ca4e34d6c
-
Kholoud Mohamed authored
Bug: 297983169 Test: btest a.d.c.CameraTest#getCameraDisabled_* Change-Id: Id6695fd589e172ff98029bccf1174b9ca4e34d6c
-