summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/INotificationManager.aidl2
-rw-r--r--core/java/android/hardware/input/InputManager.java4
-rw-r--r--core/java/android/os/IVibratorService.aidl4
-rw-r--r--core/java/android/os/NullVibrator.java4
-rw-r--r--core/java/android/os/SystemVibrator.java8
-rw-r--r--core/java/android/os/Vibrator.java4
-rw-r--r--core/java/android/service/notification/StatusBarNotification.java32
7 files changed, 26 insertions, 32 deletions
diff --git a/core/java/android/app/INotificationManager.aidl b/core/java/android/app/INotificationManager.aidl
index 9911467..bb6eeda 100644
--- a/core/java/android/app/INotificationManager.aidl
+++ b/core/java/android/app/INotificationManager.aidl
@@ -31,7 +31,7 @@ interface INotificationManager
void enqueueToast(String pkg, ITransientNotification callback, int duration);
void cancelToast(String pkg, ITransientNotification callback);
- void enqueueNotificationWithTag(String pkg, String basePkg, String tag, int id,
+ void enqueueNotificationWithTag(String pkg, String opPkg, String tag, int id,
in Notification notification, inout int[] idReceived, int userId);
void cancelNotificationWithTag(String pkg, String tag, int id, int userId);
diff --git a/core/java/android/hardware/input/InputManager.java b/core/java/android/hardware/input/InputManager.java
index 0c0dfe9..b5efa8e 100644
--- a/core/java/android/hardware/input/InputManager.java
+++ b/core/java/android/hardware/input/InputManager.java
@@ -857,7 +857,7 @@ public final class InputManager {
* @hide
*/
@Override
- public void vibrate(int owningUid, String owningPackage, long milliseconds,
+ public void vibrate(int uid, String opPkg, long milliseconds,
int streamHint) {
vibrate(new long[] { 0, milliseconds}, -1);
}
@@ -866,7 +866,7 @@ public final class InputManager {
* @hide
*/
@Override
- public void vibrate(int owningUid, String owningPackage, long[] pattern, int repeat,
+ public void vibrate(int uid, String opPkg, long[] pattern, int repeat,
int streamHint) {
if (repeat >= pattern.length) {
throw new ArrayIndexOutOfBoundsException();
diff --git a/core/java/android/os/IVibratorService.aidl b/core/java/android/os/IVibratorService.aidl
index 4854bc0..4d05e2d 100644
--- a/core/java/android/os/IVibratorService.aidl
+++ b/core/java/android/os/IVibratorService.aidl
@@ -20,8 +20,8 @@ package android.os;
interface IVibratorService
{
boolean hasVibrator();
- void vibrate(int uid, String packageName, long milliseconds, int streamHint, IBinder token);
- void vibratePattern(int uid, String packageName, in long[] pattern, int repeat, int streamHint, IBinder token);
+ void vibrate(int uid, String opPkg, long milliseconds, int streamHint, IBinder token);
+ void vibratePattern(int uid, String opPkg, in long[] pattern, int repeat, int streamHint, IBinder token);
void cancelVibrate(IBinder token);
}
diff --git a/core/java/android/os/NullVibrator.java b/core/java/android/os/NullVibrator.java
index 536da32..7b870ac 100644
--- a/core/java/android/os/NullVibrator.java
+++ b/core/java/android/os/NullVibrator.java
@@ -40,7 +40,7 @@ public class NullVibrator extends Vibrator {
* @hide
*/
@Override
- public void vibrate(int owningUid, String owningPackage, long milliseconds, int streamHint) {
+ public void vibrate(int uid, String opPkg, long milliseconds, int streamHint) {
vibrate(milliseconds);
}
@@ -48,7 +48,7 @@ public class NullVibrator extends Vibrator {
* @hide
*/
@Override
- public void vibrate(int owningUid, String owningPackage, long[] pattern, int repeat,
+ public void vibrate(int uid, String opPkg, long[] pattern, int repeat,
int streamHint) {
if (repeat >= pattern.length) {
throw new ArrayIndexOutOfBoundsException();
diff --git a/core/java/android/os/SystemVibrator.java b/core/java/android/os/SystemVibrator.java
index 13bc4f6..8d9cf54 100644
--- a/core/java/android/os/SystemVibrator.java
+++ b/core/java/android/os/SystemVibrator.java
@@ -58,13 +58,13 @@ public class SystemVibrator extends Vibrator {
* @hide
*/
@Override
- public void vibrate(int owningUid, String owningPackage, long milliseconds, int streamHint) {
+ public void vibrate(int uid, String opPkg, long milliseconds, int streamHint) {
if (mService == null) {
Log.w(TAG, "Failed to vibrate; no vibrator service.");
return;
}
try {
- mService.vibrate(owningUid, owningPackage, milliseconds, streamHint, mToken);
+ mService.vibrate(uid, opPkg, milliseconds, streamHint, mToken);
} catch (RemoteException e) {
Log.w(TAG, "Failed to vibrate.", e);
}
@@ -74,7 +74,7 @@ public class SystemVibrator extends Vibrator {
* @hide
*/
@Override
- public void vibrate(int owningUid, String owningPackage, long[] pattern, int repeat,
+ public void vibrate(int uid, String opPkg, long[] pattern, int repeat,
int streamHint) {
if (mService == null) {
Log.w(TAG, "Failed to vibrate; no vibrator service.");
@@ -85,7 +85,7 @@ public class SystemVibrator extends Vibrator {
// anyway
if (repeat < pattern.length) {
try {
- mService.vibratePattern(owningUid, owningPackage, pattern, repeat, streamHint,
+ mService.vibratePattern(uid, opPkg, pattern, repeat, streamHint,
mToken);
} catch (RemoteException e) {
Log.w(TAG, "Failed to vibrate.", e);
diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java
index 8845ba3..c1d4d4c 100644
--- a/core/java/android/os/Vibrator.java
+++ b/core/java/android/os/Vibrator.java
@@ -135,7 +135,7 @@ public abstract class Vibrator {
* Like {@link #vibrate(long, int)}, but allowing the caller to specify that
* the vibration is owned by someone else.
*/
- public abstract void vibrate(int owningUid, String owningPackage,
+ public abstract void vibrate(int uid, String opPkg,
long milliseconds, int streamHint);
/**
@@ -143,7 +143,7 @@ public abstract class Vibrator {
* Like {@link #vibrate(long[], int, int)}, but allowing the caller to specify that
* the vibration is owned by someone else.
*/
- public abstract void vibrate(int owningUid, String owningPackage,
+ public abstract void vibrate(int uid, String opPkg,
long[] pattern, int repeat, int streamHint);
/**
diff --git a/core/java/android/service/notification/StatusBarNotification.java b/core/java/android/service/notification/StatusBarNotification.java
index 0f74169..2c0b76d 100644
--- a/core/java/android/service/notification/StatusBarNotification.java
+++ b/core/java/android/service/notification/StatusBarNotification.java
@@ -32,7 +32,7 @@ public class StatusBarNotification implements Parcelable {
private final String key;
private final int uid;
- private final String basePkg;
+ private final String opPkg;
private final int initialPid;
private final Notification notification;
private final UserHandle user;
@@ -41,26 +41,20 @@ public class StatusBarNotification implements Parcelable {
private final int score;
/** @hide */
- public StatusBarNotification(String pkg, int id, String tag, int uid, int initialPid, int score,
- Notification notification, UserHandle user) {
- this(pkg, null, id, tag, uid, initialPid, score, notification, user);
- }
-
- /** @hide */
- public StatusBarNotification(String pkg, String basePkg, int id, String tag, int uid,
+ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid,
int initialPid, int score, Notification notification, UserHandle user) {
- this(pkg, basePkg, id, tag, uid, initialPid, score, notification, user,
+ this(pkg, opPkg, id, tag, uid, initialPid, score, notification, user,
System.currentTimeMillis());
}
- public StatusBarNotification(String pkg, String basePkg, int id, String tag, int uid,
+ public StatusBarNotification(String pkg, String opPkg, int id, String tag, int uid,
int initialPid, int score, Notification notification, UserHandle user,
long postTime) {
if (pkg == null) throw new NullPointerException();
if (notification == null) throw new NullPointerException();
this.pkg = pkg;
- this.basePkg = pkg;
+ this.opPkg = opPkg;
this.id = id;
this.tag = tag;
this.uid = uid;
@@ -75,7 +69,7 @@ public class StatusBarNotification implements Parcelable {
public StatusBarNotification(Parcel in) {
this.pkg = in.readString();
- this.basePkg = in.readString();
+ this.opPkg = in.readString();
this.id = in.readInt();
if (in.readInt() != 0) {
this.tag = in.readString();
@@ -93,12 +87,12 @@ public class StatusBarNotification implements Parcelable {
}
private String key() {
- return pkg + '|' + basePkg + '|' + id + '|' + tag + '|' + uid;
+ return pkg + '|' + opPkg + '|' + id + '|' + tag + '|' + uid;
}
public void writeToParcel(Parcel out, int flags) {
out.writeString(this.pkg);
- out.writeString(this.basePkg);
+ out.writeString(this.opPkg);
out.writeInt(this.id);
if (this.tag != null) {
out.writeInt(1);
@@ -139,14 +133,14 @@ public class StatusBarNotification implements Parcelable {
public StatusBarNotification cloneLight() {
final Notification no = new Notification();
this.notification.cloneInto(no, false); // light copy
- return new StatusBarNotification(this.pkg, this.basePkg,
+ return new StatusBarNotification(this.pkg, this.opPkg,
this.id, this.tag, this.uid, this.initialPid,
this.score, no, this.user, this.postTime);
}
@Override
public StatusBarNotification clone() {
- return new StatusBarNotification(this.pkg, this.basePkg,
+ return new StatusBarNotification(this.pkg, this.opPkg,
this.id, this.tag, this.uid, this.initialPid,
this.score, this.notification.clone(), this.user, this.postTime);
}
@@ -205,9 +199,9 @@ public class StatusBarNotification implements Parcelable {
return uid;
}
- /** The notifying app's base package. @hide */
- public String getBasePkg() {
- return basePkg;
+ /** The package used for AppOps tracking. @hide */
+ public String getOpPkg() {
+ return opPkg;
}
/** @hide */