Loading core/java/android/app/trust/ITrustListener.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.List; * {@hide} */ oneway interface ITrustListener { void onTrustChanged(boolean enabled, int userId, int flags, void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, in List<String> trustGrantedMessages); void onTrustManagedChanged(boolean managed, int userId); void onTrustError(in CharSequence message); Loading core/java/android/app/trust/TrustManager.java +16 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.SystemService; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.hardware.biometrics.BiometricSourceType; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; Loading @@ -45,6 +46,7 @@ public class TrustManager { private static final String TAG = "TrustManager"; private static final String DATA_FLAGS = "initiatedByUser"; private static final String DATA_NEWLY_UNLOCKED = "newlyUnlocked"; private static final String DATA_MESSAGE = "message"; private static final String DATA_GRANTED_MESSAGES = "grantedMessages"; Loading Loading @@ -171,13 +173,14 @@ public class TrustManager { try { ITrustListener.Stub iTrustListener = new ITrustListener.Stub() { @Override public void onTrustChanged(boolean enabled, int userId, int flags, List<String> trustGrantedMessages) { public void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, List<String> trustGrantedMessages) { Message m = mHandler.obtainMessage(MSG_TRUST_CHANGED, (enabled ? 1 : 0), userId, trustListener); if (flags != 0) { m.getData().putInt(DATA_FLAGS, flags); } m.getData().putInt(DATA_NEWLY_UNLOCKED, newlyUnlocked ? 1 : 0); m.getData().putCharSequenceArrayList( DATA_GRANTED_MESSAGES, (ArrayList) trustGrantedMessages); m.sendToTarget(); Loading Loading @@ -265,9 +268,14 @@ public class TrustManager { public void handleMessage(Message msg) { switch(msg.what) { case MSG_TRUST_CHANGED: int flags = msg.peekData() != null ? msg.peekData().getInt(DATA_FLAGS) : 0; ((TrustListener) msg.obj).onTrustChanged(msg.arg1 != 0, msg.arg2, flags, msg.getData().getStringArrayList(DATA_GRANTED_MESSAGES)); Bundle data = msg.peekData(); int flags = data != null ? data.getInt(DATA_FLAGS) : 0; boolean enabled = msg.arg1 != 0; int newlyUnlockedInt = data != null ? data.getInt(DATA_NEWLY_UNLOCKED) : 0; boolean newlyUnlocked = newlyUnlockedInt != 0; ((TrustListener) msg.obj).onTrustChanged(enabled, newlyUnlocked, msg.arg2, flags, msg.getData().getStringArrayList(DATA_GRANTED_MESSAGES)); break; case MSG_TRUST_MANAGED_CHANGED: ((TrustListener)msg.obj).onTrustManagedChanged(msg.arg1 != 0, msg.arg2); Loading @@ -284,6 +292,8 @@ public class TrustManager { /** * Reports that the trust state has changed. * @param enabled If true, the system believes the environment to be trusted. * @param newlyUnlocked If true, the system believes the device is newly unlocked due * to the trust changing. * @param userId The user, for which the trust changed. * @param flags Flags specified by the trust agent when granting trust. See * {@link android.service.trust.TrustAgentService#grantTrust(CharSequence, long, int) Loading @@ -291,7 +301,7 @@ public class TrustManager { * @param trustGrantedMessages Messages to display to the user when trust has been granted * by one or more trust agents. */ void onTrustChanged(boolean enabled, int userId, int flags, void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, List<String> trustGrantedMessages); /** Loading data/etc/services.core.protolog.json +6 −6 Original line number Diff line number Diff line Loading @@ -3871,12 +3871,6 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/TaskDisplayArea.java" }, "1648338379": { "message": "Display id=%d is ignoring all orientation requests, return %d", "level": "VERBOSE", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayContent.java" }, "1653025361": { "message": "Register task fragment organizer=%s uid=%d pid=%d", "level": "VERBOSE", Loading Loading @@ -4117,6 +4111,12 @@ "group": "WM_DEBUG_WINDOW_ORGANIZER", "at": "com\/android\/server\/wm\/DisplayAreaPolicyBuilder.java" }, "1877863087": { "message": "Display id=%d is ignoring orientation request for %d, return %d", "level": "VERBOSE", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayContent.java" }, "1878927091": { "message": "prepareSurface: No changes in animation for %s", "level": "VERBOSE", Loading libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java +9 −8 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import android.graphics.Rect; import android.os.Bundle; import android.os.IBinder; import android.util.ArrayMap; import android.window.WindowProvider; import androidx.annotation.NonNull; import androidx.annotation.Nullable; Loading Loading @@ -129,9 +128,10 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent { }); mWindowLayoutChangeListeners.put(context, consumer); // TODO(b/258065175) Further extend this to ContextWrappers. if (context instanceof WindowProvider) { final IBinder windowContextToken = context.getWindowContextToken(); if (windowContextToken != null) { // We register component callbacks for window contexts. For activity contexts, they will // receive callbacks from NotifyOnConfigurationChanged instead. final ConfigurationChangeListener listener = new ConfigurationChangeListener(windowContextToken); context.registerComponentCallbacks(listener); Loading @@ -150,8 +150,8 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent { if (!mWindowLayoutChangeListeners.get(context).equals(consumer)) { continue; } if (context instanceof WindowProvider) { final IBinder token = context.getWindowContextToken(); if (token != null) { context.unregisterComponentCallbacks(mConfigurationChangeListeners.get(token)); mConfigurationChangeListeners.remove(token); } Loading Loading @@ -308,9 +308,10 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent { return false; } final int windowingMode; if (context instanceof Activity) { IBinder activityToken = context.getActivityToken(); if (activityToken != null) { final Configuration taskConfig = ActivityClient.getInstance().getTaskConfiguration( context.getActivityToken()); activityToken); if (taskConfig == null) { // If we cannot determine the task configuration for any reason, it is likely that // we won't be able to determine its position correctly as well. DisplayFeatures' Loading libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +23 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import com.android.wm.shell.desktopmode.DesktopMode; import com.android.wm.shell.desktopmode.DesktopModeController; import com.android.wm.shell.desktopmode.DesktopModeStatus; import com.android.wm.shell.desktopmode.DesktopModeTaskRepository; import com.android.wm.shell.desktopmode.DesktopTasksController; import com.android.wm.shell.displayareahelper.DisplayAreaHelper; import com.android.wm.shell.displayareahelper.DisplayAreaHelperController; import com.android.wm.shell.draganddrop.DragAndDropController; Loading Loading @@ -677,7 +678,11 @@ public abstract class WMShellBaseModule { @WMSingleton @Provides static Optional<DesktopMode> provideDesktopMode( Optional<DesktopModeController> desktopModeController) { Optional<DesktopModeController> desktopModeController, Optional<DesktopTasksController> desktopTasksController) { if (DesktopModeStatus.isProto2Enabled()) { return desktopTasksController.map(DesktopTasksController::asDesktopMode); } return desktopModeController.map(DesktopModeController::asDesktopMode); } Loading @@ -698,6 +703,23 @@ public abstract class WMShellBaseModule { return Optional.empty(); } @BindsOptionalOf @DynamicOverride abstract DesktopTasksController optionalDesktopTasksController(); @WMSingleton @Provides static Optional<DesktopTasksController> providesDesktopTasksController( @DynamicOverride Optional<Lazy<DesktopTasksController>> desktopTasksController) { // Use optional-of-lazy for the dependency that this provider relies on. // Lazy ensures that this provider will not be the cause the dependency is created // when it will not be returned due to the condition below. if (DesktopModeStatus.isProto2Enabled()) { return desktopTasksController.map(Lazy::get); } return Optional.empty(); } @BindsOptionalOf @DynamicOverride abstract DesktopModeTaskRepository optionalDesktopModeTaskRepository(); Loading Loading
core/java/android/app/trust/ITrustListener.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.List; * {@hide} */ oneway interface ITrustListener { void onTrustChanged(boolean enabled, int userId, int flags, void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, in List<String> trustGrantedMessages); void onTrustManagedChanged(boolean managed, int userId); void onTrustError(in CharSequence message); Loading
core/java/android/app/trust/TrustManager.java +16 −6 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.annotation.SystemService; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.hardware.biometrics.BiometricSourceType; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Looper; Loading @@ -45,6 +46,7 @@ public class TrustManager { private static final String TAG = "TrustManager"; private static final String DATA_FLAGS = "initiatedByUser"; private static final String DATA_NEWLY_UNLOCKED = "newlyUnlocked"; private static final String DATA_MESSAGE = "message"; private static final String DATA_GRANTED_MESSAGES = "grantedMessages"; Loading Loading @@ -171,13 +173,14 @@ public class TrustManager { try { ITrustListener.Stub iTrustListener = new ITrustListener.Stub() { @Override public void onTrustChanged(boolean enabled, int userId, int flags, List<String> trustGrantedMessages) { public void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, List<String> trustGrantedMessages) { Message m = mHandler.obtainMessage(MSG_TRUST_CHANGED, (enabled ? 1 : 0), userId, trustListener); if (flags != 0) { m.getData().putInt(DATA_FLAGS, flags); } m.getData().putInt(DATA_NEWLY_UNLOCKED, newlyUnlocked ? 1 : 0); m.getData().putCharSequenceArrayList( DATA_GRANTED_MESSAGES, (ArrayList) trustGrantedMessages); m.sendToTarget(); Loading Loading @@ -265,9 +268,14 @@ public class TrustManager { public void handleMessage(Message msg) { switch(msg.what) { case MSG_TRUST_CHANGED: int flags = msg.peekData() != null ? msg.peekData().getInt(DATA_FLAGS) : 0; ((TrustListener) msg.obj).onTrustChanged(msg.arg1 != 0, msg.arg2, flags, msg.getData().getStringArrayList(DATA_GRANTED_MESSAGES)); Bundle data = msg.peekData(); int flags = data != null ? data.getInt(DATA_FLAGS) : 0; boolean enabled = msg.arg1 != 0; int newlyUnlockedInt = data != null ? data.getInt(DATA_NEWLY_UNLOCKED) : 0; boolean newlyUnlocked = newlyUnlockedInt != 0; ((TrustListener) msg.obj).onTrustChanged(enabled, newlyUnlocked, msg.arg2, flags, msg.getData().getStringArrayList(DATA_GRANTED_MESSAGES)); break; case MSG_TRUST_MANAGED_CHANGED: ((TrustListener)msg.obj).onTrustManagedChanged(msg.arg1 != 0, msg.arg2); Loading @@ -284,6 +292,8 @@ public class TrustManager { /** * Reports that the trust state has changed. * @param enabled If true, the system believes the environment to be trusted. * @param newlyUnlocked If true, the system believes the device is newly unlocked due * to the trust changing. * @param userId The user, for which the trust changed. * @param flags Flags specified by the trust agent when granting trust. See * {@link android.service.trust.TrustAgentService#grantTrust(CharSequence, long, int) Loading @@ -291,7 +301,7 @@ public class TrustManager { * @param trustGrantedMessages Messages to display to the user when trust has been granted * by one or more trust agents. */ void onTrustChanged(boolean enabled, int userId, int flags, void onTrustChanged(boolean enabled, boolean newlyUnlocked, int userId, int flags, List<String> trustGrantedMessages); /** Loading
data/etc/services.core.protolog.json +6 −6 Original line number Diff line number Diff line Loading @@ -3871,12 +3871,6 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/TaskDisplayArea.java" }, "1648338379": { "message": "Display id=%d is ignoring all orientation requests, return %d", "level": "VERBOSE", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayContent.java" }, "1653025361": { "message": "Register task fragment organizer=%s uid=%d pid=%d", "level": "VERBOSE", Loading Loading @@ -4117,6 +4111,12 @@ "group": "WM_DEBUG_WINDOW_ORGANIZER", "at": "com\/android\/server\/wm\/DisplayAreaPolicyBuilder.java" }, "1877863087": { "message": "Display id=%d is ignoring orientation request for %d, return %d", "level": "VERBOSE", "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/DisplayContent.java" }, "1878927091": { "message": "prepareSurface: No changes in animation for %s", "level": "VERBOSE", Loading
libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/WindowLayoutComponentImpl.java +9 −8 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import android.graphics.Rect; import android.os.Bundle; import android.os.IBinder; import android.util.ArrayMap; import android.window.WindowProvider; import androidx.annotation.NonNull; import androidx.annotation.Nullable; Loading Loading @@ -129,9 +128,10 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent { }); mWindowLayoutChangeListeners.put(context, consumer); // TODO(b/258065175) Further extend this to ContextWrappers. if (context instanceof WindowProvider) { final IBinder windowContextToken = context.getWindowContextToken(); if (windowContextToken != null) { // We register component callbacks for window contexts. For activity contexts, they will // receive callbacks from NotifyOnConfigurationChanged instead. final ConfigurationChangeListener listener = new ConfigurationChangeListener(windowContextToken); context.registerComponentCallbacks(listener); Loading @@ -150,8 +150,8 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent { if (!mWindowLayoutChangeListeners.get(context).equals(consumer)) { continue; } if (context instanceof WindowProvider) { final IBinder token = context.getWindowContextToken(); if (token != null) { context.unregisterComponentCallbacks(mConfigurationChangeListeners.get(token)); mConfigurationChangeListeners.remove(token); } Loading Loading @@ -308,9 +308,10 @@ public class WindowLayoutComponentImpl implements WindowLayoutComponent { return false; } final int windowingMode; if (context instanceof Activity) { IBinder activityToken = context.getActivityToken(); if (activityToken != null) { final Configuration taskConfig = ActivityClient.getInstance().getTaskConfiguration( context.getActivityToken()); activityToken); if (taskConfig == null) { // If we cannot determine the task configuration for any reason, it is likely that // we won't be able to determine its position correctly as well. DisplayFeatures' Loading
libs/WindowManager/Shell/src/com/android/wm/shell/dagger/WMShellBaseModule.java +23 −1 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ import com.android.wm.shell.desktopmode.DesktopMode; import com.android.wm.shell.desktopmode.DesktopModeController; import com.android.wm.shell.desktopmode.DesktopModeStatus; import com.android.wm.shell.desktopmode.DesktopModeTaskRepository; import com.android.wm.shell.desktopmode.DesktopTasksController; import com.android.wm.shell.displayareahelper.DisplayAreaHelper; import com.android.wm.shell.displayareahelper.DisplayAreaHelperController; import com.android.wm.shell.draganddrop.DragAndDropController; Loading Loading @@ -677,7 +678,11 @@ public abstract class WMShellBaseModule { @WMSingleton @Provides static Optional<DesktopMode> provideDesktopMode( Optional<DesktopModeController> desktopModeController) { Optional<DesktopModeController> desktopModeController, Optional<DesktopTasksController> desktopTasksController) { if (DesktopModeStatus.isProto2Enabled()) { return desktopTasksController.map(DesktopTasksController::asDesktopMode); } return desktopModeController.map(DesktopModeController::asDesktopMode); } Loading @@ -698,6 +703,23 @@ public abstract class WMShellBaseModule { return Optional.empty(); } @BindsOptionalOf @DynamicOverride abstract DesktopTasksController optionalDesktopTasksController(); @WMSingleton @Provides static Optional<DesktopTasksController> providesDesktopTasksController( @DynamicOverride Optional<Lazy<DesktopTasksController>> desktopTasksController) { // Use optional-of-lazy for the dependency that this provider relies on. // Lazy ensures that this provider will not be the cause the dependency is created // when it will not be returned due to the condition below. if (DesktopModeStatus.isProto2Enabled()) { return desktopTasksController.map(Lazy::get); } return Optional.empty(); } @BindsOptionalOf @DynamicOverride abstract DesktopModeTaskRepository optionalDesktopModeTaskRepository(); Loading