Skip to content

Commit

Permalink
Merge ZP1A.240612.001
Browse files Browse the repository at this point in the history
Change-Id: I61970ee08d02591d401e73efde80135d74c7fad8
  • Loading branch information
Scott Lobdell committed Jun 25, 2024
2 parents 00bf694 + 1db3eec commit 397e95f
Show file tree
Hide file tree
Showing 397 changed files with 5,596 additions and 2,161 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_arm64/CtsShimPriv.apk"
}
dest_file: "packages/CtsShim/apk//arm/CtsShimPriv.apk"
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_arm64/CtsShim.apk"
}
dest_file: "packages/CtsShim/apk//arm/CtsShim.apk"
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_x86_64/CtsShimPriv.apk"
}
dest_file: "packages/CtsShim/apk//x86/CtsShimPriv.apk"
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
drops {
android_build_drop {
build_id: "10093150"
build_id: "11947186"
target: "CtsShim"
source_file: "aosp_x86_64/CtsShim.apk"
}
dest_file: "packages/CtsShim/apk//x86/CtsShim.apk"
version: ""
version_group: ""
git_project: "platform/frameworks/base"
git_branch: "udc-dev"
git_branch: "main"
transform: TRANSFORM_NONE
transform_options {
}
Expand Down
1 change: 1 addition & 0 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ java_defaults {
"android.hardware.common.fmq-V1-java",
"bouncycastle-repackaged-unbundled",
"com.android.sysprop.foldlockbehavior",
"com.android.sysprop.view",
"framework-internal-utils",
// If MimeMap ever becomes its own APEX, then this dependency would need to be removed
// in favor of an API stubs dependency in java_library "framework" below.
Expand Down
3 changes: 0 additions & 3 deletions cmds/bootanimation/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,4 @@ cc_library_shared {
"libGLESv2",
"libgui",
],
whole_static_libs: [
"libc++fs",
],
}
1 change: 0 additions & 1 deletion core/api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5605,7 +5605,6 @@ package android.app {
method @Deprecated public void onCancel(android.content.DialogInterface);
method @Deprecated public android.app.Dialog onCreateDialog(android.os.Bundle);
method @Deprecated public void onDismiss(android.content.DialogInterface);
method public android.view.LayoutInflater onGetLayoutInflater(android.os.Bundle);
method @Deprecated public void setCancelable(boolean);
method @Deprecated public void setShowsDialog(boolean);
method @Deprecated public void setStyle(int, int);
Expand Down
9 changes: 0 additions & 9 deletions core/java/android/app/IActivityManager.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -756,15 +756,6 @@ interface IActivityManager {
*/
void addStartInfoTimestamp(int key, long timestampNs, int userId);

/**
* Reports view related timestamps to be added to the calling apps most
* recent {@link ApplicationStartInfo}.
*
* @param renderThreadDrawStartTimeNs Clock monotonic time in nanoseconds of RenderThread draw start
* @param framePresentedTimeNs Clock monotonic time in nanoseconds of frame presented
*/
oneway void reportStartInfoViewTimestamps(long renderThreadDrawStartTimeNs, long framePresentedTimeNs);

/**
* Return a list of {@link ApplicationExitInfo} records.
*
Expand Down
6 changes: 3 additions & 3 deletions core/java/android/app/wearable/WearableSensingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public void unregisterDataRequestObserver(
* Consumer<android.service.voice.HotwordAudioStream>}, the system will check whether the {@link
* android.service.voice.VoiceInteractionService} at that time is {@code
* targetVisComponentName}. If not, the system will call {@link
* WearableSensingService#onActiveHotwordAudioStopRequested()} and will not forward the audio
* WearableSensingService#onStopHotwordAudioStream()} and will not forward the audio
* data to the current {@link android.service.voice.HotwordDetectionService} nor {@link
* android.service.voice.VoiceInteractionService}. The system will not send a status code to
* {@code statusConsumer} regarding the {@code targetVisComponentName} check. The caller is
Expand All @@ -464,9 +464,9 @@ public void unregisterDataRequestObserver(
* continue to use the previous consumers after receiving a new one.
*
* <p>If the {@code statusConsumer} returns {@link STATUS_SUCCESS}, the caller should call
* {@link #stopListeningForHotword(Executor, Consumer)} when it wants the wearable to stop
* {@link #stopHotwordRecognition(Executor, Consumer)} when it wants the wearable to stop
* listening for hotword. If the {@code statusConsumer} returns any other status code, a failure
* has occurred and calling {@link #stopListeningForHotword(Executor, Consumer)} is not
* has occurred and calling {@link #stopHotwordRecognition(Executor, Consumer)} is not
* required. The system will not retry listening automatically. The caller should call this
* method again if they want to retry.
*
Expand Down
11 changes: 11 additions & 0 deletions core/java/android/content/pm/PackageInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -2797,6 +2797,8 @@ public static class SessionParams implements Parcelable {
public int developmentInstallFlags = 0;
/** {@hide} */
public int unarchiveId = -1;
/** {@hide} */
public @Nullable String dexoptCompilerFilter = null;

private final ArrayMap<String, Integer> mPermissionStates;

Expand Down Expand Up @@ -2850,6 +2852,7 @@ public SessionParams(Parcel source) {
applicationEnabledSettingPersistent = source.readBoolean();
developmentInstallFlags = source.readInt();
unarchiveId = source.readInt();
dexoptCompilerFilter = source.readString();
}

/** {@hide} */
Expand Down Expand Up @@ -2885,6 +2888,7 @@ public SessionParams copy() {
ret.applicationEnabledSettingPersistent = applicationEnabledSettingPersistent;
ret.developmentInstallFlags = developmentInstallFlags;
ret.unarchiveId = unarchiveId;
ret.dexoptCompilerFilter = dexoptCompilerFilter;
return ret;
}

Expand Down Expand Up @@ -3563,6 +3567,11 @@ public void setUnarchiveId(int unarchiveId) {
this.unarchiveId = unarchiveId;
}

/** @hide */
public void setDexoptCompilerFilter(@Nullable String dexoptCompilerFilter) {
this.dexoptCompilerFilter = dexoptCompilerFilter;
}

/** @hide */
@NonNull
public ArrayMap<String, Integer> getPermissionStates() {
Expand Down Expand Up @@ -3622,6 +3631,7 @@ public void dump(IndentingPrintWriter pw) {
applicationEnabledSettingPersistent);
pw.printHexPair("developmentInstallFlags", developmentInstallFlags);
pw.printPair("unarchiveId", unarchiveId);
pw.printPair("dexoptCompilerFilter", dexoptCompilerFilter);
pw.println();
}

Expand Down Expand Up @@ -3667,6 +3677,7 @@ public void writeToParcel(Parcel dest, int flags) {
dest.writeBoolean(applicationEnabledSettingPersistent);
dest.writeInt(developmentInstallFlags);
dest.writeInt(unarchiveId);
dest.writeString(dexoptCompilerFilter);
}

public static final Parcelable.Creator<SessionParams>
Expand Down
Empty file modified core/java/android/database/DefaultDatabaseErrorHandler.java
100755 → 100644
Empty file.
40 changes: 38 additions & 2 deletions core/java/android/hardware/biometrics/BiometricPrompt.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.hardware.face.FaceManager;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Binder;
Expand Down Expand Up @@ -193,7 +196,11 @@ public Builder(Context context) {
@RequiresPermission(SET_BIOMETRIC_DIALOG_ADVANCED)
@NonNull
public BiometricPrompt.Builder setLogoRes(@DrawableRes int logoRes) {
mPromptInfo.setLogoRes(logoRes);
if (mPromptInfo.getLogoBitmap() != null) {
throw new IllegalStateException(
"Exclusively one of logo resource or logo bitmap can be set");
}
mPromptInfo.setLogo(logoRes, convertDrawableToBitmap(mContext.getDrawable(logoRes)));
return this;
}

Expand All @@ -212,7 +219,11 @@ public BiometricPrompt.Builder setLogoRes(@DrawableRes int logoRes) {
@RequiresPermission(SET_BIOMETRIC_DIALOG_ADVANCED)
@NonNull
public BiometricPrompt.Builder setLogoBitmap(@NonNull Bitmap logoBitmap) {
mPromptInfo.setLogoBitmap(logoBitmap);
if (mPromptInfo.getLogoRes() != -1) {
throw new IllegalStateException(
"Exclusively one of logo resource or logo bitmap can be set");
}
mPromptInfo.setLogo(-1, logoBitmap);
return this;
}

Expand Down Expand Up @@ -1516,4 +1527,29 @@ private long authenticateInternal(
private static boolean isCredentialAllowed(@Authenticators.Types int allowedAuthenticators) {
return (allowedAuthenticators & Authenticators.DEVICE_CREDENTIAL) != 0;
}

/** Converts {@code drawable} to a {@link Bitmap}. */
private static Bitmap convertDrawableToBitmap(Drawable drawable) {
if (drawable == null) {
return null;
}

if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable) drawable).getBitmap();
}

Bitmap bitmap;
if (drawable.getIntrinsicWidth() <= 0 || drawable.getIntrinsicHeight() <= 0) {
bitmap = Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
// Single color bitmap will be created of 1x1 pixel
} else {
bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
}

final Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return bitmap;
}
}
39 changes: 26 additions & 13 deletions core/java/android/hardware/biometrics/PromptInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,17 @@ public boolean isContentViewMoreOptionsButtonUsed() {
// LINT.ThenChange(frameworks/base/core/java/android/hardware/biometrics/BiometricPrompt.java)

// Setters
public void setLogoRes(@DrawableRes int logoRes) {
mLogoRes = logoRes;
checkOnlyOneLogoSet();
}

public void setLogoBitmap(@NonNull Bitmap logoBitmap) {
/**
* Sets logo res and bitmap
*
* @param logoRes The logo res set by the app; Or -1 if the app sets bitmap directly.
* @param logoBitmap The bitmap from logoRes if the app sets logoRes; Or the bitmap set by the
* app directly.
*/
public void setLogo(@DrawableRes int logoRes, @NonNull Bitmap logoBitmap) {
mLogoRes = logoRes;
mLogoBitmap = logoBitmap;
checkOnlyOneLogoSet();
}

public void setLogoDescription(@NonNull String logoDescription) {
Expand Down Expand Up @@ -326,13 +329,29 @@ public void setUseParentProfileForDeviceCredential(
}

// Getters

/**
* Returns the logo bitmap either from logo resource or bitmap passed in from the app.
*/
public Bitmap getLogo() {
return mLogoBitmap;
}

/**
* Returns the logo res set by the app.
*/
@DrawableRes
public int getLogoRes() {
return mLogoRes;
}

/**
* Returns the logo bitmap set by the app.
*/
public Bitmap getLogoBitmap() {
return mLogoBitmap;
// If mLogoRes has been set, return null since mLogoBitmap is from the res, but not from
// the app directly.
return mLogoRes == -1 ? mLogoBitmap : null;
}

public String getLogoDescription() {
Expand Down Expand Up @@ -436,10 +455,4 @@ public ComponentName getComponentNameForConfirmDeviceCredentialActivity() {
return mComponentNameForConfirmDeviceCredentialActivity;
}

private void checkOnlyOneLogoSet() {
if (mLogoRes != -1 && mLogoBitmap != null) {
throw new IllegalStateException(
"Exclusively one of logo resource or logo bitmap can be set");
}
}
}
7 changes: 2 additions & 5 deletions core/java/android/hardware/camera2/CameraMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -2356,11 +2356,8 @@ private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filt
* <p>If the session configuration is not supported, the AE mode reported in the
* CaptureResult will be 'ON' instead of 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY'.</p>
* <p>When this AE mode is enabled, the CaptureResult field
* {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} will be present and not null. Otherwise, the
* {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} field will not be present in the CaptureResult.</p>
* <p>The application can observe the CaptureResult field
* {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} to determine when low light boost is 'ACTIVE' or
* 'INACTIVE'.</p>
* {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} will indicate when low light boost is 'ACTIVE'
* or 'INACTIVE'. By default {@link CaptureResult#CONTROL_LOW_LIGHT_BOOST_STATE android.control.lowLightBoostState} will be 'INACTIVE'.</p>
* <p>The low light boost is 'ACTIVE' once the scene lighting condition is less than the
* upper bound lux value defined by {@link CameraCharacteristics#CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE android.control.lowLightBoostInfoLuminanceRange}.
* This mode will be 'INACTIVE' once the scene lighting condition is greater than the
Expand Down
3 changes: 1 addition & 2 deletions core/java/android/hardware/camera2/CaptureResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -2819,12 +2819,11 @@ public int getSequenceId() {
* <p>When low light boost is enabled by setting the AE mode to
* 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY', it can dynamically apply a low light
* boost when the light level threshold is exceeded.</p>
* <p>This field is present in the CaptureResult when the AE mode is set to
* 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY'. Otherwise, the field is not present.</p>
* <p>This state indicates when low light boost is 'ACTIVE' and applied. Similarly, it can
* indicate when it is not being applied by returning 'INACTIVE'.</p>
* <p>This key will be absent from the CaptureResult if AE mode is not set to
* 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY.</p>
* <p>The default value will always be 'INACTIVE'.</p>
* <p><b>Possible values:</b></p>
* <ul>
* <li>{@link #CONTROL_LOW_LIGHT_BOOST_STATE_INACTIVE INACTIVE}</li>
Expand Down
9 changes: 1 addition & 8 deletions core/java/android/inputmethodservice/InputMethodService.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,7 @@ public class InputMethodService extends AbstractInputMethodService {
private long mStylusHwSessionsTimeout = STYLUS_HANDWRITING_IDLE_TIMEOUT_MS;
private Runnable mStylusWindowIdleTimeoutRunnable;
private long mStylusWindowIdleTimeoutForTest;
/**
* Tracks last {@link MotionEvent#getToolType(int)} used for {@link MotionEvent#ACTION_DOWN}.
**/
private int mLastUsedToolType;

/**
* Tracks the ctrl+shift shortcut
**/
Expand Down Expand Up @@ -1368,7 +1365,6 @@ private void setImeExclusionRect(int visibleTopInsets) {

private void updateEditorToolTypeInternal(int toolType) {
if (Flags.useHandwritingListenerForTooltype()) {
mLastUsedToolType = toolType;
if (mInputEditorInfo != null) {
mInputEditorInfo.setInitialToolType(toolType);
}
Expand Down Expand Up @@ -3385,9 +3381,6 @@ void doStartInput(InputConnection ic, EditorInfo editorInfo, boolean restarting)
null /* icProto */);
mInputStarted = true;
mStartedInputConnection = ic;
if (Flags.useHandwritingListenerForTooltype()) {
editorInfo.setInitialToolType(mLastUsedToolType);
}
mInputEditorInfo = editorInfo;
initialize();
mInlineSuggestionSessionController.notifyOnStartInput(
Expand Down
2 changes: 2 additions & 0 deletions core/java/android/os/BatteryConsumer.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ public abstract class BatteryConsumer {
POWER_COMPONENT_AUDIO,
POWER_COMPONENT_VIDEO,
POWER_COMPONENT_FLASHLIGHT,
POWER_COMPONENT_CAMERA,
POWER_COMPONENT_GNSS,
};

static final int COLUMN_INDEX_BATTERY_CONSUMER_TYPE = 0;
Expand Down
3 changes: 2 additions & 1 deletion core/java/android/os/BatteryStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,8 @@ public boolean isDeltaData() {

// STATES2 bits that are used for Power Stats tracking
public static final int IMPORTANT_FOR_POWER_STATS_STATES2 =
STATE2_VIDEO_ON_FLAG | STATE2_FLASHLIGHT_FLAG | STATE2_CAMERA_FLAG;
STATE2_VIDEO_ON_FLAG | STATE2_FLASHLIGHT_FLAG | STATE2_CAMERA_FLAG
| STATE2_GPS_SIGNAL_QUALITY_MASK;

@UnsupportedAppUsage
public int states2;
Expand Down
Empty file modified core/java/android/os/Build.java
100755 → 100644
Empty file.
Loading

0 comments on commit 397e95f

Please sign in to comment.