Loading quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java +0 −2 Original line number Diff line number Diff line Loading @@ -110,8 +110,6 @@ public class StatsLogCompatManager extends StatsLogManager { public static final CopyOnWriteArrayList<StatsLogConsumer> LOGS_CONSUMER = new CopyOnWriteArrayList<>(); private final Context mContext; public StatsLogCompatManager(Context context) { mContext = context; } Loading res/values/dimens.xml +4 −0 Original line number Diff line number Diff line Loading @@ -438,4 +438,8 @@ <!-- Folder spaces --> <dimen name="folder_top_padding_default">24dp</dimen> <dimen name="folder_footer_horiz_padding">20dp</dimen> <!-- Default Ime height. Used only for logging purposes. Assume this is default keyboard height in EN locale in case the keyboard height is not known when queried.--> <dimen name="default_ime_height">300dp</dimen> </resources> src/com/android/launcher3/logging/KeyboardStateManager.java +22 −6 Original line number Diff line number Diff line Loading @@ -24,7 +24,10 @@ import android.os.SystemClock; */ public class KeyboardStateManager { private long mUpdatedTime; private int mImeHeight; private int mImeHeightPx; // Height of the keyboard when it's shown. // mImeShownHeightPx>=mImeHeightPx always. private int mImeShownHeightPx; public enum KeyboardState { NO_IME_ACTION, Loading @@ -34,8 +37,9 @@ public class KeyboardStateManager { private KeyboardState mKeyboardState; public KeyboardStateManager() { public KeyboardStateManager(int defaultImeShownHeightPx) { mKeyboardState = NO_IME_ACTION; mImeShownHeightPx = defaultImeShownHeightPx; } /** Loading Loading @@ -64,13 +68,25 @@ public class KeyboardStateManager { * Returns keyboard's current height. */ public int getImeHeight() { return mImeHeight; return mImeHeightPx; } /** * Setter method to set keyboard height. * Returns keyboard's height in pixels when shown. */ public void setImeHeight(int imeHeight) { mImeHeight = imeHeight; public int getImeShownHeight() { return mImeShownHeightPx; } /** * Setter method to set keyboard height in pixels. */ public void setImeHeight(int imeHeightPx) { mImeHeightPx = imeHeightPx; if (mImeHeightPx > 0) { // Update the mImeShownHeightPx with the actual ime height when shown and store it // for future sessions. mImeShownHeightPx = mImeHeightPx; } } } src/com/android/launcher3/logging/StatsLogManager.java +5 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class StatsLogManager implements ResourceBasedOverride { private InstanceId mInstanceId; protected @Nullable ActivityContext mActivityContext = null; protected @Nullable Context mContext = null; private KeyboardStateManager mKeyboardStateManager; /** Loading Loading @@ -1035,7 +1036,9 @@ public class StatsLogManager implements ResourceBasedOverride { */ public KeyboardStateManager keyboardStateManager() { if (mKeyboardStateManager == null) { mKeyboardStateManager = new KeyboardStateManager(); mKeyboardStateManager = new KeyboardStateManager( mContext != null ? mContext.getResources().getDimensionPixelSize( R.dimen.default_ime_height) : 0); } return mKeyboardStateManager; } Loading Loading @@ -1071,6 +1074,7 @@ public class StatsLogManager implements ResourceBasedOverride { StatsLogManager manager = Overrides.getObject(StatsLogManager.class, context.getApplicationContext(), R.string.stats_log_manager_class); manager.mActivityContext = ActivityContext.lookupContextNoThrow(context); manager.mContext = context; return manager; } } Loading
quickstep/src/com/android/quickstep/logging/StatsLogCompatManager.java +0 −2 Original line number Diff line number Diff line Loading @@ -110,8 +110,6 @@ public class StatsLogCompatManager extends StatsLogManager { public static final CopyOnWriteArrayList<StatsLogConsumer> LOGS_CONSUMER = new CopyOnWriteArrayList<>(); private final Context mContext; public StatsLogCompatManager(Context context) { mContext = context; } Loading
res/values/dimens.xml +4 −0 Original line number Diff line number Diff line Loading @@ -438,4 +438,8 @@ <!-- Folder spaces --> <dimen name="folder_top_padding_default">24dp</dimen> <dimen name="folder_footer_horiz_padding">20dp</dimen> <!-- Default Ime height. Used only for logging purposes. Assume this is default keyboard height in EN locale in case the keyboard height is not known when queried.--> <dimen name="default_ime_height">300dp</dimen> </resources>
src/com/android/launcher3/logging/KeyboardStateManager.java +22 −6 Original line number Diff line number Diff line Loading @@ -24,7 +24,10 @@ import android.os.SystemClock; */ public class KeyboardStateManager { private long mUpdatedTime; private int mImeHeight; private int mImeHeightPx; // Height of the keyboard when it's shown. // mImeShownHeightPx>=mImeHeightPx always. private int mImeShownHeightPx; public enum KeyboardState { NO_IME_ACTION, Loading @@ -34,8 +37,9 @@ public class KeyboardStateManager { private KeyboardState mKeyboardState; public KeyboardStateManager() { public KeyboardStateManager(int defaultImeShownHeightPx) { mKeyboardState = NO_IME_ACTION; mImeShownHeightPx = defaultImeShownHeightPx; } /** Loading Loading @@ -64,13 +68,25 @@ public class KeyboardStateManager { * Returns keyboard's current height. */ public int getImeHeight() { return mImeHeight; return mImeHeightPx; } /** * Setter method to set keyboard height. * Returns keyboard's height in pixels when shown. */ public void setImeHeight(int imeHeight) { mImeHeight = imeHeight; public int getImeShownHeight() { return mImeShownHeightPx; } /** * Setter method to set keyboard height in pixels. */ public void setImeHeight(int imeHeightPx) { mImeHeightPx = imeHeightPx; if (mImeHeightPx > 0) { // Update the mImeShownHeightPx with the actual ime height when shown and store it // for future sessions. mImeShownHeightPx = mImeHeightPx; } } }
src/com/android/launcher3/logging/StatsLogManager.java +5 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class StatsLogManager implements ResourceBasedOverride { private InstanceId mInstanceId; protected @Nullable ActivityContext mActivityContext = null; protected @Nullable Context mContext = null; private KeyboardStateManager mKeyboardStateManager; /** Loading Loading @@ -1035,7 +1036,9 @@ public class StatsLogManager implements ResourceBasedOverride { */ public KeyboardStateManager keyboardStateManager() { if (mKeyboardStateManager == null) { mKeyboardStateManager = new KeyboardStateManager(); mKeyboardStateManager = new KeyboardStateManager( mContext != null ? mContext.getResources().getDimensionPixelSize( R.dimen.default_ime_height) : 0); } return mKeyboardStateManager; } Loading Loading @@ -1071,6 +1074,7 @@ public class StatsLogManager implements ResourceBasedOverride { StatsLogManager manager = Overrides.getObject(StatsLogManager.class, context.getApplicationContext(), R.string.stats_log_manager_class); manager.mActivityContext = ActivityContext.lookupContextNoThrow(context); manager.mContext = context; return manager; } }