Add userId param to NativeDevice File/Dir methods.

pullDir, pushDir, pushFile, and DeleteFile methods can now take an
additional userId parameter. No changes to pullFile and doesFileExist
method which already take userId param.  getContentProviderHandler is
also updated to take userId param which is passed to construct
ContentProvider Handler.
These new methods will be used to run test as non-current user to
support `--user-type secondary_user_on_secondary_display`.
We keep the old methods that do not take userId param for backward
compatibility. For them, the current user id is used by default.

Bug: 336880935

Test: atest android.media.player.cts.MediaPlayerSurfaceTest
Test: atest --user-type secondary_user \
    android.media.player.cts.MediaPlayerSurfaceTest
Test: m -j tradefed-all
Test: tools/tradefederation/core/javatests/run_tradefed_tests.sh \
    --class com.android.tradefed.device.TestDeviceTest
Test: tools/tradefederation/core/javatests/run_tradefed_tests.sh \
    --class com.android.tradefed.device.NativeDeviceTest

Change-Id: I0cf673ddae5f46b658d27e2494355b5ed80da7d9
1 file changed