Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
1da505a
Revert "wifidisplay: restrict broadcast by the proper permission"
Jul 15, 2021
e8b71fe
Revert "BG-FGS-start while-in-use permission restriction improve..."
Aug 25, 2021
0ebb3bc
Fix parsing code parcelling errors
Jun 18, 2021
c3672c6
Bluetooth: Fix formatting in getAlias()
Aug 18, 2021
8be019d
Backporting the change of ag/15629060 to rvc-dev
Sep 2, 2021
ede89ec
TIF: fix issue of using caller-aware methods after clearCallingIdenti…
Aug 13, 2021
3b2f925
Changed INTERACT_ACROSS_PROFILES appop to be set per UID
May 4, 2021
87e18d1
Revert "Revert "BG-FGS-start while-in-use permission restriction impr…
haggertk Nov 3, 2021
6b85ba3
camera2: Fix exception swallowing in params classes createFromParcel
Jun 9, 2021
c74c8d8
Fix NPE on getTitle()
Jul 6, 2020
3e642aa
Fix serialization bug in GpsNavigationMessage
Sep 21, 2021
82aab98
Do not show the notification footer until the user is set up.
Sep 17, 2021
066981a
DO NOT MERGE KeyStore ChunkedStreamer must tolerate update consuming …
Sep 23, 2021
582d048
Disallow overlays for ResolverActivity
Oct 5, 2020
e38d84d
Import translations. DO NOT MERGE ANYWHERE
Sep 21, 2021
048e56f
Prevent apps from spamming addAccountExplicitly.
May 17, 2021
1de2b72
Allow forcing status bar state changes and do so when the screen turn…
Oct 21, 2021
b6aa46f
Update deletion conditions for a package's UsageStats.
Nov 9, 2021
7f99f32
Revert "Revert "[pm] remove old stage dirs on low storage""
schfan-1 Oct 14, 2021
d15c464
RESTRICT AUTOMERGE Remove line of code that was mistakently left in.
Nov 15, 2021
8d7a7c0
[DO NOT MERGE] Controls - Do not recreate intent
mpietal79 Oct 4, 2021
30b89be
DO NOT MERGE Re-implement reading/writing Throwables from/to Parcel, …
zhanghai Dec 31, 2020
af0ec81
Don't crash if default supervision profile owner is not set
Jan 26, 2021
6a6a745
Don't abandon child sessions (1/n)
Jan 3, 2022
a1163cd
[RESTRICT AUTOMERGE] Fix the inconsistency of protection level
kjackal Dec 24, 2021
ea31304
Check group channels for FGSes
Jan 7, 2022
696bc00
Handle onNullBinding
Jan 11, 2022
2db4d56
Only allow trusted overlays to specify FLAG_SLIPPERY
vishniakou Jul 20, 2021
9d0c1f2
Add ALLOW_SLIPPERY_TOUCHES permission
vishniakou Nov 29, 2021
2a823a6
Revert "Revert "Revert "BG-FGS-start while-in-use permission restrict…
haggertk Apr 5, 2022
c85a6f0
Prevent apps from creating blocked channel groups
Jan 12, 2022
9fc8913
Restrict AdbManager broadcasts to apps with MANAGE_DEBUGGING permission.
jdd510 Dec 22, 2021
bc1427f
BG-FGS-start while-in-use permission restriction improvement.
Feb 7, 2022
aa21946
[RESTRICT AUTOMERGE] Add hide-non-system-overlay flag for HarmfulAppW…
Jan 18, 2022
26d5ff8
Filter notification APIs by user
Feb 11, 2022
f66b811
[RESTRICT AUTOMERGE] Do not resume activity if behind a translucent task
Feb 8, 2022
ef6f848
[DO NOT MERGE] Keyguard - Treat messsages to lock with priority
mpietal79 Oct 1, 2021
e949079
Verify caller before auto granting slice permission
pinyaoting Mar 3, 2022
b5ac073
Always restart apps if base.apk gets updated.
alexbuy Feb 25, 2022
4b3d622
Update GeofenceHardwareRequestParcelable to match parcel/unparcel for…
Mar 11, 2022
20b0a91
DO NOT MERGE Add an OEM configurable limit for zen rules
Mar 1, 2022
323cf5b
Fix security hole in GateKeeperResponse
Mar 16, 2022
9c655d1
Prevent non-admin users from deleting system apps.
Mar 25, 2022
b979f6e
Fix NPE
Mar 31, 2022
482da78
[rvc] RESTRICT AUTOMERGE Add finalizeWorkProfileProvisioning.
jscott1989 Apr 5, 2022
53b1b74
limit TelecomManager#registerPhoneAccount to 10; api doc update
Jan 31, 2022
ab1975a
Disallow PAP authentication when MPPE is requested
RemiNVG Feb 28, 2022
50a0d65
[RESTRICT AUTOMERGE] StorageManagerService: don't ignore failures to …
ebiggers Aug 13, 2021
26655de
[RESTRICT AUTOMERGE] UserDataPreparer: reboot to recovery if preparin…
ebiggers Jan 24, 2022
0a1db95
[RESTRICT AUTOMERGE] UserDataPreparer: reboot to recovery for system …
ebiggers Mar 4, 2022
4f9fd54
[RESTRICT AUTOMERGE] Ignore errors preparing user storage for existin…
ebiggers Mar 4, 2022
80f81dc
[RESTRICT AUTOMERGE] Log to EventLog on prepareUserStorage failure
ebiggers Mar 26, 2022
152d470
Crash invalid FGS notifications
Jul 7, 2021
26288e0
[RESTRICT AUTOMERGE]Only allow system and same app to apply relinquis…
Feb 21, 2022
ba70ee4
DO NOT MERGE Suppress notifications when device enter lockdown
wenhao1006 Feb 2, 2022
d4105ad
Make sure callingPackage belongs to callingUid when checking BG-FGS r…
May 8, 2022
174975f
Clear mInterface before calling resetIkeState()
Mar 30, 2022
8d5bc8d
Remove package title from notification access confirmation intent
Apr 22, 2022
7ffc121
[RESTRICT AUTOMERGE]Prevent set intent on non-leaf tasks
May 27, 2022
05e6758
Stop using invalid URL to prevent unexpected crash
Jun 2, 2022
b6720a2
Only allow the system server to connect to sync adapters
Apr 19, 2022
b5e2306
Fix duplicate permission privilege escalation
Apr 28, 2022
318ca43
Parcel: recycle recycles
smore-lore Mar 30, 2022
389ddec
Remove package name from SafetyNet logs
Jun 30, 2022
12816b1
Restrict getInputMethodWindowVisibleHeight
adrianroos Feb 16, 2022
6ce7db7
Limit the number of concurrently snoozed notifications
Jul 1, 2022
64f1efd
Stop crashing the system on hitting the alarm limit
Jun 27, 2022
7def1b2
Block FullScreenIntent while device is in use if notification has a s…
Jul 18, 2022
3cf3e29
DO NOT MERGE - Exclude TYPE_PRIVATE_PRESENTATION app visiblity
Aug 5, 2022
f3ac4da
Store DND rule owners
Jun 16, 2021
9a380d5
Fix NPE when deleting old zen rules
Jun 22, 2021
7effc86
Enforce zen rule limit on a package level.
Jun 28, 2022
2ad82bf
DO NOT MERGE
Mar 22, 2022
376f8df
switch TelecomManager List getters to ParceledListSlice
Jun 23, 2022
3398b2a
[RESTRICT AUTOMERGE] Do not send new Intent to non-exported activity …
Aug 2, 2022
0259e60
Do not send AccessibilityEvent if notification is for different user.
Daniel-Norman Aug 12, 2022
0f264d9
DO NOT MERGE Fix auto-grant of AR runtime permission if device is upg…
Jun 30, 2022
7951526
Check rule package name in ZenModeHelper.addAutomaticRule
Aug 25, 2022
253babd
Trim any long string inputs that come in to AutomaticZenRule
Aug 29, 2022
2c75c93
[RESTRICT AUTOMERGE] Check permission for VoiceInteraction
Jul 18, 2022
478a15e
Fix system zen rules by using owner package name if caller is system
Sep 6, 2022
6021bbd
[DO NOT MERGE] Do not dismiss keyguard after SIM PUK unlock
mpietal79 Aug 18, 2022
89c033c
Change InputWindowInfo::isTrustedOverlay() to be permission and flag …
lzye May 10, 2020
1cce92f
Add mechanism for a task's windows to be trusted overlays
Jul 15, 2021
9b6a246
SurfaceControl: Add setDropInputMode api
nairvis-beep Jan 26, 2022
dbef2f6
Drop input for toast and child surfaces
nairvis-beep Feb 2, 2022
ba76752
Revert "Prevent non-admin users from deleting system apps."
Jul 19, 2022
4d9c0e1
Limit the size of NotificationChannel and NotificationChannelGroup
Aug 19, 2022
ddfff6e
Prevent non-admin users from deleting system apps.
Aug 9, 2022
c856ead
Include all enabled services when FEEDBACK_ALL_MASK.
Daniel-Norman Sep 1, 2022
8676cf4
[pm] forbid deletion of protected packages
schfan-1 Sep 9, 2022
144d0c1
Fix NPE
Sep 6, 2022
850d751
Fix a security issue in app widget service.
pinyaoting Jul 14, 2022
df889a5
[RESTRICT AUTOMERGE] Allow activity to be reparent while allowTaskRep…
Sep 14, 2022
76d74ad
[DO NOT MERGE] Update window with FLAG_SECURE when bouncer is showing
mpietal79 Sep 14, 2022
0532328
[Do Not Merge] Ignore malformed shortcuts
pinyaoting Sep 21, 2022
33a3288
[DO NOT MERGE] Fix permanent denial of service via setComponentEnable…
Sep 26, 2022
51e8256
Add safety checks on KEY_INTENT mismatch.
haok-ggl Oct 4, 2022
3266247
Validate package name passed to setApplicationRestrictions.
Aug 19, 2022
f8ce9e4
[DO NOT MERGE] Revert "Check rule package name in ZenModeHelper.addAu…
Nov 7, 2022
b4c3954
[DO NOT MERGE] Revert "Fix system zen rules by using owner package na…
Nov 7, 2022
7fe4b7b
Limit lengths of fields in Condition to a max length.
Sep 13, 2022
c4bff09
Limit length and number of MIME types you can set
Aug 30, 2022
bfc8c4c
Disable all A11yServices from an uninstalled package.
Daniel-Norman Oct 5, 2022
cb8141a
[DO NOT MERGE] Fix conditionId string trimming in AutomaticZenRule
Oct 12, 2022
f3c3a15
[RESTRICT AUTOMERGE] [SettingsProvider] mem limit should be checked b…
schfan-1 Aug 17, 2022
0482912
RESTRICT AUTOMERGE Validate permission tree size on permission update
Sep 22, 2022
72e3992
[RESTRICT AUTOMERGE][SettingsProvider] key size limit for mutating se…
schfan-1 Oct 12, 2022
6fcc5a7
[RESTRICT AUTOMERGE] Trim the activity info of another uid if no priv…
Sep 28, 2022
aee8027
RESTRICT AUTOMERGE Revoke SYSTEM_ALERT_WINDOW on upgrade past api 23
Sep 23, 2022
6984211
Add protections against queueing a UsbRequest when the underlying Usb…
Sep 23, 2022
3078e34
Fix sharing to another profile where an app has multiple targets
Oct 11, 2022
e013ca3
Ensure that only SysUI can override pending intent launch flags
Oct 18, 2022
cbedf5d
Make Activites touch opaque - DO NOT MERGE
Apr 28, 2022
d2e9922
[RESTRICT AUTOMERGE] Correct the behavior of ACTION_PACKAGE_DATA_CLEARED
kjackal Oct 25, 2022
82e83e2
Convert argument to intent in ChooseTypeAndAccountActivity
Nov 22, 2022
b0f40d6
Use rule package name in addAutomaticZenRule; specify "android" for a…
Nov 9, 2022
d848096
Revert "[RESTRICT AUTOMERGE] Trim the activity info of another uid if…
Jan 4, 2023
274c679
Move service initialization
May 16, 2022
7f71738
Stop managed profile owner granting READ_SMS
acjohnstong Oct 5, 2021
a696399
Enable user graularity for lockdown mode
wenhao1006 Aug 30, 2022
6199808
RESTRICT AUTOMERGE Revoke dev perm if app is upgrading to post 23 and…
Dec 2, 2022
27f86d2
Reconcile WorkSource parcel and unparcel code.
Sep 26, 2022
807e331
Revert "Ensure that only SysUI can override pending intent launch flags"
Jan 11, 2023
e9ae0aa
DO NOT MERGE: Context#startInstrumentation could be started from SHEL…
Aug 4, 2022
d40cc3e
Checking if package belongs to UID before registering broadcast receiver
Nov 7, 2022
d2df6ed
Fix checkKeyIntentParceledCorrectly's bypass
haok-ggl Dec 12, 2022
b1cb613
Encode Intent scheme when serializing to URI string RESTRICT AUTOMERGE
Jan 6, 2023
4b97866
[DO NOT MERGE] Backport BAL restrictions from S to R, this blocks app…
Dec 27, 2022
db7b066
[RESTRICT AUTOMERGE] Strip part of the activity info of another uid i…
Sep 28, 2022
bed0b6a
Add a limit on channel group creation
Jan 18, 2022
db4753f
[RESTRICT AUTOMERGE] Fix bypass BG-FGS and BAL via package manager APIs
Jan 11, 2023
7daeca0
Revert "Make Activites touch opaque - DO NOT MERGE"
jwdunlap Mar 1, 2023
97f90e3
[RESTRICT AUTOMERGE][pm] prevent system app downgrades of versions lo…
schfan-1 Jan 27, 2023
d75c8da
[RESTRICT AUTOMERGE][pm] still allow debuggable for system app downgr…
schfan-1 Feb 2, 2023
558985f
Checks if AccessibilityServiceInfo is within parcelable size.
Daniel-Norman Feb 9, 2023
cfc01d5
Uri: check authority and scheme as part of determining URI path
ohodson Apr 7, 2022
92d5ce6
enforce stricter rules when registering phoneAccounts
Nov 22, 2022
e5794f5
Make Activites touch opaque - DO NOT MERGE
Mar 1, 2023
9c891b4
Trim strings added to persistent snoozed notification storage.
Jan 5, 2023
03af18d
Limit the number of shortcuts per app that can be retained by system
pinyaoting Feb 15, 2023
5e3d42c
Fix WindowInputTests#testOverlapWindow failing (1/2)
Jul 23, 2020
54639f1
Prevent sharesheet from previewing unowned URIs
Feb 22, 2023
f1e9d24
[DO NOT MERGE] Wait for preloading images to complete before inflatin…
Feb 15, 2023
173fa2f
[DO NOT MERGE] Prevent RemoteViews crashing SystemUi
Feb 22, 2023
ffa6d86
Check key intent for selectors and prohibited flags
g-brnlee Feb 18, 2023
6306afd
Handle invalid data during job loading.
kwadkore Sep 21, 2022
2b30208
Allow filtering of services
Mar 7, 2023
7d0b119
Enforce DevicePolicyManager.setUserControlDisabledPackages in AppStan…
acjohnstong Mar 8, 2023
d87fe78
[RESTRICT AUTOMERGE] Add BubbleMetadata detection to block FSI
Mar 24, 2023
f8989ce
Remove Activity if it enters PiP without window
hwwang-google Feb 23, 2023
b7f58f4
[RESTRICT AUTOMERGE] Passpoint Add more check to limit the config size
Oct 26, 2022
0fdaef8
Sanitize VPN label to prevent HTML injection
Mar 3, 2023
4e49917
Limit the number of supported v1 and v2 signers
mpgroover Mar 31, 2023
2562c48
Import translations. DO NOT MERGE ANYWHERE
Apr 4, 2023
dc1b147
DO NOT MERGE: Add size check on PPS#policy
Apr 13, 2023
54bf996
DO NOT MERGE: Limit the ServiceFriendlyNames
Apr 12, 2023
dfbe3bb
Only allow NEW_TASK flag when adjusting pending intents
Feb 8, 2023
2f129d9
DO NOT MERGE Dismiss keyguard when simpin auth'd and...
Mar 28, 2023
bb0b453
DO NOT MERGE Increase notification channel limit.
Apr 28, 2023
956f78a
Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.
Apr 21, 2023
c6994f0
Truncate ShortcutInfo Id
Apr 21, 2023
beb775c
Visit URIs in landscape/portrait custom remote views.
Apr 27, 2023
38851f4
DO NOT MERGE: ActivityManager#killBackgroundProcesses can kill caller…
Oct 26, 2022
15b5e6b
ActivityManagerService: Allow openContentUri from vendor/system/product.
gborgera2 Mar 18, 2023
f3dbc0f
Verify URI permissions for notification shortcutIcon.
Apr 27, 2023
7360c3c
On device lockdown, always show the keyguard
May 8, 2023
60e1454
Ensure policy has no absurdly long strings
Apr 5, 2023
6c4ac69
Implement visitUris for RemoteViews ViewGroupActionAdd.
May 12, 2023
fc2d6e0
Check URIs in notification public version.
May 15, 2023
691b692
Verify URI permissions in MediaMetadata
Apr 28, 2023
f5ff325
Use Settings.System.getIntForUser instead of getInt to make sure user…
chandrusekar47 May 16, 2023
4451dd5
Resolve StatusHints image exploit across user.
May 25, 2023
164cd75
PixelPropUtils: Add GamesProps
rdxzv Aug 26, 2023
633f9f1
PixelPropsUtils: Add Gameprops for Battlegrounds Mobile India (BGMI)
SwapnilVicky Aug 26, 2023
3a6627a
[SQUASH] base: Implement MonetWannabe [1/3]
IacobIonut01 Feb 14, 2024
5252a39
DO NOT MERGE Revert "Verify URI permissions for EXTRA_REMOTE_INPUT_HI…
Jul 3, 2023
f38c6fb
DO NOT MERGE Grant carrier privileges if package has carrier config a…
Nov 1, 2022
d0afd1a
Ignore virtual presentation windows - RESTRICT AUTOMERGE
Jun 14, 2023
e9f510f
Forbid granting access to NLSes with too-long component names
Jun 15, 2023
80f93df
Update AccountManagerService checkKeyIntentParceledCorrectly.
Jun 30, 2023
5897d22
Improve user handling when querying for resumable media
Jun 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ filegroup {
":framework_native_aidl",
":gatekeeper_aidl",
":gsiservice_aidl",
":guiconstants_aidl",
":incidentcompanion_aidl",
":installd_aidl",
":keystore_aidl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ void restrictApp(@NonNull String packageName, int userId,

void setActiveAdminApps(Set<String> adminPkgs, int userId);

void setAdminProtectedPackages(Set<String> packageNames, int userId);

void onAdminDataAvailable();

void clearCarrierPrivilegedApps();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@ public void run() {
}
} catch (XmlPullParserException | IOException e) {
Slog.wtf(TAG, "Error jobstore xml.", e);
} catch (Exception e) {
// Crashing at this point would result in a boot loop, so live with a general
// Exception for system stability's sake.
Slog.wtf(TAG, "Unexpected exception", e);
} finally {
if (mPersistInfo.countAllJobsLoaded < 0) { // Only set them once.
mPersistInfo.countAllJobsLoaded = numJobs;
Expand Down Expand Up @@ -817,6 +821,15 @@ private JobStatus restoreJobFromXml(boolean rtcIsGood, XmlPullParser parser)
} catch (NumberFormatException e) {
Slog.d(TAG, "Error reading constraints, skipping.");
return null;
} catch (XmlPullParserException e) {
Slog.d(TAG, "Error Parser Exception.", e);
return null;
} catch (IOException e) {
Slog.d(TAG, "Error I/O Exception.", e);
return null;
} catch (IllegalArgumentException e) {
Slog.e(TAG, "Constraints contained invalid data", e);
return null;
}
parser.next(); // Consume </constraints>

Expand Down Expand Up @@ -912,8 +925,14 @@ private JobStatus restoreJobFromXml(boolean rtcIsGood, XmlPullParser parser)
return null;
}

