Commit Graph

20124 Commits

Author SHA1 Message Date
Sewook Seo
00a6676069 Merge "Revert "Notify IMS Call info via CallAttributesListener"" 2022-11-29 05:52:19 +00:00
Sewook Seo
6c1fe270cb Revert "Notify IMS Call info via CallAttributesListener"
Revert "Adding Ims Call Info to CallAttributes"

Revert submission 19673329-IMSCallInfo_In_CallAttributes

Reason for revert: <phone crash at CS call>
Reverted Changes:
Id5c4ba0b6:Add CTS for CallAttributesListener
Ic7b5adefd:Adding Ims Call Info to CallAttributes
I1584524ce:Notify IMS Call info via CallAttributesListener

Change-Id: Ia875f7441fbaac28d9220b9ed42da42ab286440c
2022-11-28 21:50:29 +00:00
Makoto Onuki
f273c10f59 Implement SHORT_SERVICE ANR
- Also implement oom-adjuster timeout
- Also fix the FGS type change check.

Bug: 257270313
Test: atest FrameworksServicesTests:OomAdjusterTests MockingOomAdjusterTests AnrLatencyTrackerTests
Test: Manual test with a test app, using `dumpsys activity services`

Change-Id: I92e137bb09ac35a380e012ab9674aafc61d97084
2022-11-28 08:48:54 -08:00
Sewook Seo
ca32463c07 Merge "Notify IMS Call info via CallAttributesListener" 2022-11-24 22:16:22 +00:00
TreeHugger Robot
a526f37aae Merge "Add OverlayManagerImpl to create frro, idmap and get overlayInfos" 2022-11-24 18:47:11 +00:00
Nick Chameyev
c3bbd7a1de Merge "[Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity" into tm-qpr-dev am: 814ef64f49 am: 2fcb916dcb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20139164

Change-Id: Ie64989a9e4a4f05405f47a9fcfe4d79627e24f05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 12:50:24 +00:00
Nick Chameyev
2fcb916dcb Merge "[Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity" into tm-qpr-dev am: 814ef64f49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20139164

Change-Id: I94044049f2d8be9984e8fa110345ca5dd9141a48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-24 12:11:28 +00:00
Nick Chameyev
814ef64f49 Merge "[Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity" into tm-qpr-dev 2022-11-24 11:30:47 +00:00
Sewook Seo
fddca1d3b9 Notify IMS Call info via CallAttributesListener
Notify IMS call type & IMS call ID through CallAttributes.
List of CallAttributes mapped to whole calls will be passed to the
listener.

Bug: 242928210
Test: atest FrameworksTelephonyTests
Change-Id: I1584524cec49af0694f691efdcbec4210f06e092
2022-11-24 08:19:06 +00:00
felkachang
1039d61b36 Add OverlayManagerImpl to create frro, idmap and get overlayInfos
Add OverlayManagerImpl to let applications create frro and idmap files
for overlaying itself's android resources.
* OverlayManagerImpl.java
  * check the FabricatedOverlayInternal.
* com_android_internal_content_om_OverlayManagerImpl.cpp
  * convert and read Java objects to native data.
  * call the APIs in libidmap2 to create frro and idmap files.

Add OverlayManagerImpl.cpp into AndroidRuntime by modifying Android.bp
* Add register_com_android_internal_content_om_OverlayManagerImpl
  register JNI methods
* add com_android_internal_content_om_OverlayManagerImpl.cpp
    * It's a adapter to delegate the tasks to SelfTargeting.cpp
    * dynamic link with libidmap2 by using dlopen and dlsym to call
      functions in libidmap2.

Add SelfTargeting.cpp into libidmap2
* createFrroFile
* createIdmapFile
* getFabricatedOverlayInfo

for interoperability between libandroid_runtime and libidmap2.
* move OverlayManifestInfo from libidmap2 to libandroidfw
* add FabricatedOverlayEntryParameters into libandroidfw

Bug: 205919743

Test: build
Test: atest \
                  OverlayHostTests \
                  OverlayDeviceTests \
                  SelfTargetingOverlayDeviceTests \
                  OverlayRemountedTest \
                  FrameworksServicesTests:com.android.server.om \
                  CtsContentTestCases:android.content.om.cts \
                  idmap2_tests

