Merge changes from topic "sysuig-shutdown-ui" into udc-d1-dev
* changes: SysUIG override for ShutdownUI. Id for text2 is defined in ids.xml already.
This commit is contained in:
committed by
Android (Google) Code Review
commit
4d6b1fa4dc
@@ -40,7 +40,7 @@
|
||||
android:fontFamily="@string/config_headlineFontFamily"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text2"
|
||||
android:id="@id/text2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32sp"
|
||||
android:text="@string/shutdown_progress"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.systemui.dagger;
|
||||
|
||||
import com.android.systemui.globalactions.ShutdownUiModule;
|
||||
import com.android.systemui.keyguard.CustomizationProvider;
|
||||
import com.android.systemui.statusbar.NotificationInsetsModule;
|
||||
import com.android.systemui.statusbar.QsFrameTranslateModule;
|
||||
@@ -31,6 +32,7 @@ import dagger.Subcomponent;
|
||||
DependencyProvider.class,
|
||||
NotificationInsetsModule.class,
|
||||
QsFrameTranslateModule.class,
|
||||
ShutdownUiModule.class,
|
||||
SystemUIBinder.class,
|
||||
SystemUIModule.class,
|
||||
SystemUICoreStartableModule.class,
|
||||
|
||||
@@ -52,7 +52,6 @@ import com.android.systemui.dreams.dagger.DreamModule;
|
||||
import com.android.systemui.dump.DumpManager;
|
||||
import com.android.systemui.flags.FeatureFlags;
|
||||
import com.android.systemui.flags.FlagsModule;
|
||||
import com.android.systemui.globalactions.ShutdownUiModule;
|
||||
import com.android.systemui.keyboard.KeyboardModule;
|
||||
import com.android.systemui.keyguard.data.BouncerViewModule;
|
||||
import com.android.systemui.log.dagger.LogModule;
|
||||
@@ -193,7 +192,6 @@ import javax.inject.Named;
|
||||
ScreenRecordModule.class,
|
||||
SettingsUtilModule.class,
|
||||
ShadeModule.class,
|
||||
ShutdownUiModule.class,
|
||||
SmartRepliesInflationModule.class,
|
||||
SmartspaceModule.class,
|
||||
StatusBarPipelineModule.class,
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ShutdownUi {
|
||||
window.setBackgroundDrawable(background);
|
||||
window.setWindowAnimations(com.android.systemui.R.style.Animation_ShutdownUi);
|
||||
|
||||
d.setContentView(R.layout.shutdown_dialog);
|
||||
d.setContentView(getShutdownDialogContent());
|
||||
d.setCancelable(false);
|
||||
|
||||
int color;
|
||||
@@ -129,6 +129,10 @@ public class ShutdownUi {
|
||||
d.show();
|
||||
}
|
||||
|
||||
public int getShutdownDialogContent() {
|
||||
return R.layout.shutdown_dialog;
|
||||
}
|
||||
|
||||
@StringRes
|
||||
@VisibleForTesting int getRebootMessage(boolean isReboot, @Nullable String reason) {
|
||||
if (reason != null && reason.startsWith(PowerManager.REBOOT_RECOVERY_UPDATE)) {
|
||||
|
||||
@@ -20,15 +20,14 @@ import com.android.systemui.dagger.DefaultComponentBinder;
|
||||
import com.android.systemui.dagger.DependencyProvider;
|
||||
import com.android.systemui.dagger.SysUIComponent;
|
||||
import com.android.systemui.dagger.SysUISingleton;
|
||||
import com.android.systemui.dagger.SystemUIBinder;
|
||||
import com.android.systemui.dagger.SystemUIModule;
|
||||
import com.android.systemui.globalactions.ShutdownUiModule;
|
||||
import com.android.systemui.keyguard.dagger.KeyguardModule;
|
||||
import com.android.systemui.recents.RecentsModule;
|
||||
import com.android.systemui.statusbar.dagger.CentralSurfacesDependenciesModule;
|
||||
import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
|
||||
import com.android.systemui.statusbar.notification.row.NotificationRowModule;
|
||||
|
||||
import com.android.systemui.keyguard.dagger.KeyguardModule;
|
||||
import com.android.systemui.recents.RecentsModule;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
/**
|
||||
@@ -43,6 +42,7 @@ import dagger.Subcomponent;
|
||||
NotificationRowModule.class,
|
||||
NotificationsModule.class,
|
||||
RecentsModule.class,
|
||||
ShutdownUiModule.class,
|
||||
SystemUIModule.class,
|
||||
TvSystemUIBinder.class,
|
||||
TVSystemUICoreStartableModule.class,
|
||||
|
||||
@@ -33,9 +33,7 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
|
||||
/**
|
||||
* Tests for {@link ListGridLayout}.
|
||||
*/
|
||||
|
||||
@SmallTest
|
||||
@RunWith(AndroidTestingRunner.class)
|
||||
public class ShutdownUiTest extends SysuiTestCase {
|
||||
|
||||
Reference in New Issue
Block a user