Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDebugConfig.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -52,6 +52,11 @@ public class BubbleDebugConfig { private static final boolean FORCE_SHOW_USER_EDUCATION = false; private static final boolean FORCE_SHOW_USER_EDUCATION = false; private static final String FORCE_SHOW_USER_EDUCATION_SETTING = private static final String FORCE_SHOW_USER_EDUCATION_SETTING = "force_show_bubbles_user_education"; "force_show_bubbles_user_education"; /** * When set to true, bubbles user education flow never shows up. */ private static final String FORCE_HIDE_USER_EDUCATION_SETTING = "force_hide_bubbles_user_education"; /** /** * @return whether we should force show user education for bubbles. Used for debugging & demos. * @return whether we should force show user education for bubbles. Used for debugging & demos. Loading @@ -62,6 +67,14 @@ public class BubbleDebugConfig { return FORCE_SHOW_USER_EDUCATION || forceShow; return FORCE_SHOW_USER_EDUCATION || forceShow; } } /** * @return whether we should never show user education for bubbles. Used in tests. */ static boolean neverShowUserEducation(Context context) { return Settings.Secure.getInt(context.getContentResolver(), FORCE_HIDE_USER_EDUCATION_SETTING, 0) != 0; } static String formatBubblesString(List<Bubble> bubbles, BubbleViewProvider selected) { static String formatBubblesString(List<Bubble> bubbles, BubbleViewProvider selected) { StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder(); for (Bubble bubble : bubbles) { for (Bubble bubble : bubbles) { Loading libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -1284,6 +1284,12 @@ public class BubbleStackView extends FrameLayout if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Show manage edu: " + shouldShow); Log.d(TAG, "Show manage edu: " + shouldShow); } } if (shouldShow && BubbleDebugConfig.neverShowUserEducation(mContext)) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Want to show manage edu, but it is forced hidden"); } return false; } return shouldShow; return shouldShow; } } Loading Loading @@ -1316,6 +1322,12 @@ public class BubbleStackView extends FrameLayout if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Show stack edu: " + shouldShow); Log.d(TAG, "Show stack edu: " + shouldShow); } } if (shouldShow && BubbleDebugConfig.neverShowUserEducation(mContext)) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Want to show stack edu, but it is forced hidden"); } return false; } return shouldShow; return shouldShow; } } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleDebugConfig.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -52,6 +52,11 @@ public class BubbleDebugConfig { private static final boolean FORCE_SHOW_USER_EDUCATION = false; private static final boolean FORCE_SHOW_USER_EDUCATION = false; private static final String FORCE_SHOW_USER_EDUCATION_SETTING = private static final String FORCE_SHOW_USER_EDUCATION_SETTING = "force_show_bubbles_user_education"; "force_show_bubbles_user_education"; /** * When set to true, bubbles user education flow never shows up. */ private static final String FORCE_HIDE_USER_EDUCATION_SETTING = "force_hide_bubbles_user_education"; /** /** * @return whether we should force show user education for bubbles. Used for debugging & demos. * @return whether we should force show user education for bubbles. Used for debugging & demos. Loading @@ -62,6 +67,14 @@ public class BubbleDebugConfig { return FORCE_SHOW_USER_EDUCATION || forceShow; return FORCE_SHOW_USER_EDUCATION || forceShow; } } /** * @return whether we should never show user education for bubbles. Used in tests. */ static boolean neverShowUserEducation(Context context) { return Settings.Secure.getInt(context.getContentResolver(), FORCE_HIDE_USER_EDUCATION_SETTING, 0) != 0; } static String formatBubblesString(List<Bubble> bubbles, BubbleViewProvider selected) { static String formatBubblesString(List<Bubble> bubbles, BubbleViewProvider selected) { StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder(); for (Bubble bubble : bubbles) { for (Bubble bubble : bubbles) { Loading
libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -1284,6 +1284,12 @@ public class BubbleStackView extends FrameLayout if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Show manage edu: " + shouldShow); Log.d(TAG, "Show manage edu: " + shouldShow); } } if (shouldShow && BubbleDebugConfig.neverShowUserEducation(mContext)) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Want to show manage edu, but it is forced hidden"); } return false; } return shouldShow; return shouldShow; } } Loading Loading @@ -1316,6 +1322,12 @@ public class BubbleStackView extends FrameLayout if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Show stack edu: " + shouldShow); Log.d(TAG, "Show stack edu: " + shouldShow); } } if (shouldShow && BubbleDebugConfig.neverShowUserEducation(mContext)) { if (BubbleDebugConfig.DEBUG_USER_EDUCATION) { Log.d(TAG, "Want to show stack edu, but it is forced hidden"); } return false; } return shouldShow; return shouldShow; } } Loading