Change-Id: I5425f3229e9a3858e57427ef84e6abaf32e89b6e
2022-11-24 10:09:07 +08:00
Kenneth Ford
96cb37ca35 Merge "Add rear display dialog methods to CommandQueue and StatusBarService" into tm-qpr-dev am: 9bb27a054d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20522102

Change-Id: I74361aa6e5db6330751a0c5d11a07ca2045245f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-22 22:07:59 +00:00
Kenneth Ford
b8bb4dd906 Add rear display dialog methods to CommandQueue and StatusBarService
Creates new methods through CommandQueue and StatusBarService
to allow DeviceStateManagerService to notify SystemUI
to show the rear display education dialog

Bug: 207686851
Test: CommandQueueTest
Change-Id: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
Merged-In: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
2022-11-22 17:47:40 +00:00
Kenneth Ford
ed77dad0cc Merge "Add rear display dialog methods to CommandQueue and StatusBarService" 2022-11-22 17:34:22 +00:00
Riddle Hsu
28bc7eed7a Reduce overhead of writing logcat from protolog method
String.format contains more loop, creates more temporary object
with more conditions than TextUtils.formatSimple.

And the basic syntax provided by formatSimple is enough for use
so far, it would be better to reduce the general cost while
enabling logcat output of protolog.

Bug: 259683790
Test: atest ProtoLogImplTest ProtoLogIntegrationTest LogParserTest
Change-Id: Icbf55c9e75c2343a961a57f83823a90e1f057075
2022-11-22 14:41:37 +00:00
Nick Chameyev
a722553826 [Partial Screensharing] Add abstraction to show custom device policy blockers in ChooserActivity
Adds an interface that controls the behavior of
the blocked empty state of personal/work profile
tabs in the ChooserActivity/ResolverActivity.
This state is displayed when the device policy
doesn't allow sharing between apps.
The interface allows to customize in which cases
we block the sharing, what text we display there
and send custom analytics events.

This CL should not change any behaviour.

Default behaviour is to not allow cross profile
sharing which could be overriden by using
different implementation of the ProfileBlockerEmptyStateProvider.
E.g. in partial screensharing app selector we could
decide whether we want to block the tab based
on the screen capturing device policies.

Bug: 233348916
Test: atest com.android.internal.app.ChooserActivityTest
Test: atest com.android.internal.app.ResolverActivityTest
Test: atest com.android.internal.app.ChooserActivityWorkProfileTest
Test: atest com.android.internal.app.ResolverActivityWorkProfileTest
Change-Id: I6b46c9424644016d7e2f472a95b0b5583c58c2cb
2022-11-22 12:08:59 +00:00
Kenneth Ford
367f1de01f Add rear display dialog methods to CommandQueue and StatusBarService
Creates new methods through CommandQueue and StatusBarService
to allow DeviceStateManagerService to notify SystemUI
to show the rear display education dialog

Bug: 207686851
Test: CommandQueueTest
Change-Id: I65e22a9940a866bb62b597f5cd4f6ce81d891e12
2022-11-22 00:57:10 +00:00
Miranda Kephart
d7815b6d8d Merge "Add device config flag to ignore clipboard source package" into tm-qpr-dev am: fb435f4376 am: 31c10616d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20499567

Change-Id: Idf553bcbf959bf94018217572533e6e4c7002605
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 23:07:23 +00:00
Miranda Kephart
31c10616d7 Merge "Add device config flag to ignore clipboard source package" into tm-qpr-dev am: fb435f4376
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20499567

Change-Id: Ib7f2a92be9363a6f8d39399e8adeef88940fef9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 22:40:36 +00:00
Miranda Kephart
fb435f4376 Merge "Add device config flag to ignore clipboard source package" into tm-qpr-dev 2022-11-17 22:17:04 +00:00
Hassan Ali
a26037f821 Merge "Remove ActivityThread from deviceconfig.java" 2022-11-17 16:54:14 +00:00
Miranda Kephart
81a533d0a1 Add device config flag to ignore clipboard source package
Allows testing of remote copy clipboard UI without going through
Nearby. Effectively guarded by the CLIPBOARD_REMOTE_BEHAVIOR flag as
the isRemoteCopy method will only be run if that flag is enabled.

