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

Commit d8d3276a authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "Fix issue 4604090: notification sound interrupted."

parents e25e51f5 6dbdc40e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,12 +20,15 @@ package android.os;
import android.os.WorkSource;

/** @hide */

interface IPowerManager
{
    // WARNING: changes in acquireWakeLock() signature must be reflected in IPowerManager.cpp/h
    void acquireWakeLock(int flags, IBinder lock, String tag, in WorkSource ws);
    void updateWakeLockWorkSource(IBinder lock, in WorkSource ws);
    void goToSleep(long time);
    void goToSleepWithReason(long time, int reason);
    // WARNING: changes in releaseWakeLock() signature must be reflected in IPowerManager.cpp/h
    void releaseWakeLock(IBinder lock, int flags);
    void userActivity(long when, boolean noChangeLights);
    void userActivityWithForce(long when, boolean noChangeLights, boolean force);
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@
    <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
    <assign-permission name="android.permission.ACCESS_DRM" uid="media" />
    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
    <assign-permission name="android.permission.WAKE_LOCK" uid="media" />

    <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />

+41 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_IPOWERMANAGER_H
#define ANDROID_IPOWERMANAGER_H

#include <utils/Errors.h>
#include <binder/IInterface.h>

namespace android {

// ----------------------------------------------------------------------------

// must be kept in sync with interface defined in IPowerManager.aidl
class IPowerManager : public IInterface
{
public:
    DECLARE_META_INTERFACE(PowerManager);

    virtual status_t acquireWakeLock(int flags, const sp<IBinder>& lock, const String16& tag) = 0;
    virtual status_t releaseWakeLock(const sp<IBinder>& lock, int flags) = 0;
};

// ----------------------------------------------------------------------------

}; // namespace android

#endif // ANDROID_IPOWERMANAGER_H
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_POWERMANAGER_H
#define ANDROID_POWERMANAGER_H

namespace android {

// must be kept in sync with definitions in PowerManager.java
enum {
    POWERMANAGER_PARTIAL_WAKE_LOCK = 1, // equals PowerManager.PARTIAL_WAKE_LOCK constant
};

}; // namespace android

#endif // ANDROID_POWERMANAGER_H
+2 −1
Original line number Diff line number Diff line
@@ -21,7 +21,8 @@ LOCAL_SHARED_LIBRARIES := \
    libhardware \
    libhardware_legacy \
    libeffects \
    libdl
    libdl \
    libpowermanager

LOCAL_STATIC_LIBRARIES := \
    libcpustats \
Loading