Loading packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl; import com.android.systemui.statusbar.notification.people.PeopleHubModule; import com.android.systemui.statusbar.notification.people.PeopleHubModule; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.phone.KeyguardLiftController; import com.android.systemui.statusbar.phone.KeyguardLiftController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; Loading @@ -61,7 +62,7 @@ import dagger.Provides; @Module(includes = {AssistModule.class, @Module(includes = {AssistModule.class, ConcurrencyModule.class, ConcurrencyModule.class, PeopleHubModule.class}, PeopleHubModule.class}, subcomponents = {StatusBarComponent.class}) subcomponents = {StatusBarComponent.class, NotificationRowComponent.class}) public abstract class SystemUIModule { public abstract class SystemUIModule { @Binds @Binds Loading packages/SystemUI/src/com/android/systemui/statusbar/SuperStatusBarViewFactory.java +11 −1 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.view.LayoutInflater; import android.view.ViewGroup; import android.view.ViewGroup; import com.android.systemui.R; import com.android.systemui.R; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.phone.LockIcon; import com.android.systemui.statusbar.phone.LockIcon; import com.android.systemui.statusbar.phone.NotificationPanelView; import com.android.systemui.statusbar.phone.NotificationPanelView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; Loading @@ -39,6 +40,7 @@ public class SuperStatusBarViewFactory { private final Context mContext; private final Context mContext; private final InjectionInflationController mInjectionInflationController; private final InjectionInflationController mInjectionInflationController; private final NotificationRowComponent.Builder mNotificationRowComponentBuilder; private NotificationShadeWindowView mNotificationShadeWindowView; private NotificationShadeWindowView mNotificationShadeWindowView; private StatusBarWindowView mStatusBarWindowView; private StatusBarWindowView mStatusBarWindowView; Loading @@ -46,9 +48,11 @@ public class SuperStatusBarViewFactory { @Inject @Inject public SuperStatusBarViewFactory(Context context, public SuperStatusBarViewFactory(Context context, InjectionInflationController injectionInflationController) { InjectionInflationController injectionInflationController, NotificationRowComponent.Builder notificationRowComponentBuilder) { mContext = context; mContext = context; mInjectionInflationController = injectionInflationController; mInjectionInflationController = injectionInflationController; mNotificationRowComponentBuilder = notificationRowComponentBuilder; } } /** /** Loading Loading @@ -114,6 +118,12 @@ public class SuperStatusBarViewFactory { mNotificationShelf = (NotificationShelf) mInjectionInflationController.injectable( mNotificationShelf = (NotificationShelf) mInjectionInflationController.injectable( LayoutInflater.from(mContext)).inflate(R.layout.status_bar_notification_shelf, LayoutInflater.from(mContext)).inflate(R.layout.status_bar_notification_shelf, container, /* attachToRoot= */ false); container, /* attachToRoot= */ false); NotificationRowComponent component = mNotificationRowComponentBuilder .activatableNotificationView(mNotificationShelf) .build(); component.getActivatableNotificationViewController().init(); if (mNotificationShelf == null) { if (mNotificationShelf == null) { throw new IllegalStateException( throw new IllegalStateException( "R.layout.status_bar_notification_shelf could not be properly inflated"); "R.layout.status_bar_notification_shelf could not be properly inflated"); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -41,9 +41,6 @@ import com.android.systemui.statusbar.notification.NotificationClicker; import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider; import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.people.NotificationPersonExtractorPluginBoundary; import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifier; import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifierImpl; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder; import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder; Loading @@ -52,13 +49,13 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationGroupManager; import com.android.systemui.statusbar.phone.NotificationGroupManager; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.ExtensionControllerImpl; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.HeadsUpManager; import java.util.Objects; import java.util.Objects; import javax.inject.Inject; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; import javax.inject.Singleton; /** Handles inflating and updating views for notifications. */ /** Handles inflating and updating views for notifications. */ Loading Loading @@ -88,6 +85,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { private ExpandableNotificationRow.OnAppOpsClickListener mOnAppOpsClickListener; private ExpandableNotificationRow.OnAppOpsClickListener mOnAppOpsClickListener; private BindRowCallback mBindRowCallback; private BindRowCallback mBindRowCallback; private NotificationClicker mNotificationClicker; private NotificationClicker mNotificationClicker; private final Provider<RowInflaterTask> mRowInflaterTaskProvider; private final NotificationLogger mNotificationLogger; private final NotificationLogger mNotificationLogger; @Inject @Inject Loading @@ -102,6 +100,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { NotificationGroupManager notificationGroupManager, NotificationGroupManager notificationGroupManager, NotificationGutsManager notificationGutsManager, NotificationGutsManager notificationGutsManager, NotificationInterruptionStateProvider notificationInterruptionStateProvider, NotificationInterruptionStateProvider notificationInterruptionStateProvider, Provider<RowInflaterTask> rowInflaterTaskProvider, NotificationLogger logger) { NotificationLogger logger) { mContext = context; mContext = context; mRowContentBinder = rowContentBinder; mRowContentBinder = rowContentBinder; Loading @@ -114,6 +113,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { mGroupManager = notificationGroupManager; mGroupManager = notificationGroupManager; mGutsManager = notificationGutsManager; mGutsManager = notificationGutsManager; mNotificationInterruptionStateProvider = notificationInterruptionStateProvider; mNotificationInterruptionStateProvider = notificationInterruptionStateProvider; mRowInflaterTaskProvider = rowInflaterTaskProvider; mNotificationLogger = logger; mNotificationLogger = logger; } } Loading Loading @@ -159,7 +159,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { entry.getRow().setOnDismissRunnable(onDismissRunnable); entry.getRow().setOnDismissRunnable(onDismissRunnable); } else { } else { entry.createIcons(mContext, sbn); entry.createIcons(mContext, sbn); new RowInflaterTask().inflate(mContext, parent, entry, mRowInflaterTaskProvider.get().inflate(mContext, parent, entry, row -> { row -> { bindRow(entry, pmUser, sbn, row, onDismissRunnable); bindRow(entry, pmUser, sbn, row, onDismissRunnable); updateNotification(entry, pmUser, sbn, row); updateNotification(entry, pmUser, sbn, row); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java 0 → 100644 +47 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.statusbar.notification.row; import android.view.accessibility.AccessibilityManager; import com.android.systemui.plugins.FalsingManager; import javax.inject.Inject; /** * Controller for {@link ActivatableNotificationView} */ public class ActivatableNotificationViewController { private final ActivatableNotificationView mView; private final AccessibilityManager mAccessibilityManager; private final FalsingManager mFalsingManager; @Inject public ActivatableNotificationViewController(ActivatableNotificationView view, AccessibilityManager accessibilityManager, FalsingManager falsingManager) { mView = view; mAccessibilityManager = accessibilityManager; mFalsingManager = falsingManager; } /** * Initialize the controller, setting up handlers and other behavior. */ public void init() { } } packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RowInflaterTask.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,9 @@ import androidx.asynclayoutinflater.view.AsyncLayoutInflater; import com.android.systemui.R; import com.android.systemui.R; import com.android.systemui.statusbar.InflationTask; import com.android.systemui.statusbar.InflationTask; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import javax.inject.Inject; /** /** * An inflater task that asynchronously inflates a ExpandableNotificationRow * An inflater task that asynchronously inflates a ExpandableNotificationRow Loading @@ -34,12 +37,20 @@ public class RowInflaterTask implements InflationTask, AsyncLayoutInflater.OnInf private static final String TAG = "RowInflaterTask"; private static final String TAG = "RowInflaterTask"; private static final boolean TRACE_ORIGIN = true; private static final boolean TRACE_ORIGIN = true; private final NotificationRowComponent.Builder mNotificationRowComponentBuilder; private RowInflationFinishedListener mListener; private RowInflationFinishedListener mListener; private NotificationEntry mEntry; private NotificationEntry mEntry; private boolean mCancelled; private boolean mCancelled; private Throwable mInflateOrigin; private Throwable mInflateOrigin; @Inject public RowInflaterTask( NotificationRowComponent.Builder notificationRowComponentBuilder) { super(); mNotificationRowComponentBuilder = notificationRowComponentBuilder; } /** /** * Inflates a new notificationView. This should not be called twice on this object * Inflates a new notificationView. This should not be called twice on this object */ */ Loading @@ -64,6 +75,12 @@ public class RowInflaterTask implements InflationTask, AsyncLayoutInflater.OnInf public void onInflateFinished(View view, int resid, ViewGroup parent) { public void onInflateFinished(View view, int resid, ViewGroup parent) { if (!mCancelled) { if (!mCancelled) { try { try { // Setup the controller for the view. NotificationRowComponent component = mNotificationRowComponentBuilder .activatableNotificationView((ActivatableNotificationView) view) .build(); component.getActivatableNotificationViewController().init(); mEntry.onInflationTaskFinished(); mEntry.onInflationTaskFinished(); mListener.onInflationFinished((ExpandableNotificationRow) view); mListener.onInflationFinished((ExpandableNotificationRow) view); } catch (Throwable t) { } catch (Throwable t) { Loading Loading
packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl; import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl; import com.android.systemui.statusbar.notification.people.PeopleHubModule; import com.android.systemui.statusbar.notification.people.PeopleHubModule; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.phone.KeyguardLiftController; import com.android.systemui.statusbar.phone.KeyguardLiftController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; import com.android.systemui.statusbar.phone.dagger.StatusBarComponent; Loading @@ -61,7 +62,7 @@ import dagger.Provides; @Module(includes = {AssistModule.class, @Module(includes = {AssistModule.class, ConcurrencyModule.class, ConcurrencyModule.class, PeopleHubModule.class}, PeopleHubModule.class}, subcomponents = {StatusBarComponent.class}) subcomponents = {StatusBarComponent.class, NotificationRowComponent.class}) public abstract class SystemUIModule { public abstract class SystemUIModule { @Binds @Binds Loading
packages/SystemUI/src/com/android/systemui/statusbar/SuperStatusBarViewFactory.java +11 −1 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.view.LayoutInflater; import android.view.ViewGroup; import android.view.ViewGroup; import com.android.systemui.R; import com.android.systemui.R; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import com.android.systemui.statusbar.phone.LockIcon; import com.android.systemui.statusbar.phone.LockIcon; import com.android.systemui.statusbar.phone.NotificationPanelView; import com.android.systemui.statusbar.phone.NotificationPanelView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; import com.android.systemui.statusbar.phone.NotificationShadeWindowView; Loading @@ -39,6 +40,7 @@ public class SuperStatusBarViewFactory { private final Context mContext; private final Context mContext; private final InjectionInflationController mInjectionInflationController; private final InjectionInflationController mInjectionInflationController; private final NotificationRowComponent.Builder mNotificationRowComponentBuilder; private NotificationShadeWindowView mNotificationShadeWindowView; private NotificationShadeWindowView mNotificationShadeWindowView; private StatusBarWindowView mStatusBarWindowView; private StatusBarWindowView mStatusBarWindowView; Loading @@ -46,9 +48,11 @@ public class SuperStatusBarViewFactory { @Inject @Inject public SuperStatusBarViewFactory(Context context, public SuperStatusBarViewFactory(Context context, InjectionInflationController injectionInflationController) { InjectionInflationController injectionInflationController, NotificationRowComponent.Builder notificationRowComponentBuilder) { mContext = context; mContext = context; mInjectionInflationController = injectionInflationController; mInjectionInflationController = injectionInflationController; mNotificationRowComponentBuilder = notificationRowComponentBuilder; } } /** /** Loading Loading @@ -114,6 +118,12 @@ public class SuperStatusBarViewFactory { mNotificationShelf = (NotificationShelf) mInjectionInflationController.injectable( mNotificationShelf = (NotificationShelf) mInjectionInflationController.injectable( LayoutInflater.from(mContext)).inflate(R.layout.status_bar_notification_shelf, LayoutInflater.from(mContext)).inflate(R.layout.status_bar_notification_shelf, container, /* attachToRoot= */ false); container, /* attachToRoot= */ false); NotificationRowComponent component = mNotificationRowComponentBuilder .activatableNotificationView(mNotificationShelf) .build(); component.getActivatableNotificationViewController().init(); if (mNotificationShelf == null) { if (mNotificationShelf == null) { throw new IllegalStateException( throw new IllegalStateException( "R.layout.status_bar_notification_shelf could not be properly inflated"); "R.layout.status_bar_notification_shelf could not be properly inflated"); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java +5 −5 Original line number Original line Diff line number Diff line Loading @@ -41,9 +41,6 @@ import com.android.systemui.statusbar.notification.NotificationClicker; import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider; import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.people.NotificationPersonExtractorPluginBoundary; import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifier; import com.android.systemui.statusbar.notification.people.PeopleNotificationIdentifierImpl; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder; import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder; Loading @@ -52,13 +49,13 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.NotificationGroupManager; import com.android.systemui.statusbar.phone.NotificationGroupManager; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.ExtensionControllerImpl; import com.android.systemui.statusbar.policy.HeadsUpManager; import com.android.systemui.statusbar.policy.HeadsUpManager; import java.util.Objects; import java.util.Objects; import javax.inject.Inject; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; import javax.inject.Singleton; /** Handles inflating and updating views for notifications. */ /** Handles inflating and updating views for notifications. */ Loading Loading @@ -88,6 +85,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { private ExpandableNotificationRow.OnAppOpsClickListener mOnAppOpsClickListener; private ExpandableNotificationRow.OnAppOpsClickListener mOnAppOpsClickListener; private BindRowCallback mBindRowCallback; private BindRowCallback mBindRowCallback; private NotificationClicker mNotificationClicker; private NotificationClicker mNotificationClicker; private final Provider<RowInflaterTask> mRowInflaterTaskProvider; private final NotificationLogger mNotificationLogger; private final NotificationLogger mNotificationLogger; @Inject @Inject Loading @@ -102,6 +100,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { NotificationGroupManager notificationGroupManager, NotificationGroupManager notificationGroupManager, NotificationGutsManager notificationGutsManager, NotificationGutsManager notificationGutsManager, NotificationInterruptionStateProvider notificationInterruptionStateProvider, NotificationInterruptionStateProvider notificationInterruptionStateProvider, Provider<RowInflaterTask> rowInflaterTaskProvider, NotificationLogger logger) { NotificationLogger logger) { mContext = context; mContext = context; mRowContentBinder = rowContentBinder; mRowContentBinder = rowContentBinder; Loading @@ -114,6 +113,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { mGroupManager = notificationGroupManager; mGroupManager = notificationGroupManager; mGutsManager = notificationGutsManager; mGutsManager = notificationGutsManager; mNotificationInterruptionStateProvider = notificationInterruptionStateProvider; mNotificationInterruptionStateProvider = notificationInterruptionStateProvider; mRowInflaterTaskProvider = rowInflaterTaskProvider; mNotificationLogger = logger; mNotificationLogger = logger; } } Loading Loading @@ -159,7 +159,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder { entry.getRow().setOnDismissRunnable(onDismissRunnable); entry.getRow().setOnDismissRunnable(onDismissRunnable); } else { } else { entry.createIcons(mContext, sbn); entry.createIcons(mContext, sbn); new RowInflaterTask().inflate(mContext, parent, entry, mRowInflaterTaskProvider.get().inflate(mContext, parent, entry, row -> { row -> { bindRow(entry, pmUser, sbn, row, onDismissRunnable); bindRow(entry, pmUser, sbn, row, onDismissRunnable); updateNotification(entry, pmUser, sbn, row); updateNotification(entry, pmUser, sbn, row); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ActivatableNotificationViewController.java 0 → 100644 +47 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.statusbar.notification.row; import android.view.accessibility.AccessibilityManager; import com.android.systemui.plugins.FalsingManager; import javax.inject.Inject; /** * Controller for {@link ActivatableNotificationView} */ public class ActivatableNotificationViewController { private final ActivatableNotificationView mView; private final AccessibilityManager mAccessibilityManager; private final FalsingManager mFalsingManager; @Inject public ActivatableNotificationViewController(ActivatableNotificationView view, AccessibilityManager accessibilityManager, FalsingManager falsingManager) { mView = view; mAccessibilityManager = accessibilityManager; mFalsingManager = falsingManager; } /** * Initialize the controller, setting up handlers and other behavior. */ public void init() { } }
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/RowInflaterTask.java +17 −0 Original line number Original line Diff line number Diff line Loading @@ -26,6 +26,9 @@ import androidx.asynclayoutinflater.view.AsyncLayoutInflater; import com.android.systemui.R; import com.android.systemui.R; import com.android.systemui.statusbar.InflationTask; import com.android.systemui.statusbar.InflationTask; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent; import javax.inject.Inject; /** /** * An inflater task that asynchronously inflates a ExpandableNotificationRow * An inflater task that asynchronously inflates a ExpandableNotificationRow Loading @@ -34,12 +37,20 @@ public class RowInflaterTask implements InflationTask, AsyncLayoutInflater.OnInf private static final String TAG = "RowInflaterTask"; private static final String TAG = "RowInflaterTask"; private static final boolean TRACE_ORIGIN = true; private static final boolean TRACE_ORIGIN = true; private final NotificationRowComponent.Builder mNotificationRowComponentBuilder; private RowInflationFinishedListener mListener; private RowInflationFinishedListener mListener; private NotificationEntry mEntry; private NotificationEntry mEntry; private boolean mCancelled; private boolean mCancelled; private Throwable mInflateOrigin; private Throwable mInflateOrigin; @Inject public RowInflaterTask( NotificationRowComponent.Builder notificationRowComponentBuilder) { super(); mNotificationRowComponentBuilder = notificationRowComponentBuilder; } /** /** * Inflates a new notificationView. This should not be called twice on this object * Inflates a new notificationView. This should not be called twice on this object */ */ Loading @@ -64,6 +75,12 @@ public class RowInflaterTask implements InflationTask, AsyncLayoutInflater.OnInf public void onInflateFinished(View view, int resid, ViewGroup parent) { public void onInflateFinished(View view, int resid, ViewGroup parent) { if (!mCancelled) { if (!mCancelled) { try { try { // Setup the controller for the view. NotificationRowComponent component = mNotificationRowComponentBuilder .activatableNotificationView((ActivatableNotificationView) view) .build(); component.getActivatableNotificationViewController().init(); mEntry.onInflationTaskFinished(); mEntry.onInflationTaskFinished(); mListener.onInflationFinished((ExpandableNotificationRow) view); mListener.onInflationFinished((ExpandableNotificationRow) view); } catch (Throwable t) { } catch (Throwable t) { Loading