Bug: 246808749
Test: manual, using Clipboard Spammer app
Change-Id: I2a90709e61489d6ff5ae418b21d928c628320721
2022-11-17 15:40:21 +00:00
TreeHugger Robot
3f95840e70 Merge "Extract getIntentUser function in ResolverActivity" into tm-qpr-dev am: 858e21b54f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20495626

Change-Id: Iff07680bcdb63703f13e57145004cee27cb28491
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 12:31:42 +00:00
TreeHugger Robot
858e21b54f Merge "Extract getIntentUser function in ResolverActivity" into tm-qpr-dev 2022-11-17 12:02:31 +00:00
Hassan Ali
4dc91d8e98 Remove ActivityThread from deviceconfig.java
As part of moving DeviceConfig.java to packages/modules/ConfigInfrastructure.
Need to move activity thread dependency to setting.config as the new
module will not have access to hidden apis (ActivityThread).

Test: m
Bug: 258220607
Change-Id: Ib7b20caaec128d64908349918ec7bce9a53cc2e6
2022-11-17 11:33:50 +00:00
Treehugger Robot
5d80996d6a Merge "Updated OWNERS file for expresslog APIs" am: 352e892f47 am: 900df4ad1a am: 807a2d906a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2285193

Change-Id: I9a35a7599f8938e0af42316a3d68d53f52912af0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 03:02:08 +00:00
Treehugger Robot
807a2d906a Merge "Updated OWNERS file for expresslog APIs" am: 352e892f47 am: 900df4ad1a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2285193

Change-Id: I349a295e91699648ae5ed88324a2fedfb42e95c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 02:32:01 +00:00
Treehugger Robot
900df4ad1a Merge "Updated OWNERS file for expresslog APIs" am: 352e892f47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2285193

Change-Id: I741e921a741272151e20c183ef3e8328ff9b4108
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 02:08:03 +00:00
Treehugger Robot
352e892f47 Merge "Updated OWNERS file for expresslog APIs" 2022-11-17 01:33:49 +00:00
TreeHugger Robot
5705b6344c Merge "Revamp BinaryTransparencyService." 2022-11-16 22:40:58 +00:00
TreeHugger Robot
c5fc457616 Merge "Extract getIntentUser function in ResolverActivity" 2022-11-16 20:17:42 +00:00
Azhara Assanova
3d1fa79d86 Merge "Disallow dangerous zip entry names" am: fb6ff598b9 am: e974be93ec am: c0cba4e226
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2281427

Change-Id: If39c1a76b49f62e0f14847cac77aa4446e3b983a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 19:15:56 +00:00
Billy Lau
0f55c59324 Revamp BinaryTransparencyService.
BinaryTransparencyService:
- change default binary measurement method from SHA256 digest to
  APK content digest. This allows for more performant measurements.

- got rid of in-memory caches of digest results because:
  a) larger scope: more binaries will be covered (in the magnitude
     of hundreds);
  b) the digest length using APK content digest might be longer than
     256 bits: e.g. CHUNKED_SHA512 which is 512 bits;
  c) the computation of these new digests are not as computationally
     intensive that it causes noticible lags even when commands are
     invoked repeatedly in adb shell.

- changed scheduled job to be scheduled periodically (once in a 24
  hour period) instead of a one-off job.

- make use of method calls to BackgroundInstallControlService (BICS)
  to obtain list of newly installed mobile bundled apps (MBAs).

BinaryTransparencyServiceTest:
- modified the return type for `getApexInfo` to receive a List instead
 of Map.

Bug: 245944666

Test: atest BinaryTransparencyServiceTest.
      Also, adb shell cmd jobscheduler run android <job-id>.
      <job-id> can be found in debug printouts with TransparencyService
      tag.
