Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 4708) sorted by relevance

12345678910>>...189

/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/
DApplicationContext.java64 public ApplicationContext(Context context) { in ApplicationContext() argument
65 mContextRef = new WeakReference<>(context); in ApplicationContext()
70 Context context = mContextRef.get(); in getAssets() local
71 if (context != null) { in getAssets()
72 return context.getAssets(); in getAssets()
79 Context context = mContextRef.get(); in getResources() local
80 if (context != null) { in getResources()
81 return context.getResources(); in getResources()
88 Context context = mContextRef.get(); in getPackageManager() local
89 if (context != null) { in getPackageManager()
[all …]
/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/theme/
DAndroidColorScheme.kt40 class AndroidColorScheme(context: Context) {
41 val onSecondaryFixedVariant = getColor(context, R.attr.materialColorOnSecondaryFixedVariant)
42 val onTertiaryFixedVariant = getColor(context, R.attr.materialColorOnTertiaryFixedVariant)
43 val surfaceContainerLowest = getColor(context, R.attr.materialColorSurfaceContainerLowest)
44 val onPrimaryFixedVariant = getColor(context, R.attr.materialColorOnPrimaryFixedVariant)
45 val onSecondaryContainer = getColor(context, R.attr.materialColorOnSecondaryContainer)
46 val onTertiaryContainer = getColor(context, R.attr.materialColorOnTertiaryContainer)
47 val surfaceContainerLow = getColor(context, R.attr.materialColorSurfaceContainerLow)
48 val onPrimaryContainer = getColor(context, R.attr.materialColorOnPrimaryContainer)
49 val secondaryFixedDim = getColor(context, R.attr.materialColorSecondaryFixedDim)
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/dagger/
DFrameworkServicesModule.java143 static AccessibilityManager provideAccessibilityManager(Context context) { in provideAccessibilityManager() argument
144 return context.getSystemService(AccessibilityManager.class); in provideAccessibilityManager()
149 static ActivityManager provideActivityManager(Context context) { in provideActivityManager() argument
150 return context.getSystemService(ActivityManager.class); in provideActivityManager()
155 static AlarmManager provideAlarmManager(Context context) { in provideAlarmManager() argument
156 return context.getSystemService(AlarmManager.class); in provideAlarmManager()
161 static Optional<SystemUpdateManager> provideSystemUpdateManager(Context context) { in provideSystemUpdateManager() argument
162 return Optional.ofNullable(context.getSystemService(SystemUpdateManager.class)); in provideSystemUpdateManager()
168 static AmbientContextManager provideAmbientContextManager(Context context) { in provideAmbientContextManager() argument
169 return context.getSystemService(AmbientContextManager.class); in provideAmbientContextManager()
[all …]
/frameworks/av/media/libeffects/hapticgenerator/
DEffectHapticGenerator.cpp126 int HapticGenerator_Init(struct HapticGeneratorContext *context) { in HapticGenerator_Init() argument
127 context->itfe = &gHapticGeneratorInterface; in HapticGenerator_Init()
129 context->config.inputCfg.accessMode = EFFECT_BUFFER_ACCESS_READ; in HapticGenerator_Init()
130 context->config.inputCfg.channels = AUDIO_CHANNEL_OUT_STEREO; in HapticGenerator_Init()
131 context->config.inputCfg.format = AUDIO_FORMAT_PCM_FLOAT; in HapticGenerator_Init()
132 context->config.inputCfg.samplingRate = 0; in HapticGenerator_Init()
133 context->config.inputCfg.bufferProvider.getBuffer = nullptr; in HapticGenerator_Init()
134 context->config.inputCfg.bufferProvider.releaseBuffer = nullptr; in HapticGenerator_Init()
135 context->config.inputCfg.bufferProvider.cookie = nullptr; in HapticGenerator_Init()
136 context->config.inputCfg.mask = EFFECT_CONFIG_ALL; in HapticGenerator_Init()
[all …]
/frameworks/base/packages/CredentialManager/wear/src/com/android/credentialmanager/ui/theme/
DWearCredentialTonalPalette.kt121 internal fun dynamicTonalPalette(context: Context) = in dynamicTonalPalette()
124 neutral100 = ColorResourceHelper.getColor(context, R.color.system_neutral1_0), in dynamicTonalPalette()
125 neutral99 = ColorResourceHelper.getColor(context, R.color.system_neutral1_10), in dynamicTonalPalette()
126 neutral95 = ColorResourceHelper.getColor(context, R.color.system_neutral1_50), in dynamicTonalPalette()
127 neutral90 = ColorResourceHelper.getColor(context, R.color.system_neutral1_100), in dynamicTonalPalette()
128 neutral80 = ColorResourceHelper.getColor(context, R.color.system_neutral1_200), in dynamicTonalPalette()
129 neutral70 = ColorResourceHelper.getColor(context, R.color.system_neutral1_300), in dynamicTonalPalette()
130 neutral60 = ColorResourceHelper.getColor(context, R.color.system_neutral1_400), in dynamicTonalPalette()
131 neutral50 = ColorResourceHelper.getColor(context, R.color.system_neutral1_500), in dynamicTonalPalette()
132 neutral40 = ColorResourceHelper.getColor(context, R.color.system_neutral1_600), in dynamicTonalPalette()
[all …]
/frameworks/base/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/
DCarrierActionUtils.java60 public static void applyCarrierAction(int actionIdx, Intent intent, Context context) { in applyCarrierAction() argument
63 onEnableAllMeteredApns(intent, context); in applyCarrierAction()
66 onDisableAllMeteredApns(intent, context); in applyCarrierAction()
69 onDisableRadio(intent, context); in applyCarrierAction()
72 onEnableRadio(intent, context); in applyCarrierAction()
75 onShowCaptivePortalNotification(intent, context); in applyCarrierAction()
78 onShowNoDataServiceNotification(context); in applyCarrierAction()
81 onCancelAllNotifications(context); in applyCarrierAction()
84 onEnableDefaultURLHandler(context); in applyCarrierAction()
87 onDisableDefaultURLHandler(context); in applyCarrierAction()
[all …]
/frameworks/base/core/java/android/hardware/input/
DInputSettings.java107 public static int getPointerSpeed(Context context) { in getPointerSpeed() argument
108 return Settings.System.getInt(context.getContentResolver(), in getPointerSpeed()
125 public static void setPointerSpeed(Context context, int speed) { in setPointerSpeed() argument
130 Settings.System.putInt(context.getContentResolver(), in setPointerSpeed()
149 public static float getMaximumObscuringOpacityForTouch(Context context) { in getMaximumObscuringOpacityForTouch() argument
150 return Settings.Global.getFloat(context.getContentResolver(), in getMaximumObscuringOpacityForTouch()
182 @NonNull Context context, in setMaximumObscuringOpacityForTouch()
188 Settings.Global.putFloat(context.getContentResolver(), in setMaximumObscuringOpacityForTouch()
196 public static boolean isStylusEverUsed(@NonNull Context context) { in isStylusEverUsed() argument
197 return Settings.Global.getInt(context.getContentResolver(), in isStylusEverUsed()
[all …]
/frameworks/base/telephony/common/com/android/internal/telephony/
DTelephonyPermissions.java94 Context context, int subId, String callingPackage, @Nullable String callingFeatureId, in checkCallingOrSelfReadPhoneState() argument
96 return checkReadPhoneState(context, subId, Binder.getCallingPid(), Binder.getCallingUid(), in checkCallingOrSelfReadPhoneState()
102 Context context, int subId, String callingPackage, @Nullable String callingFeatureId, in checkCallingOrSelfReadPhoneStateNoThrow() argument
105 return checkCallingOrSelfReadPhoneState(context, subId, callingPackage, in checkCallingOrSelfReadPhoneStateNoThrow()
118 public static boolean checkInternetPermissionNoThrow(Context context, String message) { in checkInternetPermissionNoThrow() argument
120 context.enforcePermission(Manifest.permission.INTERNET, in checkInternetPermissionNoThrow()
136 Context context, String message) { in checkCallingOrSelfReadNonDangerousPhoneStateNoThrow() argument
138 context.enforcePermission( in checkCallingOrSelfReadNonDangerousPhoneStateNoThrow()
170 Context context, int subId, int pid, int uid, String callingPackage, in checkReadPhoneState() argument
173 context.enforcePermission( in checkReadPhoneState()
[all …]
/frameworks/base/core/jni/
Druntime_native_boot-flags-test.sh66 local context=$1
70 say "[$context] Check that the device configuration flag is set..."
81 local context=$1
84 say "[$context] Check that the device configuration flag is not set..."
108 local context=$1
112 say "[$context] Check that the persistent system property is set..."
123 local context=$1
126 say "[$context] Check that the persistent system property is not set..."
147 local context=$1
151 "[$context] Check that all zygote processes are passed \`$runtime_option\` as runtime option..."
[all …]
/frameworks/base/telephony/java/android/telephony/
DTelephonyFrameworkInitializer.java79 private static boolean hasSystemFeature(Context context, String feature) { in hasSystemFeature() argument
92 return context.getPackageManager().hasSystemFeature(feature); in hasSystemFeature()
106 context -> new TelephonyManager(context) in registerServiceWrappers()
111 context -> new SubscriptionManager(context) in registerServiceWrappers()
116 context -> hasSystemFeature(context, PackageManager.FEATURE_TELEPHONY_SUBSCRIPTION) in registerServiceWrappers()
117 ? new CarrierConfigManager(context) : null in registerServiceWrappers()
122 context -> hasSystemFeature(context, PackageManager.FEATURE_TELEPHONY_EUICC) in registerServiceWrappers()
123 ? new EuiccManager(context) : null in registerServiceWrappers()
128 context -> hasSystemFeature(context, PackageManager.FEATURE_TELEPHONY_EUICC) in registerServiceWrappers()
129 ? new EuiccCardManager(context) : null in registerServiceWrappers()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/log/
DOperationContextExtTest.java58 OperationContextExt context = new OperationContextExt(false); in hasAidlContext() local
59 assertThat(context.toAidlContext()).isNotNull(); in hasAidlContext()
63 context = new OperationContextExt(aidlContext, false, BiometricAuthenticator.TYPE_NONE); in hasAidlContext()
64 assertThat(context.toAidlContext()).isSameInstanceAs(aidlContext); in hasAidlContext()
75 assertThat(context.getId()).isEqualTo(id); in hasAidlContext()
76 assertThat(context.isAod()).isTrue(); in hasAidlContext()
77 assertThat(context.isCrypto()).isTrue(); in hasAidlContext()
78 assertThat(context.getReason()).isEqualTo(reason); in hasAidlContext()
79 assertThat(context.getDisplayState()).isEqualTo(displayState); in hasAidlContext()
84 OperationContextExt context = new OperationContextExt(false); in hasNoOrderWithoutSession() local
[all …]
/frameworks/base/core/java/android/content/
DPermissionChecker.java150 public static int checkPermissionForDataDelivery(@NonNull Context context, in checkPermissionForDataDelivery() argument
153 return checkPermissionForDataDelivery(context, permission, pid, new AttributionSource(uid, in checkPermissionForDataDelivery()
193 public static int checkPermissionForDataDelivery(@NonNull Context context, in checkPermissionForDataDelivery() argument
196 return checkPermissionForDataDelivery(context, permission, pid, uid, in checkPermissionForDataDelivery()
231 public static int checkPermissionForDataDeliveryFromDataSource(@NonNull Context context, in checkPermissionForDataDeliveryFromDataSource() argument
234 return checkPermissionForDataDeliveryCommon(context, permission, attributionSource, in checkPermissionForDataDeliveryFromDataSource()
268 public static int checkPermissionForDataDelivery(@NonNull Context context, in checkPermissionForDataDelivery() argument
271 return checkPermissionForDataDelivery(context, permission, pid, attributionSource, in checkPermissionForDataDelivery()
306 public static int checkPermissionForDataDelivery(@NonNull Context context, in checkPermissionForDataDelivery() argument
309 return checkPermissionForDataDeliveryCommon(context, permission, attributionSource, in checkPermissionForDataDelivery()
[all …]
/frameworks/base/core/java/com/android/internal/accessibility/dialog/
DAccessibilityTargetHelper.java65 public static List<AccessibilityTarget> getTargets(Context context, in getTargets() argument
68 final List<AccessibilityTarget> installedTargets = getInstalledTargets(context, in getTargets()
72 final AccessibilityManager am = (AccessibilityManager) context.getSystemService( in getTargets()
108 public static List<AccessibilityTarget> getInstalledTargets(Context context, in getInstalledTargets() argument
111 targets.addAll(getAccessibilityFilteredTargets(context, shortcutType)); in getInstalledTargets()
112 targets.addAll(getAllowListingFeatureTargets(context, shortcutType)); in getInstalledTargets()
117 private static List<AccessibilityTarget> getAccessibilityFilteredTargets(Context context, in getAccessibilityFilteredTargets() argument
120 getAccessibilityServiceTargets(context, shortcutType); in getAccessibilityFilteredTargets()
122 getAccessibilityActivityTargets(context, shortcutType); in getAccessibilityFilteredTargets()
150 private static List<AccessibilityTarget> getAccessibilityServiceTargets(Context context, in getAccessibilityServiceTargets() argument
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/util/
DNotificationChannelController.java65 private static void createAll(Context context) { in createAll() argument
68 context.getText(R.string.notification_channel_network_alert), in createAll()
77 context.getText(R.string.notification_channel_mobile_data_status), in createAll()
84 context.getText(R.string.notification_channel_sim), in createAll()
91 context.getText(R.string.notification_channel_call_forward), in createAll()
93 migrateCallFowardNotificationChannel(context, callforwardChannel); in createAll()
95 context.getSystemService(NotificationManager.class) in createAll()
98 context.getText(R.string.notification_channel_sms), in createAll()
101 context.getText(R.string.notification_channel_wfc), in createAll()
104 context.getText(R.string.notification_channel_sim_high_prio), in createAll()
[all …]
/frameworks/base/core/java/com/android/internal/view/
DRotationPolicy.java57 public static boolean isRotationSupported(Context context) { in isRotationSupported() argument
58 PackageManager pm = context.getPackageManager(); in isRotationSupported()
62 && context.getResources().getBoolean( in isRotationSupported()
74 public static int getRotationLockOrientation(Context context) { in getRotationLockOrientation() argument
75 if (areAllRotationsAllowed(context)) { in getRotationLockOrientation()
78 final DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in getRotationLockOrientation()
80 context.getResources().getConfiguration().windowConfiguration.getRotation(); in getRotationLockOrientation()
90 public static boolean isRotationLockToggleVisible(Context context) { in isRotationLockToggleVisible() argument
91 return isRotationSupported(context) && in isRotationLockToggleVisible()
92 Settings.System.getIntForUser(context.getContentResolver(), in isRotationLockToggleVisible()
[all …]
/frameworks/base/core/java/android/app/admin/
DDeviceAdminReceiver.java565 public @NonNull DevicePolicyManager getManager(@NonNull Context context) { in getManager() argument
569 mManager = (DevicePolicyManager)context.getSystemService( in getManager()
579 public @NonNull ComponentName getWho(@NonNull Context context) { in getWho() argument
583 mWho = new ComponentName(context, getClass()); in getWho()
600 public void onEnabled(@NonNull Context context, @NonNull Intent intent) { in onEnabled() argument
602 Log.v(TAG, getClass().getName() + ".onEnabled() on user " + context.getUserId()); in onEnabled()
617 public @Nullable CharSequence onDisableRequested(@NonNull Context context, in onDisableRequested() argument
621 + context.getUserId()); in onDisableRequested()
634 public void onDisabled(@NonNull Context context, @NonNull Intent intent) { in onDisabled() argument
636 Log.v(TAG, getClass().getName() + ".onDisabled() on user " + context.getUserId()); in onDisabled()
[all …]
/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/theme/
DSettingsTonalPalette.kt200 internal fun dynamicTonalPalette(context: Context) = SettingsTonalPalette( in tonalPalette()
202 neutral100 = ColorResourceHelper.getColor(context, R.color.system_neutral1_0), in tonalPalette()
203 neutral99 = ColorResourceHelper.getColor(context, R.color.system_neutral1_10), in tonalPalette()
204 neutral95 = ColorResourceHelper.getColor(context, R.color.system_neutral1_50), in tonalPalette()
205 neutral90 = ColorResourceHelper.getColor(context, R.color.system_neutral1_100), in tonalPalette()
206 neutral80 = ColorResourceHelper.getColor(context, R.color.system_neutral1_200), in tonalPalette()
207 neutral70 = ColorResourceHelper.getColor(context, R.color.system_neutral1_300), in tonalPalette()
208 neutral60 = ColorResourceHelper.getColor(context, R.color.system_neutral1_400), in tonalPalette()
209 neutral50 = ColorResourceHelper.getColor(context, R.color.system_neutral1_500), in tonalPalette()
210 neutral40 = ColorResourceHelper.getColor(context, R.color.system_neutral1_600), in tonalPalette()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DDecorContext.java68 final Context context = phoneWindow.getContext(); in setPhoneWindow() local
69 mContext = new WeakReference<>(context); in setPhoneWindow()
70 mResources = context.getResources(); in setPhoneWindow()
78 final Context context = mContext.get(); in getSystemService() local
80 if (context != null && mContentCaptureManager == null) { in getSystemService()
81 mContentCaptureManager = (ContentCaptureManager) context.getSystemService(name); in getSystemService()
87 return (context != null) ? context.getSystemService(name) : super.getSystemService(name); in getSystemService()
92 Context context = mContext.get(); in getResources() local
95 if (context != null) { in getResources()
96 mResources = context.getResources(); in getResources()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/fuelgauge/
DBatterySaverUtils.java98 public Parameters(Context context) { in Parameters() argument
99 mContext = context; in Parameters()
122 public static synchronized boolean setPowerSaveMode(Context context, in setPowerSaveMode() argument
127 final ContentResolver cr = context.getContentResolver(); in setPowerSaveMode()
132 && maybeShowBatterySaverConfirmation(context, confirmationExtras)) { in setPowerSaveMode()
136 setBatterySaverConfirmationAcknowledged(context); in setPowerSaveMode()
139 if (context.getSystemService(PowerManager.class).setPowerSaveModeEnabled(enable)) { in setPowerSaveMode()
145 final Parameters parameters = new Parameters(context); in setPowerSaveMode()
152 sendSystemUiBroadcast(context, ACTION_SHOW_AUTO_SAVER_SUGGESTION, in setPowerSaveMode()
156 recordBatterySaverEnabledReason(context, enable, reason); in setPowerSaveMode()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DRestrictedLockUtilsInternal.java80 public static Drawable getRestrictedPadlock(Context context) { in getRestrictedPadlock() argument
81 Drawable restrictedPadlock = context.getDrawable(android.R.drawable.ic_info); in getRestrictedPadlock()
82 final int iconSize = context.getResources().getDimensionPixelSize( in getRestrictedPadlock()
85 TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.colorAccent}); in getRestrictedPadlock()
100 public static Intent checkIfRequiresEnhancedConfirmation(@NonNull Context context, in checkIfRequiresEnhancedConfirmation() argument
108 EnhancedConfirmationManager ecManager = (EnhancedConfirmationManager) context in checkIfRequiresEnhancedConfirmation()
127 public static boolean isEnhancedConfirmationRestricted(@NonNull Context context, in isEnhancedConfirmationRestricted() argument
132 return context.getSystemService(EnhancedConfirmationManager.class) in isEnhancedConfirmationRestricted()
143 int uid = context.getPackageManager().getPackageUid(packageName, 0); in isEnhancedConfirmationRestricted()
144 final int mode = context.getSystemService(AppOpsManager.class) in isEnhancedConfirmationRestricted()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DPrefs.java126 public static boolean getBoolean(Context context, @Key String key, boolean defaultValue) { in getBoolean() argument
127 return get(context).getBoolean(key, defaultValue); in getBoolean()
130 public static void putBoolean(Context context, @Key String key, boolean value) { in putBoolean() argument
131 get(context).edit().putBoolean(key, value).apply(); in putBoolean()
134 public static int getInt(Context context, @Key String key, int defaultValue) { in getInt() argument
135 return get(context).getInt(key, defaultValue); in getInt()
138 public static void putInt(Context context, @Key String key, int value) { in putInt() argument
139 get(context).edit().putInt(key, value).apply(); in putInt()
142 public static long getLong(Context context, @Key String key, long defaultValue) { in getLong() argument
143 return get(context).getLong(key, defaultValue); in getLong()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/security/
DCellularNetworkSecuritySafetySource.java97 public static synchronized CellularNetworkSecuritySafetySource getInstance(Context context) { in getInstance() argument
100 new SafetyCenterManagerWrapper(context)); in getInstance()
113 public synchronized void setNullCipherIssueEnabled(Context context, boolean enabled) { in setNullCipherIssueEnabled() argument
116 updateSafetyCenter(context); in setNullCipherIssueEnabled()
121 Context context, int subId, @NullCipherState int nullCipherState) { in setNullCipherState() argument
123 updateSafetyCenter(context); in setNullCipherState()
129 public synchronized void clearNullCipherState(Context context, int subId) { in clearNullCipherState() argument
131 updateSafetyCenter(context); in clearNullCipherState()
137 public synchronized void setIdentifierDisclosureIssueEnabled(Context context, boolean enabled) { in setIdentifierDisclosureIssueEnabled() argument
143 updateSafetyCenter(context); in setIdentifierDisclosureIssueEnabled()
[all …]
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/test/widgets/
DCustomImageView.java26 public CustomImageView(Context context) { in CustomImageView() argument
27 super(context); in CustomImageView()
28 init(context); in CustomImageView()
31 public CustomImageView(Context context, AttributeSet attrs) { in CustomImageView() argument
32 super(context, attrs); in CustomImageView()
33 init(context); in CustomImageView()
36 public CustomImageView(Context context, AttributeSet attrs, int defStyleAttr) { in CustomImageView() argument
37 super(context, attrs, defStyleAttr); in CustomImageView()
38 init(context); in CustomImageView()
41 public CustomImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { in CustomImageView() argument
[all …]
DHtmlTextView.java25 public HtmlTextView(Context context) { in HtmlTextView() argument
26 super(context); in HtmlTextView()
27 init(context); in HtmlTextView()
30 public HtmlTextView(Context context, AttributeSet attrs) { in HtmlTextView() argument
31 super(context, attrs); in HtmlTextView()
32 init(context); in HtmlTextView()
35 public HtmlTextView(Context context, AttributeSet attrs, int defStyleAttr) { in HtmlTextView() argument
36 super(context, attrs, defStyleAttr); in HtmlTextView()
37 init(context); in HtmlTextView()
40 public HtmlTextView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { in HtmlTextView() argument
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/
DDeviceItemFactory.kt43 context: Context, in isFilterMatched()
48 abstract fun create(context: Context, cachedDevice: CachedBluetoothDevice): DeviceItem in isFilterMatched()
53 context: Context, in isFilterMatched()
67 BluetoothUtils.getBtClassDrawableWithDescription(context, cachedDevice).let { in isFilterMatched()
81 context: Context, in isFilterMatched()
89 override fun create(context: Context, cachedDevice: CachedBluetoothDevice): DeviceItem { in create()
91 context, in create()
96 context.getString(actionAccessibilityLabelDisconnect), in create()
106 context: Context, in isFilterMatched()
114 override fun create(context: Context, cachedDevice: CachedBluetoothDevice): DeviceItem { in create()
[all …]

12345678910>>...189