Add activity interface to Recents Go view

Add an interface for recents to activity logic that can be set on the Go
recents view. This CL includes a method for the logic that should occur
when leaving recents due to having no tasks remaining.

As the view has no knowledge of the containing activity (could be
Launcher or could be a separate activity), this interface must be set
externally.

Bug: 114136250
Test: Remove all tasks, see that it goes to home when l3goIconRecents is
the default launcher
Change-Id: I110abab49c22e245b98a1f9b91b0b0f052886098
This commit is contained in:
Kevin committed 2019-03-15 15:09:38 -07:00
1 parent aaffa2385f
commit 5163b58d52
6 files changed
+118 -1

No files matched your search

@@ -0,0 +1,29 @@
/*
* Copyright (C) 2019 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.quickstep;
/**
* Generic interface providing methods to the recents implementation that allow it to callback to
* the containing activity.
*/
public interface RecentsToActivityHelper {
/**
* The default action to take when leaving/closing recents. In general, this should be used to
* go to the appropriate home state.
*/
void leaveRecents();
}