diff options
Diffstat (limited to 'cmds')
23 files changed, 299 insertions, 257 deletions
diff --git a/cmds/app_process/Android.bp b/cmds/app_process/Android.bp index 8be95e4659b4..07221f97c72b 100644 --- a/cmds/app_process/Android.bp +++ b/cmds/app_process/Android.bp @@ -5,11 +5,13 @@ cc_binary { multilib: { lib32: { - version_script: ":art_sigchain_version_script32.txt", + // TODO(b/142944043): Remove version script when libsigchain is a DSO. + version_script: "version-script32.txt", suffix: "32", }, lib64: { - version_script: ":art_sigchain_version_script64.txt", + // TODO(b/142944043): Remove version script when libsigchain is a DSO. + version_script: "version-script64.txt", suffix: "64", }, }, diff --git a/cmds/app_process/version-script32.txt b/cmds/app_process/version-script32.txt new file mode 100644 index 000000000000..70810e0b7173 --- /dev/null +++ b/cmds/app_process/version-script32.txt @@ -0,0 +1,15 @@ +{ +global: + EnsureFrontOfChain; + AddSpecialSignalHandlerFn; + RemoveSpecialSignalHandlerFn; + SkipAddSignalHandler; + bsd_signal; + sigaction; + sigaction64; + signal; + sigprocmask; + sigprocmask64; +local: + *; +}; diff --git a/cmds/app_process/version-script64.txt b/cmds/app_process/version-script64.txt new file mode 100644 index 000000000000..7bcd76b50f87 --- /dev/null +++ b/cmds/app_process/version-script64.txt @@ -0,0 +1,14 @@ +{ +global: + EnsureFrontOfChain; + AddSpecialSignalHandlerFn; + RemoveSpecialSignalHandlerFn; + SkipAddSignalHandler; + sigaction; + sigaction64; + signal; + sigprocmask; + sigprocmask64; +local: + *; +}; diff --git a/cmds/bootanimation/Android.bp b/cmds/bootanimation/Android.bp index befb67bcf26a..757c2b2a4cfa 100644 --- a/cmds/bootanimation/Android.bp +++ b/cmds/bootanimation/Android.bp @@ -28,6 +28,8 @@ cc_binary { name: "bootanimation", defaults: ["bootanimation_defaults"], + header_libs: ["jni_headers"], + shared_libs: [ "libOpenSLES", "libbootanimation", diff --git a/cmds/device_config/Android.bp b/cmds/device_config/Android.bp new file mode 100644 index 000000000000..67e014a20506 --- /dev/null +++ b/cmds/device_config/Android.bp @@ -0,0 +1,7 @@ +// Copyright 2018 The Android Open Source Project +// + +sh_binary { + name: "device_config", + src: "device_config", +} diff --git a/cmds/device_config/Android.mk b/cmds/device_config/Android.mk deleted file mode 100644 index 4041e01927df..000000000000 --- a/cmds/device_config/Android.mk +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2018 The Android Open Source Project -# -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_MODULE := device_config -LOCAL_SRC_FILES := device_config -LOCAL_MODULE_CLASS := EXECUTABLES -LOCAL_MODULE_TAGS := optional -include $(BUILD_PREBUILT) diff --git a/cmds/idmap2/idmap2d/Idmap2Service.cpp b/cmds/idmap2/idmap2d/Idmap2Service.cpp index f95b73f17222..15e22a3410cf 100644 --- a/cmds/idmap2/idmap2d/Idmap2Service.cpp +++ b/cmds/idmap2/idmap2d/Idmap2Service.cpp @@ -166,10 +166,10 @@ Status Idmap2Service::verifyIdmap(const std::string& target_apk_path, Status Idmap2Service::createIdmap(const std::string& target_apk_path, const std::string& overlay_apk_path, int32_t fulfilled_policies, bool enforce_overlayable, int32_t user_id ATTRIBUTE_UNUSED, - aidl::nullable<std::string>* _aidl_return) { + std::optional<std::string>* _aidl_return) { assert(_aidl_return); SYSTRACE << "Idmap2Service::createIdmap " << target_apk_path << " " << overlay_apk_path; - _aidl_return->reset(nullptr); + _aidl_return->reset(); const PolicyBitmask policy_bitmask = ConvertAidlArgToPolicyBitmask(fulfilled_policies); @@ -214,7 +214,7 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path, return error("failed to write to idmap path " + idmap_path); } - *_aidl_return = aidl::make_nullable<std::string>(idmap_path); + *_aidl_return = idmap_path; return ok(); } diff --git a/cmds/idmap2/idmap2d/Idmap2Service.h b/cmds/idmap2/idmap2d/Idmap2Service.h index 55fb5ad07781..abee999dd2b2 100644 --- a/cmds/idmap2/idmap2d/Idmap2Service.h +++ b/cmds/idmap2/idmap2d/Idmap2Service.h @@ -19,7 +19,6 @@ #include <android-base/unique_fd.h> #include <binder/BinderService.h> -#include <binder/Nullable.h> #include "android/os/BnIdmap2.h" @@ -45,7 +44,7 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 { binder::Status createIdmap(const std::string& target_apk_path, const std::string& overlay_apk_path, int32_t fulfilled_policies, bool enforce_overlayable, int32_t user_id, - aidl::nullable<std::string>* _aidl_return) override; + std::optional<std::string>* _aidl_return) override; private: // Cache the crc of the android framework package since the crc cannot change without a reboot. diff --git a/cmds/incidentd/src/Section.cpp b/cmds/incidentd/src/Section.cpp index 33e764988b75..e56ed39ea32e 100644 --- a/cmds/incidentd/src/Section.cpp +++ b/cmds/incidentd/src/Section.cpp @@ -33,7 +33,6 @@ #include <debuggerd/client.h> #include <dumputils/dump_utils.h> #include <log/log_event_list.h> -#include <log/log_read.h> #include <log/logprint.h> #include <private/android_logger.h> #include <sys/mman.h> diff --git a/cmds/incidentd/src/Section.h b/cmds/incidentd/src/Section.h index bc4909dcfa2e..698cc04c160e 100644 --- a/cmds/incidentd/src/Section.h +++ b/cmds/incidentd/src/Section.h @@ -24,7 +24,7 @@ #include <map> #include <android/os/IIncidentDumpCallback.h> - +#include <log/log_read.h> #include <utils/String16.h> #include <utils/String8.h> #include <utils/Vector.h> @@ -164,8 +164,8 @@ class LogSection : public WorkerThreadSection { // global last log retrieved timestamp for each log_id_t. static map<log_id_t, log_time> gLastLogsRetrieved; - // log mode: read only & non blocking. - const static int logModeBase = ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK; + // log mode: non blocking. + const static int logModeBase = ANDROID_LOG_NONBLOCK; public: LogSection(int id, const char* logID, ...); diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp index 6f952f637506..322648229d0e 100644 --- a/cmds/statsd/src/StatsService.cpp +++ b/cmds/statsd/src/StatsService.cpp @@ -1093,36 +1093,26 @@ void StatsService::OnLogEvent(LogEvent* event) { } } -Status StatsService::getData(int64_t key, const int32_t callingUid, vector<int8_t>* output) { +Status StatsService::getData(int64_t key, const int32_t callingUid, vector<uint8_t>* output) { ENFORCE_UID(AID_SYSTEM); VLOG("StatsService::getData with Uid %i", callingUid); ConfigKey configKey(callingUid, key); - // TODO(b/149254662): Since libbinder_ndk uses int8_t instead of uint8_t, - // there are inconsistencies with internal statsd logic. Instead of - // modifying lots of files, we create a temporary output array of int8_t and - // copy its data into output. This is a bad hack, but hopefully - // libbinder_ndk will transition to using uint8_t soon: progress is tracked - // in b/144957764. Same applies to StatsService::getMetadata. - vector<uint8_t> unsignedOutput; // The dump latency does not matter here since we do not include the current bucket, we do not // need to pull any new data anyhow. mProcessor->onDumpReport(configKey, getElapsedRealtimeNs(), false /* include_current_bucket*/, - true /* erase_data */, GET_DATA_CALLED, FAST, &unsignedOutput); - *output = vector<int8_t>(unsignedOutput.begin(), unsignedOutput.end()); + true /* erase_data */, GET_DATA_CALLED, FAST, output); return Status::ok(); } -Status StatsService::getMetadata(vector<int8_t>* output) { +Status StatsService::getMetadata(vector<uint8_t>* output) { ENFORCE_UID(AID_SYSTEM); - vector<uint8_t> unsignedOutput; - StatsdStats::getInstance().dumpStats(&unsignedOutput, false); // Don't reset the counters. - *output = vector<int8_t>(unsignedOutput.begin(), unsignedOutput.end()); + StatsdStats::getInstance().dumpStats(output, false); // Don't reset the counters. return Status::ok(); } -Status StatsService::addConfiguration(int64_t key, const vector <int8_t>& config, +Status StatsService::addConfiguration(int64_t key, const vector <uint8_t>& config, const int32_t callingUid) { ENFORCE_UID(AID_SYSTEM); @@ -1133,7 +1123,7 @@ Status StatsService::addConfiguration(int64_t key, const vector <int8_t>& config } } -bool StatsService::addConfigurationChecked(int uid, int64_t key, const vector<int8_t>& config) { +bool StatsService::addConfigurationChecked(int uid, int64_t key, const vector<uint8_t>& config) { ConfigKey configKey(uid, key); StatsdConfig cfg; if (config.size() > 0) { // If the config is empty, skip parsing. diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h index b49fa1d42e66..324ffbd65e51 100644 --- a/cmds/statsd/src/StatsService.h +++ b/cmds/statsd/src/StatsService.h @@ -96,13 +96,13 @@ public: */ virtual Status getData(int64_t key, const int32_t callingUid, - vector<int8_t>* output) override; + vector<uint8_t>* output) override; /** * Binder call for clients to get metadata across all configs in statsd. */ - virtual Status getMetadata(vector<int8_t>* output) override; + virtual Status getMetadata(vector<uint8_t>* output) override; /** @@ -110,7 +110,7 @@ public: * should requestData for this configuration. */ virtual Status addConfiguration(int64_t key, - const vector<int8_t>& config, + const vector<uint8_t>& config, const int32_t callingUid) override; /** @@ -320,7 +320,7 @@ private: /** * Adds a configuration after checking permissions and obtaining UID from binder call. */ - bool addConfigurationChecked(int uid, int64_t key, const vector<int8_t>& config); + bool addConfigurationChecked(int uid, int64_t key, const vector<uint8_t>& config); /** * Update a configuration. diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index 7d0d97917a4b..d0d3d285ada2 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -66,7 +66,7 @@ import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_e import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; /** - * The master atom class. This message defines all of the available + * The primary atom class. This message defines all of the available * raw stats log events from the Android system, also known as "atoms." * * This field contains a single oneof with all of the available messages. diff --git a/cmds/statsd/src/config/ConfigManager.cpp b/cmds/statsd/src/config/ConfigManager.cpp index bbae3fef7934..13020e06dc5d 100644 --- a/cmds/statsd/src/config/ConfigManager.cpp +++ b/cmds/statsd/src/config/ConfigManager.cpp @@ -128,7 +128,7 @@ void ConfigManager::Startup() { } void ConfigManager::StartupForTest() { - // Dummy function to avoid reading configs from disks for tests. + // No-op function to avoid reading configs from disks for tests. } void ConfigManager::AddListener(const sp<ConfigListener>& listener) { diff --git a/cmds/statsd/src/config/ConfigManager.h b/cmds/statsd/src/config/ConfigManager.h index 40146b1b2bec..bef057f96409 100644 --- a/cmds/statsd/src/config/ConfigManager.h +++ b/cmds/statsd/src/config/ConfigManager.h @@ -46,7 +46,7 @@ public: void Startup(); /* - * Dummy initializer for tests. + * No-op initializer for tests. */ void StartupForTest(); diff --git a/cmds/statsd/tests/LogEntryMatcher_test.cpp b/cmds/statsd/tests/LogEntryMatcher_test.cpp index 26423d464027..6264c075426a 100644 --- a/cmds/statsd/tests/LogEntryMatcher_test.cpp +++ b/cmds/statsd/tests/LogEntryMatcher_test.cpp @@ -13,9 +13,6 @@ // limitations under the License. #include <gtest/gtest.h> -#include <log/log_event_list.h> -#include <log/log_read.h> -#include <log/logprint.h> #include <stdio.h> #include "annotations.h" diff --git a/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp b/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp index 783f31c7bde8..c03b9254f70d 100644 --- a/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp +++ b/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp @@ -39,7 +39,7 @@ const int kCallingUid = 0; // Randomly chosen void SendConfig(shared_ptr<StatsService>& service, const StatsdConfig& config) { string str; config.SerializeToString(&str); - std::vector<int8_t> configAsVec(str.begin(), str.end()); + std::vector<uint8_t> configAsVec(str.begin(), str.end()); service->addConfiguration(kConfigKey, configAsVec, kCallingUid); } diff --git a/cmds/telecom/src/com/android/commands/telecom/Telecom.java b/cmds/telecom/src/com/android/commands/telecom/Telecom.java index fed9c43faa38..5f13a5ce3aae 100644 --- a/cmds/telecom/src/com/android/commands/telecom/Telecom.java +++ b/cmds/telecom/src/com/android/commands/telecom/Telecom.java @@ -69,6 +69,7 @@ public final class Telecom extends BaseCommand { private static final String COMMAND_SET_DEFAULT_DIALER = "set-default-dialer"; private static final String COMMAND_GET_DEFAULT_DIALER = "get-default-dialer"; private static final String COMMAND_STOP_BLOCK_SUPPRESSION = "stop-block-suppression"; + private static final String COMMAND_CLEANUP_STUCK_CALLS = "cleanup-stuck-calls"; /** * Change the system dialer package name if a package name was specified, @@ -119,6 +120,8 @@ public final class Telecom extends BaseCommand { + "usage: telecom get-max-phones\n" + "usage: telecom stop-block-suppression: Stop suppressing the blocked number" + " provider after a call to emergency services.\n" + + "usage: telecom cleanup-stuck-calls: Clear any disconnected calls that have" + + " gotten wedged in Telecom.\n" + "usage: telecom set-emer-phone-account-filter <PACKAGE>\n" + "\n" + "telecom set-phone-account-enabled: Enables the given phone account, if it has" @@ -214,6 +217,9 @@ public final class Telecom extends BaseCommand { case COMMAND_STOP_BLOCK_SUPPRESSION: runStopBlockSuppression(); break; + case COMMAND_CLEANUP_STUCK_CALLS: + runCleanupStuckCalls(); + break; case COMMAND_SET_DEFAULT_DIALER: runSetDefaultDialer(); break; @@ -335,6 +341,10 @@ public final class Telecom extends BaseCommand { mTelecomService.stopBlockSuppression(); } + private void runCleanupStuckCalls() throws RemoteException { + mTelecomService.cleanupStuckCalls(); + } + private void runSetDefaultDialer() throws RemoteException { String packageName = nextArg(); if ("default".equals(packageName)) packageName = null; diff --git a/cmds/uiautomator/api/current.txt b/cmds/uiautomator/api/current.txt index 489c2eadfd91..bf87d091934e 100644 --- a/cmds/uiautomator/api/current.txt +++ b/cmds/uiautomator/api/current.txt @@ -1,221 +1,222 @@ +// Signature format: 2.0 package com.android.uiautomator.core { - public final deprecated class Configurator { - method public long getActionAcknowledgmentTimeout(); - method public static com.android.uiautomator.core.Configurator getInstance(); - method public long getKeyInjectionDelay(); - method public long getScrollAcknowledgmentTimeout(); - method public long getWaitForIdleTimeout(); - method public long getWaitForSelectorTimeout(); - method public com.android.uiautomator.core.Configurator setActionAcknowledgmentTimeout(long); - method public com.android.uiautomator.core.Configurator setKeyInjectionDelay(long); - method public com.android.uiautomator.core.Configurator setScrollAcknowledgmentTimeout(long); - method public com.android.uiautomator.core.Configurator setWaitForIdleTimeout(long); - method public com.android.uiautomator.core.Configurator setWaitForSelectorTimeout(long); + @Deprecated public final class Configurator { + method @Deprecated public long getActionAcknowledgmentTimeout(); + method @Deprecated public static com.android.uiautomator.core.Configurator getInstance(); + method @Deprecated public long getKeyInjectionDelay(); + method @Deprecated public long getScrollAcknowledgmentTimeout(); + method @Deprecated public long getWaitForIdleTimeout(); + method @Deprecated public long getWaitForSelectorTimeout(); + method @Deprecated public com.android.uiautomator.core.Configurator setActionAcknowledgmentTimeout(long); + method @Deprecated public com.android.uiautomator.core.Configurator setKeyInjectionDelay(long); + method @Deprecated public com.android.uiautomator.core.Configurator setScrollAcknowledgmentTimeout(long); + method @Deprecated public com.android.uiautomator.core.Configurator setWaitForIdleTimeout(long); + method @Deprecated public com.android.uiautomator.core.Configurator setWaitForSelectorTimeout(long); } - public deprecated class UiCollection extends com.android.uiautomator.core.UiObject { - ctor public UiCollection(com.android.uiautomator.core.UiSelector); - method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiObject getChildByInstance(com.android.uiautomator.core.UiSelector, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public int getChildCount(com.android.uiautomator.core.UiSelector); + @Deprecated public class UiCollection extends com.android.uiautomator.core.UiObject { + ctor @Deprecated public UiCollection(com.android.uiautomator.core.UiSelector); + method @Deprecated public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, String) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiObject getChildByInstance(com.android.uiautomator.core.UiSelector, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, String) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public int getChildCount(com.android.uiautomator.core.UiSelector); } - public deprecated class UiDevice { - method public void clearLastTraversedText(); - method public boolean click(int, int); - method public boolean drag(int, int, int, int, int); - method public void dumpWindowHierarchy(java.lang.String); - method public void freezeRotation() throws android.os.RemoteException; - method public deprecated java.lang.String getCurrentActivityName(); - method public java.lang.String getCurrentPackageName(); - method public int getDisplayHeight(); - method public int getDisplayRotation(); - method public android.graphics.Point getDisplaySizeDp(); - method public int getDisplayWidth(); - method public static com.android.uiautomator.core.UiDevice getInstance(); - method public java.lang.String getLastTraversedText(); - method public java.lang.String getProductName(); - method public boolean hasAnyWatcherTriggered(); - method public boolean hasWatcherTriggered(java.lang.String); - method public boolean isNaturalOrientation(); - method public boolean isScreenOn() throws android.os.RemoteException; - method public boolean openNotification(); - method public boolean openQuickSettings(); - method public boolean pressBack(); - method public boolean pressDPadCenter(); - method public boolean pressDPadDown(); - method public boolean pressDPadLeft(); - method public boolean pressDPadRight(); - method public boolean pressDPadUp(); - method public boolean pressDelete(); - method public boolean pressEnter(); - method public boolean pressHome(); - method public boolean pressKeyCode(int); - method public boolean pressKeyCode(int, int); - method public boolean pressMenu(); - method public boolean pressRecentApps() throws android.os.RemoteException; - method public boolean pressSearch(); - method public void registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher); - method public void removeWatcher(java.lang.String); - method public void resetWatcherTriggers(); - method public void runWatchers(); - method public void setCompressedLayoutHeirarchy(boolean); - method public void setOrientationLeft() throws android.os.RemoteException; - method public void setOrientationNatural() throws android.os.RemoteException; - method public void setOrientationRight() throws android.os.RemoteException; - method public void sleep() throws android.os.RemoteException; - method public boolean swipe(int, int, int, int, int); - method public boolean swipe(android.graphics.Point[], int); - method public boolean takeScreenshot(java.io.File); - method public boolean takeScreenshot(java.io.File, float, int); - method public void unfreezeRotation() throws android.os.RemoteException; - method public void waitForIdle(); - method public void waitForIdle(long); - method public boolean waitForWindowUpdate(java.lang.String, long); - method public void wakeUp() throws android.os.RemoteException; + @Deprecated public class UiDevice { + method @Deprecated public void clearLastTraversedText(); + method @Deprecated public boolean click(int, int); + method @Deprecated public boolean drag(int, int, int, int, int); + method @Deprecated public void dumpWindowHierarchy(String); + method @Deprecated public void freezeRotation() throws android.os.RemoteException; + method @Deprecated public String getCurrentActivityName(); + method @Deprecated public String getCurrentPackageName(); + method @Deprecated public int getDisplayHeight(); + method @Deprecated public int getDisplayRotation(); + method @Deprecated public android.graphics.Point getDisplaySizeDp(); + method @Deprecated public int getDisplayWidth(); + method @Deprecated public static com.android.uiautomator.core.UiDevice getInstance(); + method @Deprecated public String getLastTraversedText(); + method @Deprecated public String getProductName(); + method @Deprecated public boolean hasAnyWatcherTriggered(); + method @Deprecated public boolean hasWatcherTriggered(String); + method @Deprecated public boolean isNaturalOrientation(); + method @Deprecated public boolean isScreenOn() throws android.os.RemoteException; + method @Deprecated public boolean openNotification(); + method @Deprecated public boolean openQuickSettings(); + method @Deprecated public boolean pressBack(); + method @Deprecated public boolean pressDPadCenter(); + method @Deprecated public boolean pressDPadDown(); + method @Deprecated public boolean pressDPadLeft(); + method @Deprecated public boolean pressDPadRight(); + method @Deprecated public boolean pressDPadUp(); + method @Deprecated public boolean pressDelete(); + method @Deprecated public boolean pressEnter(); + method @Deprecated public boolean pressHome(); + method @Deprecated public boolean pressKeyCode(int); + method @Deprecated public boolean pressKeyCode(int, int); + method @Deprecated public boolean pressMenu(); + method @Deprecated public boolean pressRecentApps() throws android.os.RemoteException; + method @Deprecated public boolean pressSearch(); + method @Deprecated public void registerWatcher(String, com.android.uiautomator.core.UiWatcher); + method @Deprecated public void removeWatcher(String); + method @Deprecated public void resetWatcherTriggers(); + method @Deprecated public void runWatchers(); + method @Deprecated public void setCompressedLayoutHeirarchy(boolean); + method @Deprecated public void setOrientationLeft() throws android.os.RemoteException; + method @Deprecated public void setOrientationNatural() throws android.os.RemoteException; + method @Deprecated public void setOrientationRight() throws android.os.RemoteException; + method @Deprecated public void sleep() throws android.os.RemoteException; + method @Deprecated public boolean swipe(int, int, int, int, int); + method @Deprecated public boolean swipe(android.graphics.Point[], int); + method @Deprecated public boolean takeScreenshot(java.io.File); + method @Deprecated public boolean takeScreenshot(java.io.File, float, int); + method @Deprecated public void unfreezeRotation() throws android.os.RemoteException; + method @Deprecated public void waitForIdle(); + method @Deprecated public void waitForIdle(long); + method @Deprecated public boolean waitForWindowUpdate(String, long); + method @Deprecated public void wakeUp() throws android.os.RemoteException; } - public deprecated class UiObject { - ctor public UiObject(com.android.uiautomator.core.UiSelector); - method public void clearTextField() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean click() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean clickAndWaitForNewWindow() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean clickAndWaitForNewWindow(long) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean clickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean clickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean dragTo(com.android.uiautomator.core.UiObject, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean dragTo(int, int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean exists(); - method protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long); - method public android.graphics.Rect getBounds() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiObject getChild(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public int getChildCount() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public java.lang.String getClassName() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public java.lang.String getContentDescription() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiObject getFromParent(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public java.lang.String getPackageName() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public final com.android.uiautomator.core.UiSelector getSelector(); - method public java.lang.String getText() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public android.graphics.Rect getVisibleBounds() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isCheckable() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isChecked() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isClickable() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isEnabled() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isFocusable() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isFocused() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isLongClickable() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isScrollable() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean isSelected() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean longClick() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean longClickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean longClickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean performMultiPointerGesture(android.view.MotionEvent.PointerCoords...); - method public boolean performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int); - method public boolean pinchIn(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean pinchOut(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean setText(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean swipeDown(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean swipeLeft(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean swipeRight(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean swipeUp(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean waitForExists(long); - method public boolean waitUntilGone(long); - field protected static final int FINGER_TOUCH_HALF_WIDTH = 20; // 0x14 - field protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5 - field protected static final deprecated long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L - field protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L - field protected static final deprecated long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L - field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL + @Deprecated public class UiObject { + ctor @Deprecated public UiObject(com.android.uiautomator.core.UiSelector); + method @Deprecated public void clearTextField() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean click() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean clickAndWaitForNewWindow() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean clickAndWaitForNewWindow(long) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean clickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean clickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean dragTo(com.android.uiautomator.core.UiObject, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean dragTo(int, int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean exists(); + method @Deprecated protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long); + method @Deprecated public android.graphics.Rect getBounds() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiObject getChild(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public int getChildCount() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public String getClassName() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public String getContentDescription() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiObject getFromParent(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public String getPackageName() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public final com.android.uiautomator.core.UiSelector getSelector(); + method @Deprecated public String getText() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public android.graphics.Rect getVisibleBounds() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isCheckable() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isChecked() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isClickable() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isEnabled() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isFocusable() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isFocused() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isLongClickable() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isScrollable() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean isSelected() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean longClick() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean longClickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean longClickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...); + method @Deprecated public boolean performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int); + method @Deprecated public boolean pinchIn(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean pinchOut(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean setText(String) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean swipeDown(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean swipeLeft(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean swipeRight(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean swipeUp(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean waitForExists(long); + method @Deprecated public boolean waitUntilGone(long); + field @Deprecated protected static final int FINGER_TOUCH_HALF_WIDTH = 20; // 0x14 + field @Deprecated protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5 + field @Deprecated protected static final long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L + field @Deprecated protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L + field @Deprecated protected static final long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L + field @Deprecated protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL } - public deprecated class UiObjectNotFoundException extends java.lang.Exception { - ctor public UiObjectNotFoundException(java.lang.String); - ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable); - ctor public UiObjectNotFoundException(java.lang.Throwable); + @Deprecated public class UiObjectNotFoundException extends java.lang.Exception { + ctor @Deprecated public UiObjectNotFoundException(String); + ctor @Deprecated public UiObjectNotFoundException(String, Throwable); + ctor @Deprecated public UiObjectNotFoundException(Throwable); } - public deprecated class UiScrollable extends com.android.uiautomator.core.UiCollection { - ctor public UiScrollable(com.android.uiautomator.core.UiSelector); - method protected boolean exists(com.android.uiautomator.core.UiSelector); - method public boolean flingBackward() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean flingForward() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean flingToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean flingToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public int getMaxSearchSwipes(); - method public double getSwipeDeadZonePercentage(); - method public boolean scrollBackward() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollBackward(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollDescriptionIntoView(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollForward() throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollForward(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollIntoView(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollTextIntoView(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollToBeginning(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollToEnd(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public boolean scrollToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException; - method public com.android.uiautomator.core.UiScrollable setAsHorizontalList(); - method public com.android.uiautomator.core.UiScrollable setAsVerticalList(); - method public com.android.uiautomator.core.UiScrollable setMaxSearchSwipes(int); - method public com.android.uiautomator.core.UiScrollable setSwipeDeadZonePercentage(double); + @Deprecated public class UiScrollable extends com.android.uiautomator.core.UiCollection { + ctor @Deprecated public UiScrollable(com.android.uiautomator.core.UiSelector); + method @Deprecated protected boolean exists(com.android.uiautomator.core.UiSelector); + method @Deprecated public boolean flingBackward() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean flingForward() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean flingToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean flingToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public int getMaxSearchSwipes(); + method @Deprecated public double getSwipeDeadZonePercentage(); + method @Deprecated public boolean scrollBackward() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollBackward(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollDescriptionIntoView(String) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollForward() throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollForward(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollIntoView(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollTextIntoView(String) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollToBeginning(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollToEnd(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public boolean scrollToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException; + method @Deprecated public com.android.uiautomator.core.UiScrollable setAsHorizontalList(); + method @Deprecated public com.android.uiautomator.core.UiScrollable setAsVerticalList(); + method @Deprecated public com.android.uiautomator.core.UiScrollable setMaxSearchSwipes(int); + method @Deprecated public com.android.uiautomator.core.UiScrollable setSwipeDeadZonePercentage(double); } - public deprecated class UiSelector { - ctor public UiSelector(); - method public com.android.uiautomator.core.UiSelector checkable(boolean); - method public com.android.uiautomator.core.UiSelector checked(boolean); - method public com.android.uiautomator.core.UiSelector childSelector(com.android.uiautomator.core.UiSelector); - method public com.android.uiautomator.core.UiSelector className(java.lang.String); - method public <T> com.android.uiautomator.core.UiSelector className(java.lang.Class<T>); - method public com.android.uiautomator.core.UiSelector classNameMatches(java.lang.String); - method public com.android.uiautomator.core.UiSelector clickable(boolean); - method protected com.android.uiautomator.core.UiSelector cloneSelector(); - method public com.android.uiautomator.core.UiSelector description(java.lang.String); - method public com.android.uiautomator.core.UiSelector descriptionContains(java.lang.String); - method public com.android.uiautomator.core.UiSelector descriptionMatches(java.lang.String); - method public com.android.uiautomator.core.UiSelector descriptionStartsWith(java.lang.String); - method public com.android.uiautomator.core.UiSelector enabled(boolean); - method public com.android.uiautomator.core.UiSelector focusable(boolean); - method public com.android.uiautomator.core.UiSelector focused(boolean); - method public com.android.uiautomator.core.UiSelector fromParent(com.android.uiautomator.core.UiSelector); - method public com.android.uiautomator.core.UiSelector index(int); - method public com.android.uiautomator.core.UiSelector instance(int); - method public com.android.uiautomator.core.UiSelector longClickable(boolean); - method public com.android.uiautomator.core.UiSelector packageName(java.lang.String); - method public com.android.uiautomator.core.UiSelector packageNameMatches(java.lang.String); - method public com.android.uiautomator.core.UiSelector resourceId(java.lang.String); - method public com.android.uiautomator.core.UiSelector resourceIdMatches(java.lang.String); - method public com.android.uiautomator.core.UiSelector scrollable(boolean); - method public com.android.uiautomator.core.UiSelector selected(boolean); - method public com.android.uiautomator.core.UiSelector text(java.lang.String); - method public com.android.uiautomator.core.UiSelector textContains(java.lang.String); - method public com.android.uiautomator.core.UiSelector textMatches(java.lang.String); - method public com.android.uiautomator.core.UiSelector textStartsWith(java.lang.String); + @Deprecated public class UiSelector { + ctor @Deprecated public UiSelector(); + method @Deprecated public com.android.uiautomator.core.UiSelector checkable(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector checked(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector childSelector(com.android.uiautomator.core.UiSelector); + method @Deprecated public com.android.uiautomator.core.UiSelector className(String); + method @Deprecated public <T> com.android.uiautomator.core.UiSelector className(Class<T>); + method @Deprecated public com.android.uiautomator.core.UiSelector classNameMatches(String); + method @Deprecated public com.android.uiautomator.core.UiSelector clickable(boolean); + method @Deprecated protected com.android.uiautomator.core.UiSelector cloneSelector(); + method @Deprecated public com.android.uiautomator.core.UiSelector description(String); + method @Deprecated public com.android.uiautomator.core.UiSelector descriptionContains(String); + method @Deprecated public com.android.uiautomator.core.UiSelector descriptionMatches(String); + method @Deprecated public com.android.uiautomator.core.UiSelector descriptionStartsWith(String); + method @Deprecated public com.android.uiautomator.core.UiSelector enabled(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector focusable(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector focused(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector fromParent(com.android.uiautomator.core.UiSelector); + method @Deprecated public com.android.uiautomator.core.UiSelector index(int); + method @Deprecated public com.android.uiautomator.core.UiSelector instance(int); + method @Deprecated public com.android.uiautomator.core.UiSelector longClickable(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector packageName(String); + method @Deprecated public com.android.uiautomator.core.UiSelector packageNameMatches(String); + method @Deprecated public com.android.uiautomator.core.UiSelector resourceId(String); + method @Deprecated public com.android.uiautomator.core.UiSelector resourceIdMatches(String); + method @Deprecated public com.android.uiautomator.core.UiSelector scrollable(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector selected(boolean); + method @Deprecated public com.android.uiautomator.core.UiSelector text(String); + method @Deprecated public com.android.uiautomator.core.UiSelector textContains(String); + method @Deprecated public com.android.uiautomator.core.UiSelector textMatches(String); + method @Deprecated public com.android.uiautomator.core.UiSelector textStartsWith(String); } - public abstract deprecated interface UiWatcher { - method public abstract boolean checkForCondition(); + @Deprecated public interface UiWatcher { + method @Deprecated public boolean checkForCondition(); } } package com.android.uiautomator.testrunner { - public abstract deprecated interface IAutomationSupport { - method public abstract void sendStatus(int, android.os.Bundle); + @Deprecated public interface IAutomationSupport { + method @Deprecated public void sendStatus(int, android.os.Bundle); } - public deprecated class UiAutomatorTestCase extends junit.framework.TestCase { - ctor public UiAutomatorTestCase(); - method public com.android.uiautomator.testrunner.IAutomationSupport getAutomationSupport(); - method public android.os.Bundle getParams(); - method public com.android.uiautomator.core.UiDevice getUiDevice(); - method public void sleep(long); + @Deprecated public class UiAutomatorTestCase extends junit.framework.TestCase { + ctor @Deprecated public UiAutomatorTestCase(); + method @Deprecated public com.android.uiautomator.testrunner.IAutomationSupport getAutomationSupport(); + method @Deprecated public android.os.Bundle getParams(); + method @Deprecated public com.android.uiautomator.core.UiDevice getUiDevice(); + method @Deprecated public void sleep(long); } } diff --git a/cmds/uiautomator/api/removed.txt b/cmds/uiautomator/api/removed.txt index e69de29bb2d1..d802177e249b 100644 --- a/cmds/uiautomator/api/removed.txt +++ b/cmds/uiautomator/api/removed.txt @@ -0,0 +1 @@ +// Signature format: 2.0 diff --git a/cmds/uiautomator/library/Android.bp b/cmds/uiautomator/library/Android.bp index a83d111f6c20..14b74da0c616 100644 --- a/cmds/uiautomator/library/Android.bp +++ b/cmds/uiautomator/library/Android.bp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -droiddoc { - name: "uiautomator-stubs-docs", +droidstubs { + name: "uiautomator-stubs", srcs: [ "core-src/**/*.java", "testrunner-src/**/*.java", @@ -24,10 +24,10 @@ droiddoc { "android.test.base", "unsupportedappusage", ], - custom_template: "droiddoc-templates-sdk", installable: false, - args: "-stubpackages com.android.uiautomator.core:" + - "com.android.uiautomator.testrunner", + flags: [ + "-stubpackages com.android.uiautomator.core:com.android.uiautomator.testrunner", + ], check_api: { current: { @@ -41,10 +41,25 @@ droiddoc { }, } +droiddoc { + name: "uiautomator-stubs-docs", + srcs: [ + ":uiautomator-stubs", + ], + libs: [ + "android.test.runner", + "junit", + "android.test.base", + "unsupportedappusage", + ], + installable: false, + custom_template: "droiddoc-templates-sdk", +} + java_library_static { name: "android_uiautomator", srcs: [ - ":uiautomator-stubs-docs", + ":uiautomator-stubs", ], libs: [ "android.test.runner", @@ -65,7 +80,7 @@ java_library_static { ], static_libs: [ "junit", - ] + ], } java_library_static { diff --git a/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/UiAutomationShellWrapper.java b/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/UiAutomationShellWrapper.java index 71561c3c7023..39248730802f 100644 --- a/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/UiAutomationShellWrapper.java +++ b/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/core/UiAutomationShellWrapper.java @@ -49,7 +49,7 @@ public class UiAutomationShellWrapper { } try { if (isSet) { - am.setActivityController(new DummyActivityController(), true); + am.setActivityController(new NoOpActivityController(), true); } else { am.setActivityController(null, true); } @@ -80,9 +80,9 @@ public class UiAutomationShellWrapper { } /** - * Dummy, no interference, activity controller. + * No-op, no interference, activity controller. */ - private class DummyActivityController extends IActivityController.Stub { + private class NoOpActivityController extends IActivityController.Stub { @Override public boolean activityStarting(Intent intent, String pkg) throws RemoteException { /* do nothing and let activity proceed normally */ diff --git a/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java b/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java index d862e1c2babb..e6fb7aa76e58 100644 --- a/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java +++ b/cmds/uiautomator/library/testrunner-src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java @@ -45,7 +45,7 @@ import java.util.List; public class UiAutomatorTestCase extends TestCase { private static final String DISABLE_IME = "disable_ime"; - private static final String DUMMY_IME_PACKAGE = "com.android.testing.dummyime"; + private static final String STUB_IME_PACKAGE = "com.android.testing.stubime"; private static final int NOT_A_SUBTYPE_ID = -1; private UiDevice mUiDevice; @@ -58,7 +58,7 @@ public class UiAutomatorTestCase extends TestCase { super.setUp(); mShouldDisableIme = "true".equals(mParams.getString(DISABLE_IME)); if (mShouldDisableIme) { - setDummyIme(); + setStubIme(); } } @@ -128,7 +128,7 @@ public class UiAutomatorTestCase extends TestCase { SystemClock.sleep(ms); } - private void setDummyIme() { + private void setStubIme() { Context context = ActivityThread.currentApplication(); if (context == null) { throw new RuntimeException("ActivityThread.currentApplication() is null."); @@ -138,13 +138,13 @@ public class UiAutomatorTestCase extends TestCase { List<InputMethodInfo> infos = im.getInputMethodList(); String id = null; for (InputMethodInfo info : infos) { - if (DUMMY_IME_PACKAGE.equals(info.getComponent().getPackageName())) { + if (STUB_IME_PACKAGE.equals(info.getComponent().getPackageName())) { id = info.getId(); } } if (id == null) { throw new RuntimeException(String.format( - "Required testing fixture missing: IME package (%s)", DUMMY_IME_PACKAGE)); + "Required testing fixture missing: IME package (%s)", STUB_IME_PACKAGE)); } if (context.checkSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) != PackageManager.PERMISSION_GRANTED) { |