Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
190aeff
NotificationPanelView: Switch to Tuner API
neobuddy89 Jan 9, 2024
c907ad4
SystemUI: Port statusbar brightness control
Alberto97 Mar 28, 1997
55e6791
SystemUI: Fix and add status bar brightness control for lockscreen
neobuddy89 May 14, 2026
4738b90
haptics: Allow to set predefined feedback for texture tick effect
iusmac May 17, 2026
4f93125
services: Optimizing redundant keyguard checks
rmp22 Apr 30, 2026
be1d7d6
Fix NPE in JobServiceContext.handleOpTimeoutLocked()
May 9, 2026
f52d8e2
Fix flaky test in b/504933143.
Apr 30, 2026
7439f54
Prevent system_server from restarting due to app issues.
Apr 13, 2026
626ce5e
AMS appDiedLocked killProcessQuiet is vulnerable to PID reuse race, c…
May 14, 2026
01f762f
SystemUI: Add 2 colon clocks
Ghosuto May 8, 2026
3be0fc4
SystemUI: Add more clocks [1/2]
Ghosuto May 17, 2026
b6a7067
FileRotator:fix NPE due to The File.list() method may be return null.
Apr 26, 2024
f8ead81
Fix NPE when IntentFilter doesn't have any data type.
Jiangyou-li Apr 14, 2025
642c0c6
Fix NPE in TextToSpeechManagerPerUserService
Jiangyou-li Dec 8, 2023
a972328
telephony: Trim warning log if app not installed
neobuddy89 Apr 14, 2025
24d0663
core: Catch OOB when returning pooled string
minaripenguin Jun 5, 2023
9779015
services: Reducing icons memory usage
rmp22 Feb 13, 2025
ed4509a
EventLog: Disable event writing in production builds
kdrag0n Apr 6, 2021
6df7d29
[event_log] disabling event writing for user debug builds
rmp22 Feb 8, 2025
abe6a8e
NSSLC: Prevent possible memory leak
minaripenguin Sep 8, 2024
948b8c2
screenrecord: Set entire screenrecord as the default option
sourajitk Jan 29, 2025
c2a7345
SettingsLib: Improve expressive card text
Ghosuto Nov 14, 2025
0c9ccfb
SystemUI: Use transparent color for Keyguard bottom background
Ghosuto Jan 10, 2023
e8736d5
SystemUI: Disable DebugLogger for release build
someone5678 Dec 28, 2024
c10df7d
Match legacy toast view with SystemUI
SagarMakhar Oct 31, 2021
23e81a2
core: Improve notification toast format and fix for apps < sdk 29
minaripenguin May 2, 2023
3d99611
SystemUI: Change log level for multiple blur values emitted warning t…
NurKeinNeid Jan 18, 2026
4829722
SceneTransitionLayoutState: downgrade log spam to debug
shutter-cat Sep 22, 2025
14d5af0
SettingsLib: shrink 4g+ icon
shutter-cat Jan 23, 2026
0ac6c04
fwb: stop performance hint spam
shutter-cat Jan 20, 2026
e031605
SystemUI: Fixing jank by media player layer type
rmp22 Apr 1, 2026
b2be8de
services: Background apps compression
rmp22 Feb 14, 2026
ae8953c
SystemUI: Fixing random date disappearance
rmp22 Apr 5, 2026
277a40f
services: Reducing app freezer thrashing
rmp22 Apr 14, 2026
5eed2ba
services: Fixing letter box regression
rmp22 Apr 23, 2026
d05d20a
services: Snapshot cache entry cap
rmp22 Apr 21, 2026
53f9ebd
SystemUI: Reducing qs compose rendering overhead during scroll
rmp22 Apr 10, 2026
892756d
services: Deferring zram compaction during app launch
rmp22 Apr 10, 2026
2b66422
SystemUI: Skipping overlays application on managed profiles
rmp22 Apr 11, 2026
79c6e88
SystemUI: Debouncing wallpaper color extraction on shade dim
rmp22 Apr 12, 2026
8f1d7ec
services: Reducing hinge angle sensor polling from 1000hz to normal
rmp22 Apr 12, 2026
028beb2
SystemUI: Offloading bouncer haptic vibrator calls to bg
rmp22 Apr 18, 2026
be9604b
core: Skipping empty callback queues in doCallbacks
rmp22 Apr 10, 2026
f15dbd8
SettingsLib: Fix expressive preference text color
Ghosuto Apr 21, 2026
25c8f49
SystemUI: Use Material3 switches for internet and BT dialog tiles
HELLBOY017 Jan 15, 2026
76f980b
SystemUI: Use Material3 switches for screenrecord options
HELLBOY017 Dec 14, 2024
8b2274b
New translations hertzify_strings.xml (Vietnamese)
hdzungx Jun 1, 2026
5a69fb4
New translations hertzify_strings.xml (Romanian)
hdzungx Jun 1, 2026
c5a2013
New translations hertzify_strings.xml (French)
hdzungx Jun 1, 2026
aea0ec3
New translations hertzify_strings.xml (Spanish)
hdzungx Jun 1, 2026
c465518
New translations hertzify_strings.xml (Afrikaans)
hdzungx Jun 1, 2026
cb927ea
New translations hertzify_strings.xml (Arabic)
hdzungx Jun 1, 2026
71dd7b5
New translations hertzify_strings.xml (Catalan)
hdzungx Jun 1, 2026
929522b
New translations hertzify_strings.xml (Czech)
hdzungx Jun 1, 2026
20b0754
New translations hertzify_strings.xml (Danish)
hdzungx Jun 1, 2026
376f693
New translations hertzify_strings.xml (German)
hdzungx Jun 1, 2026
6c555e9
New translations hertzify_strings.xml (Greek)
hdzungx Jun 1, 2026
d0cbd20
New translations hertzify_strings.xml (Finnish)
hdzungx Jun 1, 2026
e9609d7
New translations hertzify_strings.xml (Hebrew)
hdzungx Jun 1, 2026
a505f9f
New translations hertzify_strings.xml (Hungarian)
hdzungx Jun 1, 2026
f76b6e8
New translations hertzify_strings.xml (Italian)
hdzungx Jun 1, 2026
f08aed5
New translations hertzify_strings.xml (Japanese)
hdzungx Jun 1, 2026
20d5e86
New translations hertzify_strings.xml (Korean)
hdzungx Jun 1, 2026
9736a32
New translations hertzify_strings.xml (Dutch)
hdzungx Jun 1, 2026
5305dce
New translations hertzify_strings.xml (Norwegian)
hdzungx Jun 1, 2026
e99d047
New translations hertzify_strings.xml (Polish)
hdzungx Jun 1, 2026
7a64129
New translations hertzify_strings.xml (Portuguese)
hdzungx Jun 1, 2026
65df7a5
New translations hertzify_strings.xml (Russian)
hdzungx Jun 1, 2026
a4dc2be
New translations hertzify_strings.xml (Serbian (Cyrillic))
hdzungx Jun 1, 2026
9273b00
New translations hertzify_strings.xml (Swedish)
hdzungx Jun 1, 2026
f520625
New translations hertzify_strings.xml (Turkish)
hdzungx Jun 1, 2026
2b16f08
New translations hertzify_strings.xml (Ukrainian)
hdzungx Jun 1, 2026
5830869
New translations hertzify_strings.xml (Chinese Simplified)
hdzungx Jun 1, 2026
8786a1a
New translations hertzify_strings.xml (Chinese Traditional)
hdzungx Jun 1, 2026
90ce16f
New translations hertzify_strings.xml (English)
hdzungx Jun 1, 2026
62dfa67
New translations hertzify_strings.xml (Portuguese, Brazilian)
hdzungx Jun 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1485,9 +1485,11 @@ void handleOpTimeoutLocked() {
} else {
Slog.i(TAG, "JS was waiting to stop this job."
+ " Sending onStop: " + getRunningJobNameLocked());
mParams.setStopReason(mPendingStopReason, mPendingInternalStopReason,
mPendingDebugStopReason);
sendStopMessageLocked(mPendingDebugStopReason);
if (mParams != null) {
mParams.setStopReason(mPendingStopReason, mPendingInternalStopReason,
mPendingDebugStopReason);
sendStopMessageLocked(mPendingDebugStopReason);
}
mAnrTimer.discard();
break;
}
Expand Down
10 changes: 8 additions & 2 deletions core/java/android/content/res/AssetManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,14 @@ public boolean containsAllocatedTable() {

@Nullable
CharSequence getPooledStringForCookie(int cookie, int id) {
// Cookies map to ApkAssets starting at 1.
return getApkAssets()[cookie - 1].getStringFromPool(id);
ApkAssets[] apkAssets = getApkAssets();

if (cookie > 0 && cookie <= apkAssets.length) {
// map cookies starting at 1.
return apkAssets[cookie - 1].getStringFromPool(id);
}

return null;
}

/**
Expand Down
25 changes: 25 additions & 0 deletions core/java/android/os/Process.java
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,31 @@ public static final void killProcessQuiet(int pid) {
sendSignalQuiet(pid, SIGNAL_KILL);
}

/**
* @hide
* PID-reuse-safe variant of {@link #killProcessQuiet(int)} backed by
* pidfd_open + pidfd_send_signal. Pass {@code expectedUid < 0} to skip
* the uid check. Falls back to the legacy path on kernels without pidfd.
*/
public static final void killProcessByPidfdQuiet(int pid, int expectedUid) {
if (pid <= 0) {
return;
}
if (supportsPidFd()) {
int rc = nativeKillProcessByPidfdQuiet(pid, SIGNAL_KILL, expectedUid);
if (rc >= 0) {
return;
}
}
// Fallback: re-check uid via /proc to avoid killing a recycled pid.
if (expectedUid >= 0 && getUidForPid(pid) != expectedUid) {
return;
}
sendSignalQuiet(pid, SIGNAL_KILL);
}

private static native int nativeKillProcessByPidfdQuiet(int pid, int signal, int expectedUid);

/**
* @hide
* Private impl for avoiding a log message... DO NOT USE without doing
Expand Down
14 changes: 14 additions & 0 deletions core/java/android/provider/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -7032,6 +7032,13 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean
*/
public static final String DOZE_TRIGGER_DOUBLETAP = "doze_trigger_doubletap";

/**
* Whether to control brightness from status bar on lockscreen
* 0 = 0ff, 1 = on
* @hide
*/
public static final String STATUS_BAR_BRIGHTNESS_CONTROL_LOCKSCREEN = "status_bar_brightness_control_lockscreen";

/**
* Whether to enable smart 5G mode
* @hide
Expand Down Expand Up @@ -7374,6 +7381,13 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean
*/
public static final String FORCE_FULLSCREEN_CUTOUT_APPS = "force_full_screen_cutout_apps";

/**
* Whether to control brightness from status bar
* 0 = 0ff, 1 = on
* @hide
*/
public static final String STATUS_BAR_BRIGHTNESS_CONTROL = "status_bar_brightness_control";

/**
* Keys we no longer back up under the current schema, but want to continue to
* process when restoring historical backup datasets.
Expand Down
74 changes: 64 additions & 10 deletions core/java/android/util/EventLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,20 @@ public int hashCode() {
}
}

// We assume that the native methods deal with any concurrency issues.

/**
* Record an event log message.
* @param tag The event type tag code
* @param value A value to log
* @return The number of bytes written
*/
@RavenwoodRedirect
public static native int writeEvent(int tag, int value);
public static int writeEvent(int tag, int value) {
if (!Build.IS_ENG) {
return 0;
}

return nativeWriteEvent(tag, value);
}

/**
* Record an event log message.
Expand All @@ -352,7 +356,13 @@ public int hashCode() {
* @return The number of bytes written
*/
@RavenwoodRedirect
public static native int writeEvent(int tag, long value);
public static int writeEvent(int tag, long value) {
if (!Build.IS_ENG) {
return 0;
}

return nativeWriteEvent(tag, value);
}

/**
* Record an event log message.
Expand All @@ -361,7 +371,13 @@ public int hashCode() {
* @return The number of bytes written
*/
@RavenwoodRedirect
public static native int writeEvent(int tag, float value);
public static int writeEvent(int tag, float value) {
if (!Build.IS_ENG) {
return 0;
}

return nativeWriteEvent(tag, value);
}

/**
* Record an event log message.
Expand All @@ -370,7 +386,13 @@ public int hashCode() {
* @return The number of bytes written
*/
@RavenwoodRedirect
public static native int writeEvent(int tag, String str);
public static int writeEvent(int tag, String str) {
if (!Build.IS_ENG) {
return 0;
}

return nativeWriteEvent(tag, str);
}

/**
* Record an event log message.
Expand All @@ -379,7 +401,13 @@ public int hashCode() {
* @return The number of bytes written
*/
@RavenwoodRedirect
public static native int writeEvent(int tag, Object... list);
public static int writeEvent(int tag, Object... list) {
if (!Build.IS_ENG) {
return 0;
}

return nativeWriteEvent(tag, list);
}

/**
* Read events from the log, filtered by type.
Expand All @@ -388,8 +416,14 @@ public int hashCode() {
* @throws IOException if something goes wrong reading events
*/
@RavenwoodThrow
public static native void readEvents(int[] tags, Collection<Event> output)
throws IOException;
public static void readEvents(int[] tags, Collection<Event> output)
throws IOException {
if (!Build.IS_ENG) {
return;
}

nativeReadEvents(tags, output);
}

/**
* Read events from the log, filtered by type, blocking until logs are about to be overwritten.
Expand All @@ -401,7 +435,27 @@ public static native void readEvents(int[] tags, Collection<Event> output)
*/
@SystemApi
@RavenwoodThrow
public static native void readEventsOnWrapping(int[] tags, long timestamp,
public static void readEventsOnWrapping(int[] tags, long timestamp,
Collection<Event> output)
throws IOException {
if (!Build.IS_ENG) {
return;
}

nativeReadEventsOnWrapping(tags, timestamp, output);
}

// We assume that the native methods deal with any concurrency issues.

private static native int nativeWriteEvent(int tag, int value);
private static native int nativeWriteEvent(int tag, long value);
private static native int nativeWriteEvent(int tag, float value);
private static native int nativeWriteEvent(int tag, String str);
private static native int nativeWriteEvent(int tag, Object... list);

private static native void nativeReadEvents(int[] tags, Collection<Event> output)
throws IOException;
private static native void nativeReadEventsOnWrapping(int[] tags, long timestamp,
Collection<Event> output)
throws IOException;

Expand Down
5 changes: 4 additions & 1 deletion core/java/android/view/Choreographer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,10 @@ void doFrame(long frameTimeNanos, int frame,

void doCallbacks(int callbackType, long frameIntervalNanos) {
CallbackRecord callbacks;
long frameTimeNanos = mFrameData.mFrameTimeNanos;
synchronized (mLock) {
if (mCallbackQueues[callbackType].mHead == null) {
return;
}
// We use "now" to determine when callbacks become due because it's possible
// for earlier processing phases in a frame to post callbacks that should run
// in a following phase, such as an input event that causes an animation to start.
Expand All @@ -1219,6 +1221,7 @@ void doCallbacks(int callbackType, long frameIntervalNanos) {
// or equal to the previous frame's commit frame time. Keep in mind that the
// next frame has most likely already been scheduled by now so we play it
// safe by ensuring the commit time is always at least one frame behind.
long frameTimeNanos = mFrameData.mFrameTimeNanos;
if (callbackType == Choreographer.CALLBACK_COMMIT) {
final long jitterNanos = now - frameTimeNanos;
Trace.traceCounter(Trace.TRACE_TAG_VIEW, "jitterNanos", (int) jitterNanos);
Expand Down
10 changes: 9 additions & 1 deletion core/java/com/android/internal/util/FileRotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,15 @@ private String getActiveName(long currentTimeMillis) {
long oldestActiveStart = Long.MAX_VALUE;

final FileInfo info = new FileInfo(mPrefix);
for (String name : mBasePath.list()) {
String[] baseFiles = mBasePath.list();
if (baseFiles == null) {
// no file in the path and create one starting now
info.startMillis = currentTimeMillis;
info.endMillis = Long.MAX_VALUE;
return info.build();
}

for (String name : baseFiles) {
if (!info.parse(name)) continue;

// pick the oldest active file which covers current time
Expand Down
14 changes: 7 additions & 7 deletions core/jni/android_util_EventLog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ static void android_util_EventLog_readEventsOnWrapping(JNIEnv* env, jobject claz
*/
static const JNINativeMethod gRegisterMethods[] = {
/* name, signature, funcPtr */
{ "writeEvent", "(II)I", (void*) ELog::writeEventInteger },
{ "writeEvent", "(IJ)I", (void*) ELog::writeEventLong },
{ "writeEvent", "(IF)I", (void*) ELog::writeEventFloat },
{ "writeEvent", "(ILjava/lang/String;)I", (void*) ELog::writeEventString },
{ "writeEvent", "(I[Ljava/lang/Object;)I", (void*) ELog::writeEventArray },
{ "readEvents",
{ "nativeWriteEvent", "(II)I", (void*) ELog::writeEventInteger },
{ "nativeWriteEvent", "(IJ)I", (void*) ELog::writeEventLong },
{ "nativeWriteEvent", "(IF)I", (void*) ELog::writeEventFloat },
{ "nativeWriteEvent", "(ILjava/lang/String;)I", (void*) ELog::writeEventString },
{ "nativeWriteEvent", "(I[Ljava/lang/Object;)I", (void*) ELog::writeEventArray },
{ "nativeReadEvents",
"([ILjava/util/Collection;)V",
(void*) android_util_EventLog_readEvents
},
{ "readEventsOnWrapping",
{ "nativeReadEventsOnWrapping",
"([IJLjava/util/Collection;)V",
(void*) android_util_EventLog_readEventsOnWrapping
},
Expand Down
43 changes: 43 additions & 0 deletions core/jni/android_util_Process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,47 @@ static jint android_os_Process_nativePidFdOpen(JNIEnv* env, jobject, jint pid, j
return fd;
}

// Kill via pidfd to defeat PID-reuse races.
// Returns: 0=delivered, 1=target gone, 2=uid mismatch (suppressed), -1=error.
static jint android_os_Process_killProcessByPidfdQuiet(JNIEnv* /*env*/, jobject /*clazz*/,
jint pid, jint signal, jint expectedUid) {
if (pid <= 0) {
return -1;
}

int pfd = pidfd_open(pid, 0);
if (pfd < 0) {
if (errno == ESRCH) return 1;
if (errno == ENOSYS) {
ALOGW("pidfd_open(%d) ENOSYS, kernel too old for pidfd guard", pid);
return -1;
}
ALOGW("pidfd_open(%d) failed: %s", pid, strerror(errno));
return -1;
}

if (expectedUid >= 0) {
const int actualUid = uid_from_pid(pid);
if (actualUid != expectedUid) {
ALOGW("Skip kill: pid %d uid mismatch, expected=%d actual=%d (likely pid reuse)",
pid, expectedUid, actualUid);
close(pfd);
return 2;
}
}

int rc = pidfd_send_signal(pfd, signal, nullptr, 0);
int saved_errno = errno;
close(pfd);

if (rc == 0) return 0;
if (saved_errno == ESRCH) return 1;
ALOGW("pidfd_send_signal(pid=%d, sig=%d) failed: %s",
pid, signal, strerror(saved_errno));
errno = saved_errno;
return -1;
}

void android_os_Process_freezeCgroupUID(JNIEnv* env, jobject clazz, jint uid, jboolean freeze) {
if (uid < 0) {
jniThrowExceptionFmt(env, "java/lang/IllegalArgumentException", "uid is negative: %d", uid);
Expand Down Expand Up @@ -1398,6 +1439,8 @@ static const JNINativeMethod methods[] = {
{"sendSignalToProcessGroup", "(III)Z", (void*)android_os_Process_sendSignalToProcessGroup},
{"removeAllProcessGroups", "()V", (void*)android_os_Process_removeAllProcessGroups},
{"nativePidFdOpen", "(II)I", (void*)android_os_Process_nativePidFdOpen},
{"nativeKillProcessByPidfdQuiet", "(III)I",
(void*)android_os_Process_killProcessByPidfdQuiet},
{"freezeCgroupUid", "(IZ)V", (void*)android_os_Process_freezeCgroupUID},
};

Expand Down
Loading