Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ java_defaults { "core/java/android/app/backup/IRestoreObserver.aidl", "core/java/android/app/backup/IRestoreSession.aidl", "core/java/android/app/backup/ISelectBackupTransportCallback.aidl", "core/java/android/app/role/IOnRoleHoldersChangedListener.aidl", "core/java/android/app/role/IRoleManager.aidl", "core/java/android/app/role/IRoleManagerCallback.aidl", "core/java/android/app/slice/ISliceManager.aidl", Loading api/system-current.txt +7 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,7 @@ package android { field public static final java.lang.String NOTIFICATION_DURING_SETUP = "android.permission.NOTIFICATION_DURING_SETUP"; field public static final java.lang.String NOTIFY_TV_INPUTS = "android.permission.NOTIFY_TV_INPUTS"; field public static final java.lang.String OBSERVE_APP_USAGE = "android.permission.OBSERVE_APP_USAGE"; field public static final java.lang.String OBSERVE_ROLE_HOLDERS = "android.permission.OBSERVE_ROLE_HOLDERS"; field public static final java.lang.String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG"; field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS"; field public static final java.lang.String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT"; Loading Loading @@ -888,12 +889,18 @@ package android.app.job { package android.app.role { public abstract interface OnRoleHoldersChangedListener { method public abstract void onRoleHoldersChanged(java.lang.String, android.os.UserHandle); } public final class RoleManager { method public void addOnRoleHoldersChangedListenerAsUser(java.util.concurrent.Executor, android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle); method public void addRoleHolderAsUser(java.lang.String, java.lang.String, android.os.UserHandle, java.util.concurrent.Executor, android.app.role.RoleManagerCallback); method public boolean addRoleHolderFromController(java.lang.String, java.lang.String); method public void clearRoleHoldersAsUser(java.lang.String, android.os.UserHandle, java.util.concurrent.Executor, android.app.role.RoleManagerCallback); method public java.util.List<java.lang.String> getRoleHolders(java.lang.String); method public java.util.List<java.lang.String> getRoleHoldersAsUser(java.lang.String, android.os.UserHandle); method public void removeOnRoleHoldersChangedListenerAsUser(android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle); method public void removeRoleHolderAsUser(java.lang.String, java.lang.String, android.os.UserHandle, java.util.concurrent.Executor, android.app.role.RoleManagerCallback); method public boolean removeRoleHolderFromController(java.lang.String, java.lang.String); method public void setRoleNamesFromController(java.util.List<java.lang.String>); Loading core/java/android/app/role/IOnRoleHoldersChangedListener.aidl 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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. */ package android.app.role; /** * @hide */ oneway interface IOnRoleHoldersChangedListener { void onRoleHoldersChanged(String roleName, int userId); } core/java/android/app/role/IRoleManager.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.app.role; import android.app.role.IOnRoleHoldersChangedListener; import android.app.role.IRoleManagerCallback; /** Loading @@ -37,6 +38,11 @@ interface IRoleManager { void clearRoleHoldersAsUser(in String roleName, int userId, in IRoleManagerCallback callback); void addOnRoleHoldersChangedListenerAsUser(IOnRoleHoldersChangedListener listener, int userId); void removeOnRoleHoldersChangedListenerAsUser(IOnRoleHoldersChangedListener listener, int userId); void setRoleNamesFromController(in List<String> roleNames); boolean addRoleHolderFromController(in String roleName, in String packageName); Loading core/java/android/app/role/OnRoleHoldersChangedListener.java 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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. */ package android.app.role; import android.annotation.NonNull; import android.annotation.SystemApi; import android.os.UserHandle; /** * Listener for role holder changes. * * @hide */ @SystemApi public interface OnRoleHoldersChangedListener { /** * Called when the holders of roles are changed. * * @param roleName the name of the role whose holders are changed * @param user the user for this role holder change */ void onRoleHoldersChanged(@NonNull String roleName, @NonNull UserHandle user); } Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ java_defaults { "core/java/android/app/backup/IRestoreObserver.aidl", "core/java/android/app/backup/IRestoreSession.aidl", "core/java/android/app/backup/ISelectBackupTransportCallback.aidl", "core/java/android/app/role/IOnRoleHoldersChangedListener.aidl", "core/java/android/app/role/IRoleManager.aidl", "core/java/android/app/role/IRoleManagerCallback.aidl", "core/java/android/app/slice/ISliceManager.aidl", Loading
api/system-current.txt +7 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,7 @@ package android { field public static final java.lang.String NOTIFICATION_DURING_SETUP = "android.permission.NOTIFICATION_DURING_SETUP"; field public static final java.lang.String NOTIFY_TV_INPUTS = "android.permission.NOTIFY_TV_INPUTS"; field public static final java.lang.String OBSERVE_APP_USAGE = "android.permission.OBSERVE_APP_USAGE"; field public static final java.lang.String OBSERVE_ROLE_HOLDERS = "android.permission.OBSERVE_ROLE_HOLDERS"; field public static final java.lang.String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG"; field public static final java.lang.String PACKAGE_USAGE_STATS = "android.permission.PACKAGE_USAGE_STATS"; field public static final java.lang.String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT"; Loading Loading @@ -888,12 +889,18 @@ package android.app.job { package android.app.role { public abstract interface OnRoleHoldersChangedListener { method public abstract void onRoleHoldersChanged(java.lang.String, android.os.UserHandle); } public final class RoleManager { method public void addOnRoleHoldersChangedListenerAsUser(java.util.concurrent.Executor, android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle); method public void addRoleHolderAsUser(java.lang.String, java.lang.String, android.os.UserHandle, java.util.concurrent.Executor, android.app.role.RoleManagerCallback); method public boolean addRoleHolderFromController(java.lang.String, java.lang.String); method public void clearRoleHoldersAsUser(java.lang.String, android.os.UserHandle, java.util.concurrent.Executor, android.app.role.RoleManagerCallback); method public java.util.List<java.lang.String> getRoleHolders(java.lang.String); method public java.util.List<java.lang.String> getRoleHoldersAsUser(java.lang.String, android.os.UserHandle); method public void removeOnRoleHoldersChangedListenerAsUser(android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle); method public void removeRoleHolderAsUser(java.lang.String, java.lang.String, android.os.UserHandle, java.util.concurrent.Executor, android.app.role.RoleManagerCallback); method public boolean removeRoleHolderFromController(java.lang.String, java.lang.String); method public void setRoleNamesFromController(java.util.List<java.lang.String>); Loading
core/java/android/app/role/IOnRoleHoldersChangedListener.aidl 0 → 100644 +25 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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. */ package android.app.role; /** * @hide */ oneway interface IOnRoleHoldersChangedListener { void onRoleHoldersChanged(String roleName, int userId); }
core/java/android/app/role/IRoleManager.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.app.role; import android.app.role.IOnRoleHoldersChangedListener; import android.app.role.IRoleManagerCallback; /** Loading @@ -37,6 +38,11 @@ interface IRoleManager { void clearRoleHoldersAsUser(in String roleName, int userId, in IRoleManagerCallback callback); void addOnRoleHoldersChangedListenerAsUser(IOnRoleHoldersChangedListener listener, int userId); void removeOnRoleHoldersChangedListenerAsUser(IOnRoleHoldersChangedListener listener, int userId); void setRoleNamesFromController(in List<String> roleNames); boolean addRoleHolderFromController(in String roleName, in String packageName); Loading
core/java/android/app/role/OnRoleHoldersChangedListener.java 0 → 100644 +38 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 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. */ package android.app.role; import android.annotation.NonNull; import android.annotation.SystemApi; import android.os.UserHandle; /** * Listener for role holder changes. * * @hide */ @SystemApi public interface OnRoleHoldersChangedListener { /** * Called when the holders of roles are changed. * * @param roleName the name of the role whose holders are changed * @param user the user for this role holder change */ void onRoleHoldersChanged(@NonNull String roleName, @NonNull UserHandle user); }