Loading packages/SystemUI/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -757,6 +757,7 @@ android:excludeFromRecents="true" android:showWhenLocked="true" android:showForAllUsers="true" android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden" android:visibleToInstantApps="true"> Loading packages/SystemUI/res/layout/global_actions_grid_v2.xml +0 −6 Original line number Diff line number Diff line Loading @@ -30,12 +30,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content"/> <LinearLayout android:id="@+id/global_actions_controls" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"/> </LinearLayout> </com.android.systemui.globalactions.MinHeightScrollView> </LinearLayout> packages/SystemUI/src/com/android/systemui/controls/controller/ControlsControllerImpl.kt +5 −4 Original line number Diff line number Diff line Loading @@ -44,8 +44,9 @@ import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dump.DumpManager import com.android.systemui.globalactions.GlobalActionsDialog import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.policy.DeviceControlsControllerImpl.Companion.PREFS_CONTROLS_FILE import com.android.systemui.statusbar.policy.DeviceControlsControllerImpl.Companion.PREFS_CONTROLS_SEEDING_COMPLETED import com.android.systemui.util.concurrency.DelayableExecutor import java.io.FileDescriptor import java.io.PrintWriter Loading Loading @@ -198,11 +199,11 @@ class ControlsControllerImpl @Inject constructor ( // When a component is uninstalled, allow seeding to happen again if the user // reinstalls the app val prefs = userStructure.userContext.getSharedPreferences( GlobalActionsDialog.PREFS_CONTROLS_FILE, Context.MODE_PRIVATE) PREFS_CONTROLS_FILE, Context.MODE_PRIVATE) val completedSeedingPackageSet = prefs.getStringSet( GlobalActionsDialog.PREFS_CONTROLS_SEEDING_COMPLETED, mutableSetOf<String>()) PREFS_CONTROLS_SEEDING_COMPLETED, mutableSetOf<String>()) val servicePackageSet = serviceInfoSet.map { it.packageName } prefs.edit().putStringSet(GlobalActionsDialog.PREFS_CONTROLS_SEEDING_COMPLETED, prefs.edit().putStringSet(PREFS_CONTROLS_SEEDING_COMPLETED, completedSeedingPackageSet.intersect(servicePackageSet)).apply() var changed = false Loading packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt +6 −18 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.management import android.app.ActivityOptions import android.content.ComponentName import android.content.Intent import android.os.Bundle Loading @@ -34,7 +35,6 @@ import com.android.systemui.controls.controller.ControlsControllerImpl import com.android.systemui.controls.controller.StructureInfo import com.android.systemui.controls.ui.ControlsActivity import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.globalactions.GlobalActionsComponent import com.android.systemui.settings.CurrentUserTracker import com.android.systemui.util.LifecycleActivity import javax.inject.Inject Loading @@ -45,7 +45,6 @@ import javax.inject.Inject class ControlsEditingActivity @Inject constructor( private val controller: ControlsControllerImpl, private val broadcastDispatcher: BroadcastDispatcher, private val globalActionsComponent: GlobalActionsComponent, private val customIconCache: CustomIconCache, private val uiController: ControlsUiController ) : LifecycleActivity() { Loading @@ -62,7 +61,6 @@ class ControlsEditingActivity @Inject constructor( private lateinit var model: FavoritesModel private lateinit var subtitle: TextView private lateinit var saveButton: View private var backToGlobalActions = true private val currentUserTracker = object : CurrentUserTracker(broadcastDispatcher) { private val startingUser = controller.currentUserId Loading @@ -86,11 +84,6 @@ class ControlsEditingActivity @Inject constructor( structure = it } ?: run(this::finish) backToGlobalActions = intent.getBooleanExtra( ControlsUiController.BACK_TO_GLOBAL_ACTIONS, true ) bindViews() bindButtons() Loading @@ -109,15 +102,6 @@ class ControlsEditingActivity @Inject constructor( } override fun onBackPressed() { if (backToGlobalActions) { globalActionsComponent.handleShowGlobalActionsMenu() } else { val i = Intent().apply { component = ComponentName(applicationContext, ControlsActivity::class.java) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK) } startActivity(i) } animateExitAndFinish() } Loading Loading @@ -161,8 +145,12 @@ class ControlsEditingActivity @Inject constructor( setText(R.string.save) setOnClickListener { saveFavorites() startActivity( Intent(applicationContext, ControlsActivity::class.java), ActivityOptions .makeSceneTransitionAnimation(this@ControlsEditingActivity).toBundle() ) animateExitAndFinish() globalActionsComponent.handleShowGlobalActionsMenu() } } } Loading packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt +9 −26 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import com.android.systemui.controls.controller.StructureInfo import com.android.systemui.controls.ui.ControlsActivity import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.globalactions.GlobalActionsComponent import com.android.systemui.settings.CurrentUserTracker import com.android.systemui.util.LifecycleActivity import java.text.Collator Loading @@ -56,7 +55,6 @@ class ControlsFavoritingActivity @Inject constructor( private val controller: ControlsControllerImpl, private val listingController: ControlsListingController, private val broadcastDispatcher: BroadcastDispatcher, private val globalActionsComponent: GlobalActionsComponent, private val uiController: ControlsUiController ) : LifecycleActivity() { Loading Loading @@ -92,7 +90,6 @@ class ControlsFavoritingActivity @Inject constructor( private lateinit var comparator: Comparator<StructureContainer> private var cancelLoadRunnable: Runnable? = null private var isPagerLoaded = false private var backToGlobalActions = true private val currentUserTracker = object : CurrentUserTracker(broadcastDispatcher) { private val startingUser = controller.currentUserId Loading Loading @@ -133,11 +130,6 @@ class ControlsFavoritingActivity @Inject constructor( component = intent.getParcelableExtra<ComponentName>(Intent.EXTRA_COMPONENT_NAME) fromProviderSelector = intent.getBooleanExtra(EXTRA_FROM_PROVIDER_SELECTOR, false) backToGlobalActions = intent.getBooleanExtra( ControlsUiController.BACK_TO_GLOBAL_ACTIONS, true ) bindViews() } Loading Loading @@ -311,13 +303,6 @@ class ControlsFavoritingActivity @Inject constructor( private fun bindButtons() { otherAppsButton = requireViewById<Button>(R.id.other_apps).apply { setOnClickListener { val i = Intent().apply { component = ComponentName(context, ControlsProviderSelectorActivity::class.java) putExtra( ControlsUiController.BACK_TO_GLOBAL_ACTIONS, backToGlobalActions ) } if (doneButton.isEnabled) { // The user has made changes Toast.makeText( Loading @@ -326,8 +311,11 @@ class ControlsFavoritingActivity @Inject constructor( Toast.LENGTH_SHORT ).show() } startActivity(i, ActivityOptions .makeSceneTransitionAnimation(this@ControlsFavoritingActivity).toBundle()) startActivity( Intent(context, ControlsProviderSelectorActivity::class.java), ActivityOptions .makeSceneTransitionAnimation(this@ControlsFavoritingActivity).toBundle() ) animateExitAndFinish() } } Loading @@ -349,15 +337,10 @@ class ControlsFavoritingActivity @Inject constructor( } private fun openControlsOrigin() { if (backToGlobalActions) { globalActionsComponent.handleShowGlobalActionsMenu() } else { val i = Intent().apply { component = ComponentName(applicationContext, ControlsActivity::class.java) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK) } startActivity(i) } startActivity( Intent(applicationContext, ControlsActivity::class.java), ActivityOptions.makeSceneTransitionAnimation(this).toBundle() ) } override fun onPause() { Loading Loading
packages/SystemUI/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -757,6 +757,7 @@ android:excludeFromRecents="true" android:showWhenLocked="true" android:showForAllUsers="true" android:finishOnTaskLaunch="true" android:launchMode="singleInstance" android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation|keyboard|keyboardHidden" android:visibleToInstantApps="true"> Loading
packages/SystemUI/res/layout/global_actions_grid_v2.xml +0 −6 Original line number Diff line number Diff line Loading @@ -30,12 +30,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content"/> <LinearLayout android:id="@+id/global_actions_controls" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"/> </LinearLayout> </com.android.systemui.globalactions.MinHeightScrollView> </LinearLayout>
packages/SystemUI/src/com/android/systemui/controls/controller/ControlsControllerImpl.kt +5 −4 Original line number Diff line number Diff line Loading @@ -44,8 +44,9 @@ import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dump.DumpManager import com.android.systemui.globalactions.GlobalActionsDialog import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.policy.DeviceControlsControllerImpl.Companion.PREFS_CONTROLS_FILE import com.android.systemui.statusbar.policy.DeviceControlsControllerImpl.Companion.PREFS_CONTROLS_SEEDING_COMPLETED import com.android.systemui.util.concurrency.DelayableExecutor import java.io.FileDescriptor import java.io.PrintWriter Loading Loading @@ -198,11 +199,11 @@ class ControlsControllerImpl @Inject constructor ( // When a component is uninstalled, allow seeding to happen again if the user // reinstalls the app val prefs = userStructure.userContext.getSharedPreferences( GlobalActionsDialog.PREFS_CONTROLS_FILE, Context.MODE_PRIVATE) PREFS_CONTROLS_FILE, Context.MODE_PRIVATE) val completedSeedingPackageSet = prefs.getStringSet( GlobalActionsDialog.PREFS_CONTROLS_SEEDING_COMPLETED, mutableSetOf<String>()) PREFS_CONTROLS_SEEDING_COMPLETED, mutableSetOf<String>()) val servicePackageSet = serviceInfoSet.map { it.packageName } prefs.edit().putStringSet(GlobalActionsDialog.PREFS_CONTROLS_SEEDING_COMPLETED, prefs.edit().putStringSet(PREFS_CONTROLS_SEEDING_COMPLETED, completedSeedingPackageSet.intersect(servicePackageSet)).apply() var changed = false Loading
packages/SystemUI/src/com/android/systemui/controls/management/ControlsEditingActivity.kt +6 −18 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.controls.management import android.app.ActivityOptions import android.content.ComponentName import android.content.Intent import android.os.Bundle Loading @@ -34,7 +35,6 @@ import com.android.systemui.controls.controller.ControlsControllerImpl import com.android.systemui.controls.controller.StructureInfo import com.android.systemui.controls.ui.ControlsActivity import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.globalactions.GlobalActionsComponent import com.android.systemui.settings.CurrentUserTracker import com.android.systemui.util.LifecycleActivity import javax.inject.Inject Loading @@ -45,7 +45,6 @@ import javax.inject.Inject class ControlsEditingActivity @Inject constructor( private val controller: ControlsControllerImpl, private val broadcastDispatcher: BroadcastDispatcher, private val globalActionsComponent: GlobalActionsComponent, private val customIconCache: CustomIconCache, private val uiController: ControlsUiController ) : LifecycleActivity() { Loading @@ -62,7 +61,6 @@ class ControlsEditingActivity @Inject constructor( private lateinit var model: FavoritesModel private lateinit var subtitle: TextView private lateinit var saveButton: View private var backToGlobalActions = true private val currentUserTracker = object : CurrentUserTracker(broadcastDispatcher) { private val startingUser = controller.currentUserId Loading @@ -86,11 +84,6 @@ class ControlsEditingActivity @Inject constructor( structure = it } ?: run(this::finish) backToGlobalActions = intent.getBooleanExtra( ControlsUiController.BACK_TO_GLOBAL_ACTIONS, true ) bindViews() bindButtons() Loading @@ -109,15 +102,6 @@ class ControlsEditingActivity @Inject constructor( } override fun onBackPressed() { if (backToGlobalActions) { globalActionsComponent.handleShowGlobalActionsMenu() } else { val i = Intent().apply { component = ComponentName(applicationContext, ControlsActivity::class.java) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK) } startActivity(i) } animateExitAndFinish() } Loading Loading @@ -161,8 +145,12 @@ class ControlsEditingActivity @Inject constructor( setText(R.string.save) setOnClickListener { saveFavorites() startActivity( Intent(applicationContext, ControlsActivity::class.java), ActivityOptions .makeSceneTransitionAnimation(this@ControlsEditingActivity).toBundle() ) animateExitAndFinish() globalActionsComponent.handleShowGlobalActionsMenu() } } } Loading
packages/SystemUI/src/com/android/systemui/controls/management/ControlsFavoritingActivity.kt +9 −26 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ import com.android.systemui.controls.controller.StructureInfo import com.android.systemui.controls.ui.ControlsActivity import com.android.systemui.controls.ui.ControlsUiController import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.globalactions.GlobalActionsComponent import com.android.systemui.settings.CurrentUserTracker import com.android.systemui.util.LifecycleActivity import java.text.Collator Loading @@ -56,7 +55,6 @@ class ControlsFavoritingActivity @Inject constructor( private val controller: ControlsControllerImpl, private val listingController: ControlsListingController, private val broadcastDispatcher: BroadcastDispatcher, private val globalActionsComponent: GlobalActionsComponent, private val uiController: ControlsUiController ) : LifecycleActivity() { Loading Loading @@ -92,7 +90,6 @@ class ControlsFavoritingActivity @Inject constructor( private lateinit var comparator: Comparator<StructureContainer> private var cancelLoadRunnable: Runnable? = null private var isPagerLoaded = false private var backToGlobalActions = true private val currentUserTracker = object : CurrentUserTracker(broadcastDispatcher) { private val startingUser = controller.currentUserId Loading Loading @@ -133,11 +130,6 @@ class ControlsFavoritingActivity @Inject constructor( component = intent.getParcelableExtra<ComponentName>(Intent.EXTRA_COMPONENT_NAME) fromProviderSelector = intent.getBooleanExtra(EXTRA_FROM_PROVIDER_SELECTOR, false) backToGlobalActions = intent.getBooleanExtra( ControlsUiController.BACK_TO_GLOBAL_ACTIONS, true ) bindViews() } Loading Loading @@ -311,13 +303,6 @@ class ControlsFavoritingActivity @Inject constructor( private fun bindButtons() { otherAppsButton = requireViewById<Button>(R.id.other_apps).apply { setOnClickListener { val i = Intent().apply { component = ComponentName(context, ControlsProviderSelectorActivity::class.java) putExtra( ControlsUiController.BACK_TO_GLOBAL_ACTIONS, backToGlobalActions ) } if (doneButton.isEnabled) { // The user has made changes Toast.makeText( Loading @@ -326,8 +311,11 @@ class ControlsFavoritingActivity @Inject constructor( Toast.LENGTH_SHORT ).show() } startActivity(i, ActivityOptions .makeSceneTransitionAnimation(this@ControlsFavoritingActivity).toBundle()) startActivity( Intent(context, ControlsProviderSelectorActivity::class.java), ActivityOptions .makeSceneTransitionAnimation(this@ControlsFavoritingActivity).toBundle() ) animateExitAndFinish() } } Loading @@ -349,15 +337,10 @@ class ControlsFavoritingActivity @Inject constructor( } private fun openControlsOrigin() { if (backToGlobalActions) { globalActionsComponent.handleShowGlobalActionsMenu() } else { val i = Intent().apply { component = ComponentName(applicationContext, ControlsActivity::class.java) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK) } startActivity(i) } startActivity( Intent(applicationContext, ControlsActivity::class.java), ActivityOptions.makeSceneTransitionAnimation(this).toBundle() ) } override fun onPause() { Loading