Loading res/layout/qsb_blocker_view.xml +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <com.android.launcher3.QsbBlockerView <com.android.launcher3.qsb.QsbBlockerView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" /> No newline at end of file res/layout/qsb_container.xml +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <com.android.launcher3.QsbContainerView <com.android.launcher3.qsb.QsbContainerView xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" Loading @@ -23,8 +23,8 @@ android:padding="0dp" > <fragment android:name="com.android.launcher3.QsbContainerView$QsbFragment" android:name="com.android.launcher3.qsb.QsbContainerView$QsbFragment" android:layout_width="match_parent" android:tag="qsb_view" android:layout_height="match_parent"/> </com.android.launcher3.QsbContainerView> No newline at end of file </com.android.launcher3.qsb.QsbContainerView> No newline at end of file src/com/android/launcher3/Launcher.java +8 −32 Original line number Diff line number Diff line Loading @@ -69,7 +69,6 @@ import android.view.Menu; import android.view.MotionEvent; import android.view.Surface; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnLongClickListener; import android.view.ViewGroup; import android.view.ViewTreeObserver; Loading Loading @@ -173,9 +172,6 @@ public class Launcher extends Activity static final String INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION = "com.android.launcher3.intent.extra.shortcut.INGORE_LAUNCH_ANIMATION"; public static final String ACTION_APPWIDGET_HOST_RESET = "com.android.launcher3.intent.ACTION_APPWIDGET_HOST_RESET"; // Type: int private static final String RUNTIME_STATE_CURRENT_SCREEN = "launcher.current_screen"; // Type: int Loading Loading @@ -206,18 +202,6 @@ public class Launcher extends Activity private static int NEW_APPS_ANIMATION_INACTIVE_TIMEOUT_SECONDS = 5; @Thunk static int NEW_APPS_ANIMATION_DELAY = 500; private final BroadcastReceiver mUiBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (ACTION_APPWIDGET_HOST_RESET.equals(intent.getAction())) { if (mAppWidgetHost != null) { mAppWidgetHost.startListening(); } } } }; @Thunk Workspace mWorkspace; private View mLauncherView; @Thunk DragLayer mDragLayer; Loading Loading @@ -441,9 +425,6 @@ public class Launcher extends Activity mDefaultKeySsb = new SpannableStringBuilder(); Selection.setSelection(mDefaultKeySsb, 0); IntentFilter filter = new IntentFilter(ACTION_APPWIDGET_HOST_RESET); registerReceiver(mUiBroadcastReceiver, filter); mRotationEnabled = getResources().getBoolean(R.bool.allow_rotation); // In case we are on a device with locked rotation, we should look at preferences to check // if the user has specifically allowed rotation. Loading @@ -467,6 +448,13 @@ public class Launcher extends Activity loadExtractedColorsAndColorItems(); } @Override public void onAppWidgetHostReset() { if (mAppWidgetHost != null) { mAppWidgetHost.startListening(); } } private void loadExtractedColorsAndColorItems() { // TODO: do this in pre-N as well, once the extraction part is complete. if (Utilities.isNycOrAbove()) { Loading Loading @@ -570,7 +558,7 @@ public class Launcher extends Activity } @Override public void onLauncherProviderChange() { public void onLauncherProviderChanged() { if (mLauncherCallbacks != null) { mLauncherCallbacks.onLauncherProviderChange(); } Loading Loading @@ -1665,13 +1653,6 @@ public class Launcher extends Activity return mDeviceProfile; } public void closeSystemDialogs() { getWindow().closeAllPanels(); // Whatever we were doing is hereby canceled. setWaitingForResult(null); } @Override protected void onNewIntent(Intent intent) { long startTime = 0; Loading @@ -1690,9 +1671,6 @@ public class Launcher extends Activity boolean isActionMain = Intent.ACTION_MAIN.equals(intent.getAction()); if (isActionMain) { // also will cancel mWaitingForResult. closeSystemDialogs(); if (mWorkspace == null) { // Can be cases where mWorkspace is null, this prevents a NPE return; Loading Loading @@ -1830,8 +1808,6 @@ public class Launcher extends Activity ((AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE)) .removeAccessibilityStateChangeListener(this); unregisterReceiver(mUiBroadcastReceiver); LauncherAnimUtils.onDestroyActivity(); if (mLauncherCallbacks != null) { Loading src/com/android/launcher3/LauncherAppWidgetHostView.java +1 −3 Original line number Diff line number Diff line Loading @@ -63,8 +63,6 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView implements Touc @ViewDebug.ExportedProperty(category = "launcher") private boolean mChildrenFocused; protected int mErrorViewId = R.layout.appwidget_error; private boolean mIsAttachedToWindow; private boolean mIsAutoAdvanceRegistered; private Runnable mAutoAdvanceRunnable; Loading @@ -81,7 +79,7 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView implements Touc @Override protected View getErrorView() { return mInflater.inflate(mErrorViewId, this, false); return mInflater.inflate(R.layout.appwidget_error, this, false); } public void updateLastInflationOrientation() { Loading src/com/android/launcher3/LauncherProvider.java +4 −11 Original line number Diff line number Diff line Loading @@ -649,11 +649,8 @@ public class LauncherProvider extends ContentProvider { // Database was just created, so wipe any previous widgets if (mWidgetHostResetHandler != null) { new AppWidgetHost(mContext, Launcher.APPWIDGET_HOST_ID).deleteHost(); mWidgetHostResetHandler.sendMessage(Message.obtain( mWidgetHostResetHandler, ChangeListenerWrapper.MSG_APP_WIDGET_HOST_RESET, mContext )); mWidgetHostResetHandler.sendEmptyMessage( ChangeListenerWrapper.MSG_EXTRACTED_COLORS_CHANGED); } // Set the flag for empty DB Loading Loading @@ -1136,17 +1133,13 @@ public class LauncherProvider extends ContentProvider { if (mListener != null) { switch (msg.what) { case MSG_LAUNCHER_PROVIDER_CHANGED: mListener.onLauncherProviderChange(); mListener.onLauncherProviderChanged(); break; case MSG_EXTRACTED_COLORS_CHANGED: mListener.onExtractedColorsChanged(); break; case MSG_APP_WIDGET_HOST_RESET: Context context = (Context) msg.obj; if (context != null) { context.sendBroadcast(new Intent(Launcher.ACTION_APPWIDGET_HOST_RESET) .setPackage(context.getPackageName())); } mListener.onAppWidgetHostReset(); break; } } Loading Loading
res/layout/qsb_blocker_view.xml +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <com.android.launcher3.QsbBlockerView <com.android.launcher3.qsb.QsbBlockerView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" /> No newline at end of file
res/layout/qsb_container.xml +3 −3 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <com.android.launcher3.QsbContainerView <com.android.launcher3.qsb.QsbContainerView xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" Loading @@ -23,8 +23,8 @@ android:padding="0dp" > <fragment android:name="com.android.launcher3.QsbContainerView$QsbFragment" android:name="com.android.launcher3.qsb.QsbContainerView$QsbFragment" android:layout_width="match_parent" android:tag="qsb_view" android:layout_height="match_parent"/> </com.android.launcher3.QsbContainerView> No newline at end of file </com.android.launcher3.qsb.QsbContainerView> No newline at end of file
src/com/android/launcher3/Launcher.java +8 −32 Original line number Diff line number Diff line Loading @@ -69,7 +69,6 @@ import android.view.Menu; import android.view.MotionEvent; import android.view.Surface; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnLongClickListener; import android.view.ViewGroup; import android.view.ViewTreeObserver; Loading Loading @@ -173,9 +172,6 @@ public class Launcher extends Activity static final String INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION = "com.android.launcher3.intent.extra.shortcut.INGORE_LAUNCH_ANIMATION"; public static final String ACTION_APPWIDGET_HOST_RESET = "com.android.launcher3.intent.ACTION_APPWIDGET_HOST_RESET"; // Type: int private static final String RUNTIME_STATE_CURRENT_SCREEN = "launcher.current_screen"; // Type: int Loading Loading @@ -206,18 +202,6 @@ public class Launcher extends Activity private static int NEW_APPS_ANIMATION_INACTIVE_TIMEOUT_SECONDS = 5; @Thunk static int NEW_APPS_ANIMATION_DELAY = 500; private final BroadcastReceiver mUiBroadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (ACTION_APPWIDGET_HOST_RESET.equals(intent.getAction())) { if (mAppWidgetHost != null) { mAppWidgetHost.startListening(); } } } }; @Thunk Workspace mWorkspace; private View mLauncherView; @Thunk DragLayer mDragLayer; Loading Loading @@ -441,9 +425,6 @@ public class Launcher extends Activity mDefaultKeySsb = new SpannableStringBuilder(); Selection.setSelection(mDefaultKeySsb, 0); IntentFilter filter = new IntentFilter(ACTION_APPWIDGET_HOST_RESET); registerReceiver(mUiBroadcastReceiver, filter); mRotationEnabled = getResources().getBoolean(R.bool.allow_rotation); // In case we are on a device with locked rotation, we should look at preferences to check // if the user has specifically allowed rotation. Loading @@ -467,6 +448,13 @@ public class Launcher extends Activity loadExtractedColorsAndColorItems(); } @Override public void onAppWidgetHostReset() { if (mAppWidgetHost != null) { mAppWidgetHost.startListening(); } } private void loadExtractedColorsAndColorItems() { // TODO: do this in pre-N as well, once the extraction part is complete. if (Utilities.isNycOrAbove()) { Loading Loading @@ -570,7 +558,7 @@ public class Launcher extends Activity } @Override public void onLauncherProviderChange() { public void onLauncherProviderChanged() { if (mLauncherCallbacks != null) { mLauncherCallbacks.onLauncherProviderChange(); } Loading Loading @@ -1665,13 +1653,6 @@ public class Launcher extends Activity return mDeviceProfile; } public void closeSystemDialogs() { getWindow().closeAllPanels(); // Whatever we were doing is hereby canceled. setWaitingForResult(null); } @Override protected void onNewIntent(Intent intent) { long startTime = 0; Loading @@ -1690,9 +1671,6 @@ public class Launcher extends Activity boolean isActionMain = Intent.ACTION_MAIN.equals(intent.getAction()); if (isActionMain) { // also will cancel mWaitingForResult. closeSystemDialogs(); if (mWorkspace == null) { // Can be cases where mWorkspace is null, this prevents a NPE return; Loading Loading @@ -1830,8 +1808,6 @@ public class Launcher extends Activity ((AccessibilityManager) getSystemService(ACCESSIBILITY_SERVICE)) .removeAccessibilityStateChangeListener(this); unregisterReceiver(mUiBroadcastReceiver); LauncherAnimUtils.onDestroyActivity(); if (mLauncherCallbacks != null) { Loading
src/com/android/launcher3/LauncherAppWidgetHostView.java +1 −3 Original line number Diff line number Diff line Loading @@ -63,8 +63,6 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView implements Touc @ViewDebug.ExportedProperty(category = "launcher") private boolean mChildrenFocused; protected int mErrorViewId = R.layout.appwidget_error; private boolean mIsAttachedToWindow; private boolean mIsAutoAdvanceRegistered; private Runnable mAutoAdvanceRunnable; Loading @@ -81,7 +79,7 @@ public class LauncherAppWidgetHostView extends AppWidgetHostView implements Touc @Override protected View getErrorView() { return mInflater.inflate(mErrorViewId, this, false); return mInflater.inflate(R.layout.appwidget_error, this, false); } public void updateLastInflationOrientation() { Loading
src/com/android/launcher3/LauncherProvider.java +4 −11 Original line number Diff line number Diff line Loading @@ -649,11 +649,8 @@ public class LauncherProvider extends ContentProvider { // Database was just created, so wipe any previous widgets if (mWidgetHostResetHandler != null) { new AppWidgetHost(mContext, Launcher.APPWIDGET_HOST_ID).deleteHost(); mWidgetHostResetHandler.sendMessage(Message.obtain( mWidgetHostResetHandler, ChangeListenerWrapper.MSG_APP_WIDGET_HOST_RESET, mContext )); mWidgetHostResetHandler.sendEmptyMessage( ChangeListenerWrapper.MSG_EXTRACTED_COLORS_CHANGED); } // Set the flag for empty DB Loading Loading @@ -1136,17 +1133,13 @@ public class LauncherProvider extends ContentProvider { if (mListener != null) { switch (msg.what) { case MSG_LAUNCHER_PROVIDER_CHANGED: mListener.onLauncherProviderChange(); mListener.onLauncherProviderChanged(); break; case MSG_EXTRACTED_COLORS_CHANGED: mListener.onExtractedColorsChanged(); break; case MSG_APP_WIDGET_HOST_RESET: Context context = (Context) msg.obj; if (context != null) { context.sendBroadcast(new Intent(Launcher.ACTION_APPWIDGET_HOST_RESET) .setPackage(context.getPackageName())); } mListener.onAppWidgetHostReset(); break; } } Loading