Merge "Use disableForUser in StatusBarManager"

am: 5392d799ab

Change-Id: I346f8a17d43e65c6e9ed362942345146ad6cac1d
This commit is contained in:
Evan Laird
2018-06-13 08:56:41 -07:00
committed by android-build-merger

View File

@@ -132,9 +132,10 @@ public class StatusBarManager {
*/ */
public void disable(int what) { public void disable(int what) {
try { try {
final int userId = Binder.getCallingUserHandle().getIdentifier();
final IStatusBarService svc = getService(); final IStatusBarService svc = getService();
if (svc != null) { if (svc != null) {
svc.disable(what, mToken, mContext.getPackageName()); svc.disableForUser(what, mToken, mContext.getPackageName(), userId);
} }
} catch (RemoteException ex) { } catch (RemoteException ex) {
throw ex.rethrowFromSystemServer(); throw ex.rethrowFromSystemServer();
@@ -149,9 +150,10 @@ public class StatusBarManager {
*/ */
public void disable2(@Disable2Flags int what) { public void disable2(@Disable2Flags int what) {
try { try {
final int userId = Binder.getCallingUserHandle().getIdentifier();
final IStatusBarService svc = getService(); final IStatusBarService svc = getService();
if (svc != null) { if (svc != null) {
svc.disable2(what, mToken, mContext.getPackageName()); svc.disable2ForUser(what, mToken, mContext.getPackageName(), userId);
} }
} catch (RemoteException ex) { } catch (RemoteException ex) {
throw ex.rethrowFromSystemServer(); throw ex.rethrowFromSystemServer();