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

Commit bd25272f authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Remove compat logging of FLAG_SLIPPERY

Since the bug has been solved, we no longer need to keep the logging.

Bug: 157929241
Test: none
Change-Id: Icdafda470f32e5d3a328d5e1b297485fab0346bc
parent a38724fa
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -25,13 +25,6 @@ interface IInputConstants
    // android.os.InputConstants.DEFAULT_DISPATCHING_TIMEOUT_MILLIS.
    const int UNMULTIPLIED_DEFAULT_DISPATCHING_TIMEOUT_MILLIS = 5000; // 5 seconds

    // Compatibility changes.
    /**
      * TODO(b/157929241): remove this before closing the bug. This is needed temporarily
      * to identify apps that are using this flag.
      */
    const long BLOCK_FLAG_SLIPPERY = 157929241;

    // Indicate invalid battery capacity
    const int INVALID_BATTERY_CAPACITY = -1;

+0 −1
Original line number Diff line number Diff line
@@ -72,7 +72,6 @@ cc_defaults {
        "libstatssocket",
        "libutils",
        "libui",
        "lib-platform-compat-native-api",
        "server_configurable_flags",
    ],
    static_libs: [
+0 −1
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ cc_benchmark {
        "libstatslog",
        "libui",
        "libutils",
        "lib-platform-compat-native-api",
    ],
    static_libs: [
        "libattestation",
+0 −1
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ cc_defaults {
        "libui",
        "libgui",
        "libutils",
        "lib-platform-compat-native-api",
        "server_configurable_flags",
    ],
    static_libs: [
+1 −26
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@
#include <android-base/stringprintf.h>
#include <android/os/IInputConstants.h>
#include <binder/Binder.h>
#include <binder/IServiceManager.h>
#include <com/android/internal/compat/IPlatformCompatNative.h>
#include <ftl/enum.h>
#include <gui/SurfaceComposerClient.h>
#include <input/InputDevice.h>
@@ -63,7 +61,6 @@ using android::os::BlockUntrustedTouchesMode;
using android::os::IInputConstants;
using android::os::InputEventInjectionResult;
using android::os::InputEventInjectionSync;
using com::android::internal::compat::IPlatformCompatNative;

namespace android::inputdispatcher {

@@ -411,15 +408,6 @@ bool sharedPointersEqual(const std::shared_ptr<T>& lhs, const std::shared_ptr<T>
    return *lhs == *rhs;
}

sp<IPlatformCompatNative> getCompatService() {
    sp<IBinder> service(defaultServiceManager()->getService(String16("platform_compat_native")));
    if (service == nullptr) {
        ALOGE("Failed to link to compat service");
        return nullptr;
    }
    return interface_cast<IPlatformCompatNative>(service);
}

KeyEvent createKeyEvent(const KeyEntry& entry) {
    KeyEvent event;
    event.initialize(entry.id, entry.deviceId, entry.source, entry.displayId, INVALID_HMAC,
@@ -570,8 +558,7 @@ InputDispatcher::InputDispatcher(const sp<InputDispatcherPolicyInterface>& polic
        mFocusedDisplayId(ADISPLAY_ID_DEFAULT),
        mWindowTokenWithPointerCapture(nullptr),
        mLatencyAggregator(),
        mLatencyTracker(&mLatencyAggregator),
        mCompatService(getCompatService()) {
        mLatencyTracker(&mLatencyAggregator) {
    mLooper = new Looper(false);
    mReporter = createInputReporter();

@@ -4812,18 +4799,6 @@ void InputDispatcher::setInputWindowsLocked(
                ALOGD("Window went away: %s", oldWindowHandle->getName().c_str());
            }
            oldWindowHandle->releaseChannel();
            // To avoid making too many calls into the compat framework, only
            // check for window flags when windows are going away.
            // TODO(b/157929241) : delete this. This is only needed temporarily
            // in order to gather some data about the flag usage
            if (oldWindowHandle->getInfo()->flags.test(WindowInfo::Flag::SLIPPERY)) {
                ALOGW("%s has FLAG_SLIPPERY. Please report this in b/157929241",
                      oldWindowHandle->getName().c_str());
                if (mCompatService != nullptr) {
                    mCompatService->reportChangeByUid(IInputConstants::BLOCK_FLAG_SLIPPERY,
                                                      oldWindowHandle->getInfo()->ownerUid);
                }
            }
        }
    }
}
Loading