Bug: 143978873
Test: m -j
Test: flashes successfully
Test: DocumentsUI(a Mainline module) is able to successfully log to statsd
Change-Id: I9cdc6151d8feb29a712532e50f143af9d52c8d94
New system property settings_fuse enables user to switch persist.sys.fuse
flag on/off from Settings UI. New system property is added as the
Settings UI sets system property with a fixed prefix
(persist.sys.fflag.override.) for persistent properties and for
consistency we do not want to rename persist.sys.fuse.
The user needs to restart the device after toggling the flag from
Settings UI. When the device restarts for the first time,
persist.sys.fuse is set from settings_fuse when the
StorageManagerService starts. If the value of persist.sys.fuse is
modified, then the device reboots for it to take effect.
The 2 reboots take almost the same time as 1 reboot and the difference is
not noticeable to the user as the lock screen does not show up in
between the 2 reboots.
This change would also mean that the newly added flag
(persist.sys.fflag.override.settings_fuse) will always override
persist.sys.fuse (as it is always checked on reboot), which implies that
`adb shell setprop persist.sys.fuse [true/false] && adb reboot` will
have no effect.
Bug:144419848
Test: * Enable developer options in Settings.
* Go to Settings->System->Advanced->Developer Options->Feature Flags.
* Turn on (off by default) settings_fuse toggle button and
restart.
* After reboot run `adb shell getprop persist.sys.fuse` shows
true.
* Turn off settings_fuse from Settings UI and reboot
* After reboot run `adb shell getprop persist.sys.fuse` shows
false.
Test: Using adb command to change the fuse system property.
* `adb shell setprop persist.sys.fflag.override.settings_fuse
true && adb reboot`
* After reboot run `adb shell getprop persist.sys.fuse` shows true
* Similarly for false case.
Change-Id: I0093d2b020a9d8ffeec7fca31a44ef2e65b4dfb4
- Rename writeAttributionNode to writeAttributionChain
- Make Type Id, size limit constants public and @hide for testing
- Change visibility of StatsEvent package protected functions to public
Bug: 141696033
Test: m -j
Change-Id: Ia4818f621672d469390bf7654bdd317f0cd11692
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.
Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
This structure can be useful in other parts of the system, so extracting
it and making it more generic makes sense.
Bug: 135764360
Bug: 141645789
Test: atest QuotaControllerTest
Test: atest SparseArrayMapTest
Change-Id: I2aeb3ea53e3dc2ec00667a0a2ccdb112cf562377
Introduces the notion of 'user types' to UserManager.
Previously, users only had properties, set by UserInfo flags. We now
solidify some of these as formal user types. Each user must be of
precisely one user type. The configuration of each type is defined
in a UserTypeDetails object.
Prior 'types' - namely Guest, Restricted, ManagedProfiles, Demo, and
'normal' - that were set via UserInfo flags are now controlled via
UserType. Previous UserInfo flag methods for categorizing these are
still supported as long as no user of of more than one type.
If a user was (e.g.) previously both Guest and Demo, it is now
invalid and will be prevented from upgrading. This should not be a
problem in AOSP, where these 'types' were assumed mutually exclusive.
UserTypeDetails is sufficiently general to support future non-managed
profiles. To this end, the logic for specifying badges and their
colors/labels is contained by UserTypeDetails, and therefore
UserManager is responsible for delivering the corresponding badge
information.
Bug: 142151520
Test: added new test class UserManagerServiceUserTypeTest
Test: added additional tests in UserManagerServiceUserInfoTest
Test: added additional tests in UserManagerTest
Test: added additional tests in UserManagerServiceCreateProfileTest
Test: created UserTests to run the various pm.User*Test's
Test: atest \
com.android.server.pm.UserTests \
UserLifecycleTests \
ManagedUserContentResolverTest \
CtsDevicePolicyManagerTestCases \
CtsMultiUserHostTestCases \
com.android.server.devicepolicy.DevicePolicyManagerTest \
com.android.server.am.UserControllerTest \
CreateManagedProfileTaskTest
Test: atest com.android.server.pm.UserManagerServiceCreateProfileTest
using adb shell getprop persist.sys.max_profiles # for 5 and -1
Change-Id: Id1183a76055e9a7610965cf40b256d1392afe6f8
This creates a java API for registering pullers. Will implement the
statsd side in a follow up CL.
Test: builds, boots
Change-Id: Ib6735984297ce3148839a6370a3c15b2a585baf5
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
Bug: 137350495
Test: m
Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
- Expose atom id in StatsEvent.
- Sync constants with native stats_event.
Bug: 143079343
Bug: 143286399
Test: m -j
Change-Id: Icaa2d90b40d5da7571444182ead03b54b7b25867
Before we just cast Object[] to String[]. This crashes. Now we are
casting the individual objects->strings.
Test: Parceled LongSparseArray
Change-Id: I24883a1dad49c0682977da1aea2370eddb001173
Use a builder to construct StatsEvent objects.
Make StatsEvent immutable.
Wrap socket byte array in a Buffer class with write methods for
primitives.
Implement socket schema at go/statsd-socket-doc
StatsEvent.java design doc at go/statsevent-java-doc
Bug: 141696033
Test: m -j
Change-Id: Ief4890882de66d5dcca71b3827ffa1f43ea628a8
Remove bugreport API feature flag as it is no longer used.
Test: Full/Interactive bugreport work as expected
Test: `adb bugreport` works as expected
Bug: 139415553
Bug: 133494536
Change-Id: I4d6c66a6b101d14336dca459a3aba8e02dbca675
Currently only used by app-ops, but can be used by other modules too.
AppOps will collect app-ops based on feature. Only the most basic
parts of app-ops are supporting features yet. The rest will be added
later.
Test: atest CtsAppOpsTestCases
atest RunSettingsLibRoboTests
atest com.android.server.wm.ActivityStarterTests
m -j doc-comment-check-docs
Bug: 136595429
Change-Id: Ia664f4ff1c1c2ceea721d76dc491ec50c237e9ce
Make TimestampedValue Parcelable for simplicity.
TimetampedValue objects are not generally parcelable, depending on the
type of the value held. Previously, TimestampedValue did not implement
Parcelable to avoid committing to a general contract. Developers
parceling TimestampedValue objects were expected to call
TimestampedValue.writeToParcel() / TimestampedValue.readFromParcel()
explicitly when they knew it was safe to do so. This also meant that
TimestampedValues couldn't be used directly via AIDL.
This change makes TimestampedValue parcelable because it's more
familiar / convenient. Attempts to marshall a TimestampedValue that
contains a non-parcelable value will still throw a RuntimeException.
Bug: 140712361
Test: atest android.util.TimestampedValueTest
Change-Id: I8ca9c72f0433b380ce720cd813f650e743b3ddae
Add a new method in LinkProperties, isWakeOnLanEnabled() which returns
true if network interface is defined in config_wakeonlan_enabled_interfaces
string-array (config.xml)
Bug: 132705025
Test: atest LinkPropertiesTest & atest ConnectivityServiceTest
Change-Id: I3f7803aafd2f8eaf8aa18419b21339e15d4b7a0b