@@ -355,6 +355,8 @@ public void run() {
355
355
public ViewGroupFocusHelper mFocusHandler ;
356
356
private boolean mRotationEnabled = false ;
357
357
358
+ private LauncherTab mLauncherTab ;
359
+
358
360
@ Thunk void setOrientation () {
359
361
if (mRotationEnabled ) {
360
362
unlockScreenOrientation (true );
@@ -456,6 +458,8 @@ protected void onCreate(Bundle savedInstanceState) {
456
458
IntentFilter filter = new IntentFilter (ACTION_APPWIDGET_HOST_RESET );
457
459
registerReceiver (mUiBroadcastReceiver , filter );
458
460
461
+ mLauncherTab = new LauncherTab (this );
462
+
459
463
mRotationEnabled = getResources ().getBoolean (R .bool .allow_rotation );
460
464
// In case we are on a device with locked rotation, we should look at preferences to check
461
465
// if the user has specifically allowed rotation.
@@ -1059,6 +1063,9 @@ protected void onResume() {
1059
1063
mAllAppsController .showDiscoveryBounce ();
1060
1064
}
1061
1065
mIsResumeFromActionScreenOff = false ;
1066
+
1067
+ mLauncherTab .getClient ().onResume ();
1068
+
1062
1069
if (mLauncherCallbacks != null ) {
1063
1070
mLauncherCallbacks .onResume ();
1064
1071
}
@@ -1080,6 +1087,8 @@ protected void onPause() {
1080
1087
mWorkspace .getCustomContentCallbacks ().onHide ();
1081
1088
}
1082
1089
1090
+ mLauncherTab .getClient ().onPause ();
1091
+
1083
1092
if (mLauncherCallbacks != null ) {
1084
1093
mLauncherCallbacks .onPause ();
1085
1094
}
@@ -1620,6 +1629,8 @@ public void onAttachedToWindow() {
1620
1629
mAttached = true ;
1621
1630
mVisible = true ;
1622
1631
1632
+ mLauncherTab .getClient ().onAttachedToWindow ();
1633
+
1623
1634
if (mLauncherCallbacks != null ) {
1624
1635
mLauncherCallbacks .onAttachedToWindow ();
1625
1636
}
@@ -1636,6 +1647,8 @@ public void onDetachedFromWindow() {
1636
1647
}
1637
1648
updateAutoAdvanceState ();
1638
1649
1650
+ mLauncherTab .getClient ().onDetachedFromWindow ();
1651
+
1639
1652
if (mLauncherCallbacks != null ) {
1640
1653
mLauncherCallbacks .onDetachedFromWindow ();
1641
1654
}
@@ -1865,6 +1878,8 @@ protected void onNewIntent(Intent intent) {
1865
1878
mWidgetsView .scrollToTop ();
1866
1879
}
1867
1880
1881
+ mLauncherTab .getClient ().hideOverlay (true );
1882
+
1868
1883
if (mLauncherCallbacks != null ) {
1869
1884
mLauncherCallbacks .onHomeIntent ();
1870
1885
}
@@ -1978,6 +1993,8 @@ public void onDestroy() {
1978
1993
1979
1994
LauncherAnimUtils .onDestroyActivity ();
1980
1995
1996
+ mLauncherTab .getClient ().onDestroy ();
1997
+
1981
1998
if (mLauncherCallbacks != null ) {
1982
1999
mLauncherCallbacks .onDestroy ();
1983
2000
}
0 commit comments