Change-Id: Ie305e71c514f4fb65b9e640301093ec83f01f718
2022-11-16 12:55:48 -06:00
Biswarup Pal
e20269aea2 Merge "Add missing information in ANR message from BroadcastQueueModernImpl" 2022-11-16 18:31:23 +00:00
Dmitri Plotnikov
7d9031f21c Merge "Fix battery history corruption issues" 2022-11-16 17:37:48 +00:00
Li Li
3ca451dd6c Merge "Freezer: improve file lock exemption" 2022-11-16 17:01:23 +00:00
Nick Chameyev
4cc313e0aa Extract getIntentUser function in ResolverActivity
This should resolve conflicts with master.

Bug: 233348916
Test: presubmit
Change-Id: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
Merged-In: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
2022-11-16 17:00:16 +00:00
Nick Chameyev
20e7b8d9eb Extract getIntentUser function in ResolverActivity
This should resolve conflicts with master.

Bug: 233348916
Test: presubmit
Change-Id: If5bf5c73441dc9c54822d0c2b36f16b11ea892ec
2022-11-16 16:58:41 +00:00
Biswarup Pal
43fcac1ad5 Add missing information in ANR message from BroadcastQueueModernImpl
This keeps the broadcast ANR message consistent with the old broadcast
queue, and fixes trace analysis pipelines that consume messages in
this format. This unstructured format is brittle but should keeps things
working, pending a longer term fix to with structured (proto) format.
This CL also adds tests for TimeoutRecord to validate ANR timeout
records.

Test: m
Bug: 254452238
Change-Id: Ifd0fb8d4a1d0add3e762b8327defb3f25d5aa0c2
2022-11-16 13:38:52 +00:00
Azhara Assanova
c0cba4e226 Merge "Disallow dangerous zip entry names" am: fb6ff598b9 am: e974be93ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2281427

Change-Id: Idc85440cdf9002f88e3b2123d2f6e93211c0b0e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 11:27:19 +00:00
Azhara Assanova
e974be93ec Merge "Disallow dangerous zip entry names" am: fb6ff598b9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2281427

Change-Id: I3dd4217728f41532c63409e7a5c47bf755d24cc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16 10:54:53 +00:00
Azhara Assanova
fb6ff598b9 Merge "Disallow dangerous zip entry names" 2022-11-16 10:11:38 +00:00
Li Li
5b55587f5b Freezer: improve file lock exemption
When a process becomes cached and holds file locks blocking other
processes, check whether those blocked processes are also in cached
mode. If they are also cached, freeze the current process. Otherwise,
Skip the current process to avoid deadlock.

Bug: 245994713
Bug: 253913470
Test: atest ProcLocksReaderTest
Test: verify apps with deadlock can be frozen
Change-Id: I8635bf877bbe4404cc66955f1946444265680246
2022-11-16 03:31:16 +00:00
Cole Faust
22deef8d08 Merge "[conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc" 2022-11-16 03:17:38 +00:00
Dmitri Plotnikov
551e230082 Fix battery history corruption issues
Bug: 247338158
Test: atest FrameworksServicesTests:BatteryStatsTests

Change-Id: I6f0830d43bfefba411fc6b192a41d6d629f34f43
2022-11-15 14:49:02 -08:00
Nate Myren
e32609da00 Merge "Use chain start token in performOpTransaction" 2022-11-15 20:16:44 +00:00
Cole Faust
e4abcbec1d [conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I84d67fdfcc99f9f6fca218d4264ab8e0bc1f1653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:47:41 +00:00
Cole Faust
d3c499dabc Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I8090e254f06a3b5fc7e9b23fdae6c5bd3db230c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:37:15 +00:00
Cole Faust
f9df26ae3c Merge "Fix errorprone warnings that should be errors" am: 677d6cd780
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I0e9c5077610407a117ee34ff688b40b52e161a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:11:55 +00:00
Cole Faust
7da659bb6c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
2022-11-14 17:57:30 -08:00
Jorge Gil
bc425d503d Merge "Add WCT#setDragResizing to optimize fluid resizing" into tm-qpr-dev am: 1f17bf7eba am: f28339c869
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20378671

Change-Id: I3cdea614c657c696c551d31672b215cb80eeb789
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-14 22:24:21 +00:00