PersistableBundle extras = PersistableBundle.restoreFromXml(parser);
jobBuilder.setExtras(extras);
final PersistableBundle extras;
try {
extras = PersistableBundle.restoreFromXml(parser);
jobBuilder.setExtras(extras);
} catch (IllegalArgumentException e) {
Slog.e(TAG, "Persisted extras contained invalid data", e);
return null;
}
parser.nextTag(); // Consume </extras>

final JobInfo builtJob;
Expand Down Expand Up @@ -959,7 +978,8 @@ private JobInfo.Builder buildBuilderFromXml(XmlPullParser parser) throws NumberF
return new JobInfo.Builder(jobId, cname);
}

private void buildConstraintsFromXml(JobInfo.Builder jobBuilder, XmlPullParser parser) {
private void buildConstraintsFromXml(JobInfo.Builder jobBuilder, XmlPullParser parser)
throws XmlPullParserException, IOException {
String val;

final String netCapabilities = parser.getAttributeValue(null, "net-capabilities");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ static class Lock {}
@GuardedBy("mActiveAdminApps")
private final SparseArray<Set<String>> mActiveAdminApps = new SparseArray<>();

/** List of admin protected packages. Can contain {@link android.os.UserHandle#USER_ALL}. */
@GuardedBy("mAdminProtectedPackages")
private final SparseArray<Set<String>> mAdminProtectedPackages = new SparseArray<>();

/**
* Set of system apps that are headless (don't have any declared activities, enabled or
* disabled). Presence in this map indicates that the app is a headless system app.
Expand Down Expand Up @@ -1019,6 +1023,9 @@ public void onUserRemoved(int userId) {
synchronized (mActiveAdminApps) {
mActiveAdminApps.remove(userId);
}
synchronized (mAdminProtectedPackages) {
mAdminProtectedPackages.remove(userId);
}
}
}

Expand Down Expand Up @@ -1108,6 +1115,10 @@ private int getAppMinBucket(String packageName, int appId, int userId) {
return STANDBY_BUCKET_EXEMPTED;
}

if (isAdminProtectedPackages(packageName, userId)) {
return STANDBY_BUCKET_EXEMPTED;
}

if (isActiveNetworkScorer(packageName)) {
return STANDBY_BUCKET_EXEMPTED;
}
Expand Down Expand Up @@ -1510,6 +1521,17 @@ boolean isActiveDeviceAdmin(String packageName, int userId) {
}
}

private boolean isAdminProtectedPackages(String packageName, int userId) {
synchronized (mAdminProtectedPackages) {
if (mAdminProtectedPackages.contains(UserHandle.USER_ALL)
&& mAdminProtectedPackages.get(UserHandle.USER_ALL).contains(packageName)) {
return true;
}
return mAdminProtectedPackages.contains(userId)
&& mAdminProtectedPackages.get(userId).contains(packageName);
}
}

@Override
public void addActiveDeviceAdmin(String adminPkg, int userId) {
synchronized (mActiveAdminApps) {
Expand All @@ -1533,6 +1555,17 @@ public void setActiveAdminApps(Set<String> adminPkgs, int userId) {
}
}

@Override
public void setAdminProtectedPackages(Set<String> packageNames, int userId) {
synchronized (mAdminProtectedPackages) {
if (packageNames == null || packageNames.isEmpty()) {
mAdminProtectedPackages.remove(userId);
} else {
mAdminProtectedPackages.put(userId, packageNames);
}
}
}

@Override
public void onAdminDataAvailable() {
mAdminDataAvailableLatch.countDown();
Expand All @@ -1555,6 +1588,13 @@ Set<String> getActiveAdminAppsForTest(int userId) {
}
}

@VisibleForTesting
Set<String> getAdminProtectedPackagesForTest(int userId) {
synchronized (mAdminProtectedPackages) {
return mAdminProtectedPackages.get(userId);
}
}

/**
* Returns {@code true} if the supplied package is the device provisioning app. Otherwise,
* returns {@code false}.
Expand Down
35 changes: 35 additions & 0 deletions api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,8 @@ package android {
field public static final int collapseIcon = 16844031; // 0x10104ff
field public static final int color = 16843173; // 0x10101a5
field public static final int colorAccent = 16843829; // 0x1010435
field public static final int colorAccentBackground = 16844311; // 0x1010617
field public static final int colorAccentOverlay = 16844312; // 0x1010618
field public static final int colorActivatedHighlight = 16843664; // 0x1010390
field public static final int colorBackground = 16842801; // 0x1010031
field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
Expand Down Expand Up @@ -1657,6 +1659,7 @@ package android {

public static final class R.color {
ctor public R.color();
field public static final int accent_background_device_default = 17170461; // 0x106001d
field public static final int background_dark = 17170446; // 0x106000e
field public static final int background_light = 17170447; // 0x106000f
field public static final int black = 17170444; // 0x106000c
Expand Down Expand Up @@ -12541,6 +12544,20 @@ package android.content.pm {

package android.content.res {

public class AccentUtils {
ctor public AccentUtils();
method public int getBackgroundAccentColor(int);
method public int getDarkAccentColor(int);
method public int getLightAccentColor(int);
method public int getOverlayDarkAccentColor(int);
method public int getOverlayLightAccentColor(int);
method public boolean isResourceAccentBackground(@Nullable String);
method public boolean isResourceAccentOverlayDark(@Nullable String);
method public boolean isResourceAccentOverlayLight(@Nullable String);
method public boolean isResourceDarkAccent(@Nullable String);
method public boolean isResourceLightAccent(@Nullable String);
}

public class AssetFileDescriptor implements java.io.Closeable android.os.Parcelable {
ctor public AssetFileDescriptor(android.os.ParcelFileDescriptor, long, long);
ctor public AssetFileDescriptor(android.os.ParcelFileDescriptor, long, long, android.os.Bundle);
Expand Down Expand Up @@ -12722,6 +12739,23 @@ package android.content.res {
field public int uiMode;
}

public class MonetWannabe {
ctor public MonetWannabe(@NonNull android.content.Context);
method @ColorInt public static int adjustAlpha(@ColorInt int, float);
method public int getAccentColor();
method public int getAccentColorBackground();
method public int getAccentColorOverlayDark();
method public int getAccentColorOverlayLight();
method public static int getInactiveAccent(@NonNull android.content.Context);
method public static boolean isMonetEnabled(@NonNull android.content.Context);
method public static int manipulateColor(int, float);
method public static boolean shouldForceLoad(@NonNull android.content.Context);
method public static int updateMonet(@NonNull android.content.Context);
field public static final int DEFAULT_COLOR_GEN = 16; // 0x10
field public static final float DEFAULT_DARK_ALTERATION = 0.8f;
field public static final float DEFAULT_LIGHT_ALTERATION = 0.7f;
}

public class ObbInfo implements android.os.Parcelable {
method public int describeContents();
method public void writeToParcel(android.os.Parcel, int);
Expand Down Expand Up @@ -40776,6 +40810,7 @@ package android.provider {
field public static final String BLUETOOTH_DISCOVERABILITY = "bluetooth_discoverability";
field public static final String BLUETOOTH_DISCOVERABILITY_TIMEOUT = "bluetooth_discoverability_timeout";
field @Deprecated public static final String BLUETOOTH_ON = "bluetooth_on";
field public static final String BUTTON_BACKLIGHT_ONLY_WHEN_PRESSED = "button_backlight_only_when_pressed";
field public static final android.net.Uri CONTENT_URI;
field @Deprecated public static final String DATA_ROAMING = "data_roaming";
field public static final String DATE_FORMAT = "date_format";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,10 @@ private void sendServiceInfo() {
IAccessibilityServiceConnection connection =
AccessibilityInteractionClient.getInstance().getConnection(mConnectionId);
if (mInfo != null && connection != null) {
if (!mInfo.isWithinParcelableSize()) {
throw new IllegalStateException(
"Cannot update service info: size is larger than safe parcelable limits.");
}
try {
connection.setServiceInfo(mInfo);
mInfo = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import android.graphics.drawable.Drawable;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Build;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
Expand Down Expand Up @@ -1028,6 +1029,15 @@ public int describeContents() {
return 0;
}

/** @hide */
public final boolean isWithinParcelableSize() {
final Parcel parcel = Parcel.obtain();
writeToParcel(parcel, 0);
final boolean result = parcel.dataSize() <= IBinder.MAX_IPC_SIZE;
parcel.recycle();
return result;
}

public void writeToParcel(Parcel parcel, int flagz) {
parcel.writeInt(eventTypes);
parcel.writeStringArray(packageNames);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public void run(final AccountManagerFuture<Bundle> accountManagerFuture) {
mExistingAccounts = AccountManager.get(this).getAccountsForPackage(mCallingPackage,
mCallingUid);
intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
startActivityForResult(intent, REQUEST_ADD_ACCOUNT);
startActivityForResult(new Intent(intent), REQUEST_ADD_ACCOUNT);
return;
}
} catch (OperationCanceledException e) {
Expand Down
3 changes: 3 additions & 0 deletions core/java/android/app/ActivityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3933,6 +3933,9 @@ public void restartPackage(String packageName) {
* processes to reclaim memory; the system will take care of restarting
* these processes in the future as needed.
*
* <p class="note">Third party applications can only use this API to kill their own processes.
* </p>
*
* @param packageName The name of the package whose processes are to
* be killed.
*/
Expand Down
16 changes: 10 additions & 6 deletions core/java/android/app/ActivityOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import static android.app.ActivityTaskManager.SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_RECEIVER_FOREGROUND;
import static android.view.Display.INVALID_DISPLAY;

import android.annotation.NonNull;
Expand Down Expand Up @@ -61,7 +63,7 @@
* {@link android.content.Context#startActivity(android.content.Intent, android.os.Bundle)
* Context.startActivity(Intent, Bundle)} and related methods.
*/
public class ActivityOptions {
public class ActivityOptions extends ComponentOptions {
private static final String TAG = "ActivityOptions";

/**
Expand Down Expand Up @@ -963,13 +965,12 @@ public boolean getLaunchTaskBehind() {
}

private ActivityOptions() {
super();
}

/** @hide */
public ActivityOptions(Bundle opts) {
// If the remote side sent us bad parcelables, they won't get the
// results they want, which is their loss.
opts.setDefusable(true);
super(opts);

mPackageName = opts.getString(KEY_PACKAGE_NAME);
try {
Expand Down Expand Up @@ -1373,7 +1374,9 @@ public void setPendingIntentLaunchFlags(@android.content.Intent.Flags int flags)
* @hide
*/
public int getPendingIntentLaunchFlags() {
return mPendingIntentLaunchFlags;
// b/243794108: Ignore all flags except the new task flag, to be reconsidered in b/254490217
return mPendingIntentLaunchFlags &
(FLAG_ACTIVITY_NEW_TASK | FLAG_RECEIVER_FOREGROUND);
}

/**
Expand Down Expand Up @@ -1575,8 +1578,9 @@ public void update(ActivityOptions otherOptions) {
* object; you must not modify it, but can supply it to the startActivity
* methods that take an options Bundle.
*/
@Override
public Bundle toBundle() {
Bundle b = new Bundle();
Bundle b = super.toBundle();
if (mPackageName != null) {
b.putString(KEY_PACKAGE_NAME, mPackageName);
}
Expand Down
Loading