diff options
author | Eric Erfanian <erfanian@google.com> | 2017-06-19 17:28:33 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-06-19 17:28:33 -0700 |
commit | 2d6bc36921c4a41b17bc1870c133ee42f1388b51 (patch) | |
tree | ccf7310c8466dbc94a5646969613db81833c1ddd /java/com/android/dialer/simulator/impl | |
parent | ecc0957193e971e8f94f39efdbb37b0e4ed4f988 (diff) |
Add "Simulator" for Enriched Calling
An annoying part of development on enriched calling is that it was
difficult to determine what sessions were in memory. We have a
number of bugs related to incorrect sessions being shown, and knowing
exactly what sessions are available in memory can help debug them.
This CL adds a "Simulator" for enriched calling. This is more of a debug
tool than a simulator since it doesn't yet support adding a new enriched
calling session.
To allow the simulator to view all of the sessions in memory, a new
EnrichedCallManager API was introduced: getAllSessionsView. This API was
designed in a way to prevent abuse, so it returns a list of string
representations of the sessions. Just returning the full list of
sessions would have allowed clients to bypass the getSession logic and
examine sessions that shouldn't be available.
Also in this change:
* Integrate changes to form a base for future copybara imports.
Test: TH
PiperOrigin-RevId: 159445010
Change-Id: Ie8fc35d817a4e3b0eac37e0c34a6592060c43b23
Diffstat (limited to 'java/com/android/dialer/simulator/impl')
-rw-r--r-- | java/com/android/dialer/simulator/impl/SimulatorActionProvider.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java index 8257d9853..f2749b2c5 100644 --- a/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java +++ b/java/com/android/dialer/simulator/impl/SimulatorActionProvider.java @@ -30,6 +30,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutor.Worker; import com.android.dialer.common.concurrent.DialerExecutors; +import com.android.dialer.enrichedcall.simulator.EnrichedCallSimulatorActivity; import com.android.dialer.persistentlog.PersistentLogger; /** Implements the simulator submenu. */ @@ -114,6 +115,13 @@ final class SimulatorActionProvider extends ActionProvider { .executeSerial(null); return true; }); + subMenu + .add("Enriched call simulator") + .setOnMenuItemClickListener( + (item) -> { + context.startActivity(EnrichedCallSimulatorActivity.newIntent(context)); + return true; + }); } private void populateDatabase() { |