summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 6c7373907..c923c9582 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -431,8 +431,13 @@ public class Launcher extends Activity
LauncherAppState.getLauncherProvider().setLauncherProviderChangeListener(this);
// Load configuration-specific DeviceProfile
- mDeviceProfile = new DeviceProfile(this, app.getInvariantDeviceProfile());
- mDeviceProfile.addCallback(LauncherAppState.getInstance());
+ mDeviceProfile = getResources().getConfiguration().orientation
+ == Configuration.ORIENTATION_LANDSCAPE ?
+ app.getInvariantDeviceProfile().landscapeProfile
+ : app.getInvariantDeviceProfile().portraitProfile;
+
+ // TODO: Move this to icon cache.
+ Utilities.setIconSize(mDeviceProfile.iconSizePx);
// the LauncherApplication should call this, but in case of Instrumentation it might not be present yet
mSharedPrefs = getSharedPreferences(LauncherAppState.getSharedPreferencesKey(),
@@ -4199,7 +4204,7 @@ public class Launcher extends Activity
}
protected Rect getSearchBarBounds() {
- return mDeviceProfile.getSearchBarBounds();
+ return mDeviceProfile.getSearchBarBounds(Utilities.isRtl(getResources()));
}
public void bindSearchablesChanged() {