Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8611df9d authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8191477 from 013d28fc to tm-d1-release

Change-Id: I514c157f5af5e836008970d2822b565a03c7a4bd
parents 4bd25188 013d28fc
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -994,15 +994,15 @@ binder::Status InstalldNativeService::destroyAppData(const std::optional<std::st
            }

            auto path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname);
            if (rename_delete_dir_contents_and_dir(path, true) != 0) {
            if (delete_dir_contents_and_dir(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
            path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname);
            if (rename_delete_dir_contents_and_dir(path, true) != 0) {
            if (delete_dir_contents_and_dir(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
            path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname);
            if (rename_delete_dir_contents_and_dir(path, true) != 0) {
            if (delete_dir_contents_and_dir(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
        }
@@ -1550,27 +1550,27 @@ binder::Status InstalldNativeService::destroyUserData(const std::optional<std::s
    binder::Status res = ok();
    if (flags & FLAG_STORAGE_DE) {
        auto path = create_data_user_de_path(uuid_, userId);
        if (rename_delete_dir_contents_and_dir(path, true) != 0) {
        if (delete_dir_contents_and_dir(path, true) != 0) {
            res = error("Failed to delete " + path);
        }
        if (uuid_ == nullptr) {
            path = create_data_misc_legacy_path(userId);
            if (rename_delete_dir_contents_and_dir(path, true) != 0) {
            if (delete_dir_contents_and_dir(path, true) != 0) {
                res = error("Failed to delete " + path);
            }
            path = create_primary_cur_profile_dir_path(userId);
            if (rename_delete_dir_contents_and_dir(path, true) != 0) {
            if (delete_dir_contents_and_dir(path, true) != 0) {
                res = error("Failed to delete " + path);
            }
        }
    }
    if (flags & FLAG_STORAGE_CE) {
        auto path = create_data_user_ce_path(uuid_, userId);
        if (rename_delete_dir_contents_and_dir(path, true) != 0) {
        if (delete_dir_contents_and_dir(path, true) != 0) {
            res = error("Failed to delete " + path);
        }
        path = findDataMediaPath(uuid, userId);
        if (rename_delete_dir_contents_and_dir(path, true) != 0) {
        if (delete_dir_contents_and_dir(path, true) != 0) {
            res = error("Failed to delete " + path);
        }
    }
+1 −1
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ int delete_dir_contents(const std::string& pathname, bool ignore_if_missing = fa
int delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing = false);

bool is_renamed_deleted_dir(std::string_view path);
int rename_delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing = false);
int rename_delete_dir_contents_and_dir(const std::string& pathname, bool ignore_if_missing = true);

void cleanup_invalid_package_dirs_under_path(const std::string& pathname);

+44 −0
Original line number Diff line number Diff line
@@ -807,6 +807,33 @@ enum {
    AMOTION_EVENT_TOOL_TYPE_PALM = 5,
};

/**
 * Constants that identify different gesture classification types.
 */
enum {
    /**
     * Classification constant: None.
     *
     * No additional information is available about the current motion event stream.
     */
    AMOTION_EVENT_CLASSIFICATION_NONE = 0,
    /**
     * Classification constant: Ambiguous gesture.
     *
     * The user's intent with respect to the current event stream is not yet determined.
     * Gestural actions, such as scrolling, should be inhibited until the classification resolves
     * to another value or the event stream ends.
     */
    AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE = 1,
    /**
     * Classification constant: Deep press.
     *
     * The current event stream represents the user intentionally pressing harder on the screen.
     * This classification type should be used to accelerate the long press behaviour.
     */
    AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS = 2,
};

/**
 * Input source masks.
 *
@@ -1326,6 +1353,23 @@ float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, siz
float AMotionEvent_getHistoricalAxisValue(const AInputEvent* motion_event,
        int32_t axis, size_t pointer_index, size_t history_index);

/**
 * Get the action button for the motion event. Returns a valid action button when the
 * event is associated with a button press or button release action. For other actions
 * the return value is undefined.
 */
int32_t AMotionEvent_getActionButton(const AInputEvent* motion_event);

/**
 * Returns the classification for the current gesture.
 * The classification may change as more events become available for the same gesture.
 *
 * @see #AMOTION_EVENT_CLASSIFICATION_NONE
 * @see #AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE
 * @see #AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS
*/
int32_t AMotionEvent_getClassification(const AInputEvent* motion_event);

/**
 * Creates a native AInputEvent* object that is a copy of the specified Java
 * android.view.MotionEvent. The result may be used with generic and MotionEvent-specific
+3 −5
Original line number Diff line number Diff line
@@ -275,23 +275,21 @@ enum {

/**
 * Classifications of the current gesture, if available.
 *
 * The following values must be kept in sync with MotionEvent.java
 */
enum class MotionClassification : uint8_t {
    /**
     * No classification is available.
     */
    NONE = 0,
    NONE = AMOTION_EVENT_CLASSIFICATION_NONE,
    /**
     * Too early to classify the current gesture. Need more events. Look for changes in the
     * upcoming motion events.
     */
    AMBIGUOUS_GESTURE = 1,
    AMBIGUOUS_GESTURE = AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE,
    /**
     * The current gesture likely represents a user intentionally exerting force on the touchscreen.
     */
    DEEP_PRESS = 2,
    DEEP_PRESS = AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS,
};

/**
+2 −19
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ int DisplayEventDispatcher::handleEvent(int, int events, void*) {
        ALOGV("dispatcher %p ~ Vsync pulse: timestamp=%" PRId64
              ", displayId=%s, count=%d, vsyncId=%" PRId64,
              this, ns2ms(vsyncTimestamp), to_string(vsyncDisplayId).c_str(), vsyncCount,
              vsyncEventData.id);
              vsyncEventData.preferredVsyncId());
        mWaitingForVsync = false;
        mLastVsyncCount = vsyncCount;
        dispatchVsync(vsyncTimestamp, vsyncDisplayId, vsyncCount, vsyncEventData);
@@ -146,18 +146,6 @@ int DisplayEventDispatcher::handleEvent(int, int events, void*) {
    return 1; // keep the callback
}

void DisplayEventDispatcher::populateFrameTimelines(const DisplayEventReceiver::Event& event,
                                                    VsyncEventData* outVsyncEventData) const {
    for (size_t i = 0; i < VsyncEventData::kFrameTimelinesLength; i++) {
        DisplayEventReceiver::Event::VSync::FrameTimeline receiverTimeline =
                event.vsync.frameTimelines[i];
        outVsyncEventData->frameTimelines[i] =
                VsyncEventData::FrameTimeline(receiverTimeline.vsyncId,
                                              receiverTimeline.deadlineTimestamp,
                                              receiverTimeline.expectedVSyncTimestamp);
    }
}

bool DisplayEventDispatcher::processPendingEvents(nsecs_t* outTimestamp,
                                                  PhysicalDisplayId* outDisplayId,
                                                  uint32_t* outCount,
@@ -178,12 +166,7 @@ bool DisplayEventDispatcher::processPendingEvents(nsecs_t* outTimestamp,
                    *outTimestamp = ev.header.timestamp;
                    *outDisplayId = ev.header.displayId;
                    *outCount = ev.vsync.count;
                    outVsyncEventData->id = ev.vsync.vsyncId;
                    outVsyncEventData->deadlineTimestamp = ev.vsync.deadlineTimestamp;
                    outVsyncEventData->frameInterval = ev.vsync.frameInterval;
                    outVsyncEventData->preferredFrameTimelineIndex =
                            ev.vsync.preferredFrameTimelineIndex;
                    populateFrameTimelines(ev, outVsyncEventData);
                    *outVsyncEventData = ev.vsync.vsyncData;
                    break;
                case DisplayEventReceiver::DISPLAY_EVENT_HOTPLUG:
                    dispatchHotplug(ev.header.timestamp, ev.header.displayId, ev.hotplug.connected);
Loading