missing dep. Revert "Implement per-app sensitivity settings toggle."
This reverts commit 56131de741
.
Change-Id: I409dbf4495f95ff37d2a47168cdbc4131a80d42e
This commit is contained in:
@@ -568,28 +568,13 @@ public class NotificationAppList extends PinnedHeaderListFragment
|
||||
}
|
||||
|
||||
public boolean getSensitive(String pkg, int uid) {
|
||||
INotificationManager nm = INotificationManager.Stub.asInterface(
|
||||
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
|
||||
try {
|
||||
return nm.getPackageVisibility(pkg, uid) == Notification.VISIBILITY_PRIVATE;
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Error calling NoMan", e);
|
||||
return false;
|
||||
}
|
||||
// TODO get visibility state from NoMan
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean setSensitive(String pkg, int uid, boolean sensitive) {
|
||||
INotificationManager nm = INotificationManager.Stub.asInterface(
|
||||
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
|
||||
try {
|
||||
nm.setPackageVisibility(pkg, uid,
|
||||
sensitive ? Notification.VISIBILITY_PRIVATE
|
||||
: Notification.VISIBILITY_NO_OVERRIDE);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "Error calling NoMan", e);
|
||||
return false;
|
||||
}
|
||||
// TODO save visibility state to NoMan
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user