/cts/tests/tests/accounts/src/android/accounts/cts/ |
D | AccountManagerTest.java | 123 private static AccountManager am; field in AccountManagerTest 155 am = AccountManager.get(mContext); in setUp() 163 assertTrue(removeAccount(am, ACCOUNT, mActivity, null /* callback */).getBoolean( in tearDown() 165 assertTrue(removeAccount(am, ACCOUNT_SAME_TYPE, mActivity, null /* callback */).getBoolean( in tearDown() 169 Account[] ctsAccounts = am.getAccountsByType(ACCOUNT_TYPE); in tearDown() 170 Account[] ctsCustomAccounts = am.getAccountsByType(ACCOUNT_TYPE_CUSTOM); in tearDown() 174 removeAccount(am, ctsAccount, mActivity, null /* callback */); in tearDown() 231 am.invalidateAuthToken(account.type, token); in validateSuccessfulTokenFetchingLifecycle() 308 Account[] accounts = am.getAccounts(); in getAccountsCount() 313 private Bundle addAccount(AccountManager am, String accountType, String authTokenType, in addAccount() argument [all …]
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | TypefaceCustomFallbackBuilderTest.java | 50 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in createFullFamilyTypeface() local 57 b = new FontFamily.Builder(new Font.Builder(am, in createFullFamilyTypeface() 60 b.addFont(new Font.Builder(am, in createFullFamilyTypeface() 69 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testSingleFont_path() local 78 new Font.Builder(am, path).build()).build()).build())); in testSingleFont_path() 84 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testSingleFont_ttc() local 93 new Font.Builder(am, FontTestUtil.getTtcFontFileInAsset()) in testSingleFont_ttc() 100 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testSingleFont_vf() local 108 new Font.Builder(am, FontTestUtil.getVFFontInAsset()) in testSingleFont_vf() 135 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testFamily_selectStyleByBuilder() local [all …]
|
D | TypefaceTest.java | 648 final AssetManager am = mContext.getAssets(); in testFontVariationSettings() local 653 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 657 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 661 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 665 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 669 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings() 682 final AssetManager am = mContext.getAssets(); in testFontVariationSettings_UnsupportedAxes() local 687 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings_UnsupportedAxes() 691 paint.setTypeface(new Typeface.Builder(am, "fonts/var_fonts/WeightEqualsEmVariableFont.ttf") in testFontVariationSettings_UnsupportedAxes() 704 final AssetManager am = mContext.getAssets(); in testFontVariationSettings_OutOfRangeValue() local [all …]
|
/cts/tests/tests/graphics/src/android/graphics/fonts/ |
D | FontFamilyTest.java | 44 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_SingleFont() local 45 Font font = new Font.Builder(am, FONT_DIR + "ascii_g3em_weight400_upright.ttf").build(); in testBuilder_SingleFont() 54 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont() local 56 am, FONT_DIR + "ascii_g3em_weight400_upright.ttf").build(); in testBuilder_MultipleFont() 58 am, FONT_DIR + "ascii_m3em_weight700_upright.ttf").build(); in testBuilder_MultipleFont() 69 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_overrideWeight() local 71 am, FONT_DIR + "ascii_g3em_weight400_upright.ttf").build(); in testBuilder_MultipleFont_overrideWeight() 72 Font boldFont = new Font.Builder(am, FONT_DIR + "ascii_g3em_weight400_upright.ttf") in testBuilder_MultipleFont_overrideWeight() 84 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_overrideItalic() local 86 am, FONT_DIR + "ascii_g3em_weight400_upright.ttf").build(); in testBuilder_MultipleFont_overrideItalic() [all …]
|
D | FontTest.java | 77 private static ByteBuffer mmap(AssetManager am, String path) { in mmap() argument 79 try (InputStream is = am.open(path)) { in mmap() 127 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer() local 134 ByteBuffer buffer = mmap(am, path); in testBuilder_buffer() 148 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_ttc() local 155 ByteBuffer buffer = mmap(am, path); in testBuilder_buffer_ttc() 170 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_vf() local 177 ByteBuffer buffer = mmap(am, path); in testBuilder_buffer_vf() 194 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_override() local 201 ByteBuffer buffer = mmap(am, path); in testBuilder_buffer_override() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | AudioFrequencyActivity.java | 57 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in setMaxLevel() local 58 mMaxLevel = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in setMaxLevel() 59 am.setStreamVolume(AudioManager.STREAM_MUSIC, (int)(mMaxLevel), 0); in setMaxLevel() 63 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in setMinLevel() local 64 am.setStreamVolume(AudioManager.STREAM_MUSIC, 0, 0); in setMinLevel() 68 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in testMaxLevel() local 69 int currentLevel = am.getStreamVolume(AudioManager.STREAM_MUSIC); in testMaxLevel() 81 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in getMaxLevelForStream() local 82 if (am != null) { in getMaxLevelForStream() 83 return am.getStreamMaxVolume(streamType); in getMaxLevelForStream() [all …]
|
D | AudioAEC.java | 299 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in startTest() 301 int originalMode = am.getMode(); in startTest() 302 am.setMode(targetMode); in startTest() 304 if (am.getMode() != targetMode) { in startTest() 317 am.setMode(originalMode); in startTest() 324 boolean originalSpeakerPhone = am.isSpeakerphoneOn(); in startTest() 325 am.setSpeakerphoneOn(true); in startTest() 344 am.setSpeakerphoneOn(originalSpeakerPhone); in startTest() 345 am.setMode(originalMode); in startTest() 354 am.setSpeakerphoneOn(originalSpeakerPhone); in startTest() [all …]
|
D | AudioLoopbackActivity.java | 135 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate() local 136 mMaxLevel = am.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in onCreate() 138 am.setStreamVolume(AudioManager.STREAM_MUSIC, (int)(0.7 * mMaxLevel), 0); in onCreate() 153 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate() 154 am.setStreamVolume(AudioManager.STREAM_MUSIC, in onCreate() 170 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in refreshLevel() local 172 int currentLevel = am.getStreamVolume(AudioManager.STREAM_MUSIC); in refreshLevel() 209 AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in startAudioTest() local 210 String value = am.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER); in startAudioTest()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | AudioPlaybackConfigurationTest.java | 80 AudioManager am = new AudioManager(getContext()); in testParcelableWriteToParcel() 81 assertNotNull("Could not create AudioManager", am); in testParcelableWriteToParcel() 88 aa, am.generateAudioSessionId()); in testParcelableWriteToParcel() 91 List<AudioPlaybackConfiguration> configs = am.getActivePlaybackConfigurations(); in testParcelableWriteToParcel() 123 AudioManager am = new AudioManager(getContext()); in testGetterMediaPlayer() 124 assertNotNull("Could not create AudioManager", am); in testGetterMediaPlayer() 132 List<AudioPlaybackConfiguration> configs = am.getActivePlaybackConfigurations(); in testGetterMediaPlayer() 136 aa, am.generateAudioSessionId()); in testGetterMediaPlayer() 137 configs = am.getActivePlaybackConfigurations(); in testGetterMediaPlayer() 143 configs = am.getActivePlaybackConfigurations(); in testGetterMediaPlayer() [all …]
|
D | LoudnessEnhancerTest.java | 54 AudioManager am = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in test0_0ConstructorAndRelease() local 55 assertNotNull("null AudioManager", am); in test0_0ConstructorAndRelease() 59 int session = am.generateAudioSessionId(); in test0_0ConstructorAndRelease() 160 AudioManager am = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in test3_0MeasureGainChange() local 161 assertNotNull("null AudioManager", am); in test3_0MeasureGainChange() 162 int originalVolume = am.getStreamVolume(AudioManager.STREAM_MUSIC); in test3_0MeasureGainChange() 163 am.setStreamVolume(AudioManager.STREAM_MUSIC, in test3_0MeasureGainChange() 164 am.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0); in test3_0MeasureGainChange() 210 am.setStreamVolume(AudioManager.STREAM_MUSIC, originalVolume, 0); in test3_0MeasureGainChange()
|
D | AudioRecordingConfigurationTest.java | 112 AudioManager am = new AudioManager(getContext()); in testAudioManagerGetActiveRecordConfigurations() local 113 assertNotNull("Could not create AudioManager", am); in testAudioManagerGetActiveRecordConfigurations() 115 List<AudioRecordingConfiguration> configs = am.getActiveRecordingConfigurations(); in testAudioManagerGetActiveRecordConfigurations() 124 configs = am.getActiveRecordingConfigurations(); in testAudioManagerGetActiveRecordConfigurations() 141 configs = am.getActiveRecordingConfigurations(); in testAudioManagerGetActiveRecordConfigurations() 170 AudioManager am = new AudioManager(getContext()); in doCallbackTest() local 171 assertNotNull("Could not create AudioManager", am); in doCallbackTest() 175 am.registerAudioRecordingCallback(callback, h /*handler*/); in doCallbackTest() 206 am.unregisterAudioRecordingCallback(callback); in doCallbackTest() 230 AudioManager am = new AudioManager(getContext()); in testParcel() local [all …]
|
D | VisualizerTest.java | 309 AudioManager am = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in test4_1MeasurePeakRms() local 310 assertNotNull("null AudioManager", am); in test4_1MeasurePeakRms() 311 int originalVolume = am.getStreamVolume(AudioManager.STREAM_MUSIC); in test4_1MeasurePeakRms() 312 am.setStreamVolume(AudioManager.STREAM_MUSIC, in test4_1MeasurePeakRms() 313 am.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0); in test4_1MeasurePeakRms() 339 am.setStreamVolume(AudioManager.STREAM_MUSIC, originalVolume, 0); in test4_1MeasurePeakRms() 382 AudioManager am = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in test4_2MeasurePeakRmsLongMP3() local 383 assertNotNull("null AudioManager", am); in test4_2MeasurePeakRmsLongMP3() 384 int originalVolume = am.getStreamVolume(AudioManager.STREAM_MUSIC); in test4_2MeasurePeakRmsLongMP3() 385 am.setStreamVolume(AudioManager.STREAM_MUSIC, in test4_2MeasurePeakRmsLongMP3() [all …]
|
D | PostProcTestBase.java | 59 AudioManager am = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in getSessionId() local 60 assertNotNull("could not get AudioManager", am); in getSessionId() 61 int sessionId = am.generateAudioSessionId(); in getSessionId()
|
/cts/hostsidetests/incident/src/com/android/server/cts/ |
D | ActivityManagerIncidentTest.java | 19 import com.android.server.am.ActiveInstrumentationProto; 20 import com.android.server.am.ActiveServicesProto; 21 import com.android.server.am.ActiveServicesProto.ServicesByUser; 22 import com.android.server.am.ActivityManagerServiceDumpBroadcastsProto; 23 import com.android.server.am.ActivityManagerServiceDumpProcessesProto; 24 import com.android.server.am.ActivityManagerServiceDumpProcessesProto.LruProcesses; 25 import com.android.server.am.ActivityManagerServiceDumpServicesProto; 26 import com.android.server.am.AppErrorsProto; 27 import com.android.server.am.AppTimeTrackerProto; 28 import com.android.server.am.BroadcastQueueProto; [all …]
|
/cts/tests/AlarmManager/app/src/android/alarmmanager/alarmtestapp/cts/ |
D | TestAlarmScheduler.java | 45 final AlarmManager am = context.getSystemService(AlarmManager.class); in onReceive() local 60 am.setAlarmClock(alarmClockInfo, alarmClockSender); in onReceive() 75 am.setRepeating(type, triggerTime, interval, alarmSender); in onReceive() 77 am.setExactAndAllowWhileIdle(type, triggerTime, alarmSender); in onReceive() 79 am.setExact(type, triggerTime, alarmSender); in onReceive() 84 am.cancel(alarmClockSender); in onReceive() 85 am.cancel(alarmSender); in onReceive()
|
/cts/tests/app/src/android/app/cts/ |
D | Instrumentation_ActivityMonitorTest.java | 49 ActivityMonitor am = instrumentation.addMonitor( in testActivityMonitor() local 55 Activity lastActivity = am.getLastActivity(); in testActivityMonitor() 59 lastActivity = am.getLastActivity(); in testActivityMonitor() 61 Activity activity = am.waitForActivity(); in testActivityMonitor() 63 assertEquals(1, am.getHits()); in testActivityMonitor() 72 activity = am.waitForActivityWithTimeout(CHECK_INTERVAL_FOR_ACTIVITY_LAUNCH_MS); in testActivityMonitor() 76 instrumentation.removeMonitor(am); in testActivityMonitor() 78 am = new ActivityMonitor(InstrumentationTestActivity.class.getName(), result, true); in testActivityMonitor() 79 assertSame(result, am.getResult()); in testActivityMonitor() 80 assertTrue(am.isBlocking()); in testActivityMonitor() [all …]
|
/cts/tests/tests/keystore/src/android/server/am/ |
D | ActivityManagerTestBase.java | 17 package android.server.am; 23 import static android.server.am.ComponentNameUtils.getActivityName; 24 import static android.server.am.ComponentNameUtils.getWindowName; 25 import static android.server.am.StateLogger.log; 26 import static android.server.am.StateLogger.logAlways; 27 import static android.server.am.StateLogger.logE; 28 import static android.server.am.UiDeviceUtils.pressBackButton; 29 import static android.server.am.UiDeviceUtils.pressEnterButton; 30 import static android.server.am.UiDeviceUtils.pressHomeButton; 31 import static android.server.am.UiDeviceUtils.pressSleepButton; [all …]
|
D | ActivityManagerState.java | 17 package android.server.am; 20 import static android.server.am.ComponentNameUtils.getActivityName; 21 import static android.server.am.ProtoExtractors.extract; 22 import static android.server.am.StateLogger.log; 23 import static android.server.am.StateLogger.logE; 33 import com.android.server.am.nano.ActivityDisplayProto; 34 import com.android.server.am.nano.ActivityManagerServiceDumpActivitiesProto; 35 import com.android.server.am.nano.ActivityRecordProto; 36 import com.android.server.am.nano.ActivityStackProto; 37 import com.android.server.am.nano.ActivityStackSupervisorProto; [all …]
|
D | ActivityAndWindowManagersState.java | 17 package android.server.am; 26 import static android.server.am.ComponentNameUtils.getActivityName; 27 import static android.server.am.ComponentNameUtils.getWindowName; 28 import static android.server.am.StateLogger.log; 29 import static android.server.am.StateLogger.logAlways; 30 import static android.server.am.StateLogger.logE; 43 import android.server.am.ActivityManagerState.ActivityStack; 44 import android.server.am.ActivityManagerState.ActivityTask; 45 import android.server.am.WindowManagerState.WindowStack; 46 import android.server.am.WindowManagerState.WindowState; [all …]
|
/cts/tests/tests/accounts/common/src/android/accounts/cts/common/ |
D | AuthenticatorContentProvider.java | 81 AccountManager am = AccountManager.get(context); in setup() local 82 AuthenticatorDescription[] authenticators = am.getAuthenticatorTypes(); in setup() 91 am.addAccountExplicitly(account, Fixtures.PREFIX_PASSWORD + name, null); in setup() 99 AccountManager am = AccountManager.get(context); in teardown() local 100 AuthenticatorDescription[] authenticators = am.getAuthenticatorTypes(); in teardown() 107 Account[] accountsToRemove = am.getAccountsByType(a.type); in teardown() 109 am.removeAccountExplicitly(account); in teardown()
|
/cts/hostsidetests/backup/SyncAdapterSettingsApp/src/android/cts/backup/syncadaptersettingsapp/ |
D | SyncAdapterSettingsTest.java | 236 final AccountManager am = context.getSystemService(AccountManager.class); in addAccount() local 238 if (!Arrays.asList(am.getAccountsByType(mAccount.type)).contains(mAccount)) { in addAccount() 240 am.addAccountExplicitly(mAccount, password, new Bundle()); in addAccount() 245 final AccountManager am = mContext.getSystemService(AccountManager.class); in isAuthenticatorRegistered() local 246 return Arrays.stream(am.getAuthenticatorTypes()) in isAuthenticatorRegistered() 261 final AccountManager am = context.getSystemService(AccountManager.class); in removeAccount() local 262 final Account[] accounts = am.getAccountsByType(ACCOUNT_TYPE); in removeAccount() 266 am.removeAccountExplicitly(account); in removeAccount()
|
/cts/hostsidetests/devicepolicy/app/AccountCheck/Auth/src/com/android/cts/devicepolicy/accountcheck/ |
D | AccountCheckTest.java | 135 final AccountManager am = AccountManager.get(mContext); in testCheckPreconfiguredAccountFeatures() local 136 final Account accounts[] = am.getAccounts(); in testCheckPreconfiguredAccountFeatures() 151 if (hasAccountFeatures(am, account, feature_disallow)) { in testCheckPreconfiguredAccountFeatures() 154 if (!hasAccountFeatures(am, account, feature_allow)) { in testCheckPreconfiguredAccountFeatures() 163 private boolean hasAccountFeatures(AccountManager am, Account account, String[] features) { in hasAccountFeatures() argument 165 return am.hasFeatures(account, features, null, null).getResult(); in hasAccountFeatures()
|
/cts/hostsidetests/statsd/apps/statsdapp/src/com/android/server/cts/device/statsd/ |
D | StatsdAuthenticator.java | 65 final AccountManager am = context.getSystemService(AccountManager.class); in ensureTestAccount() local 67 if (!Arrays.asList(am.getAccountsByType(account.type)).contains(account) ){ in ensureTestAccount() 68 am.addAccountExplicitly(account, "password", new Bundle()); in ensureTestAccount() 76 final AccountManager am = context.getSystemService(AccountManager.class); in removeAllAccounts() local 78 for (Account account : am.getAccountsByType(ACCOUNT_TYPE)) { in removeAllAccounts() 80 am.removeAccountExplicitly(account); in removeAllAccounts()
|
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/ |
D | BatteryStatsAuthenticator.java | 66 final AccountManager am = context.getSystemService(AccountManager.class); in ensureTestAccount() local 68 if (!Arrays.asList(am.getAccountsByType(account.type)).contains(account) ){ in ensureTestAccount() 69 am.addAccountExplicitly(account, "password", new Bundle()); in ensureTestAccount() 77 final AccountManager am = context.getSystemService(AccountManager.class); in removeAllAccounts() local 79 for (Account account : am.getAccountsByType(BatteryStatsAuthenticator.ACCOUNT_TYPE)) { in removeAllAccounts() 81 am.removeAccountExplicitly(account); in removeAllAccounts()
|
/cts/tests/ProcessTest/src/com/android/cts/process/ |
D | ProcessTest.java | 50 ActivityManager am = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); in testPid() local 53 List<RunningAppProcessInfo> list = am.getRunningAppProcesses(); in testPid() 61 List<RunningAppProcessInfo> sharelist = am.getRunningAppProcesses(); in testPid() 69 List<RunningAppProcessInfo> shareStublist = am.getRunningAppProcesses(); in testPid() 79 List<RunningAppProcessInfo> noShareStublist = am.getRunningAppProcesses(); in testPid()
|