Home
last modified time | relevance | path

Searched refs:policy (Results 1 – 25 of 50) sorted by relevance

12

/packages/apps/Email/provider_src/com/android/email/
DSecurityPolicy.java140 Policy policy = new Policy(); in computeAggregatePolicy() local
143 policy.restore(c); in computeAggregatePolicy()
145 LogUtils.d(TAG, "Aggregate from: " + policy); in computeAggregatePolicy()
148 Math.max(policy.mPasswordMinLength, aggregate.mPasswordMinLength); in computeAggregatePolicy()
149 aggregate.mPasswordMode = Math.max(policy.mPasswordMode, aggregate.mPasswordMode); in computeAggregatePolicy()
150 if (policy.mPasswordMaxFails > 0) { in computeAggregatePolicy()
152 Math.min(policy.mPasswordMaxFails, aggregate.mPasswordMaxFails); in computeAggregatePolicy()
154 if (policy.mMaxScreenLockTime > 0) { in computeAggregatePolicy()
155 aggregate.mMaxScreenLockTime = Math.min(policy.mMaxScreenLockTime, in computeAggregatePolicy()
158 if (policy.mPasswordHistory > 0) { in computeAggregatePolicy()
[all …]
/packages/apps/Email/tests/src/com/android/email/provider/
DPolicyTests.java96 Policy policy = new Policy(); in testSetAndClearAccountPolicy() local
97 SecurityPolicy.setAccountPolicy(mMockContext, account, policy, securitySyncKey); in testSetAndClearAccountPolicy()
105 assertEquals(policy, dbPolicy); in testSetAndClearAccountPolicy()
191 Policy policy = new Policy(); in testParcel() local
192 policy.mPasswordMode = Policy.PASSWORD_MODE_STRONG; in testParcel()
193 policy.mPasswordMinLength = 6; in testParcel()
194 policy.mPasswordComplexChars = 5; in testParcel()
195 policy.mPasswordExpirationDays = 4; in testParcel()
196 policy.mPasswordHistory = 3; in testParcel()
197 policy.mPasswordMaxFails = 8; in testParcel()
[all …]
/packages/apps/Email/emailcommon/src/com/android/emailcommon/service/
DLegacyPolicySet.java69 Policy policy = new Policy(); in flagsToPolicy() local
70 policy.mPasswordMode = ((int) (flags & PASSWORD_MODE_MASK)) >> PASSWORD_MODE_SHIFT; in flagsToPolicy()
71 policy.mPasswordMinLength = (int) ((flags & PASSWORD_LENGTH_MASK) >> PASSWORD_LENGTH_SHIFT); in flagsToPolicy()
72 policy.mPasswordMaxFails = in flagsToPolicy()
74 policy.mPasswordComplexChars = in flagsToPolicy()
76 policy.mPasswordHistory = (int) ((flags & PASSWORD_HISTORY_MASK) >> PASSWORD_HISTORY_SHIFT); in flagsToPolicy()
77 policy.mPasswordExpirationDays = in flagsToPolicy()
79 policy.mMaxScreenLockTime = in flagsToPolicy()
81 policy.mRequireRemoteWipe = 0 != (flags & REQUIRE_REMOTE_WIPE); in flagsToPolicy()
82 policy.mRequireEncryption = 0 != (flags & REQUIRE_ENCRYPTION); in flagsToPolicy()
[all …]
DPolicyServiceProxy.java71 public void setAccountPolicy(final long accountId, final Policy policy, in setAccountPolicy() argument
73 setAccountPolicy2(accountId, policy, securityKey, true /* notify */); in setAccountPolicy()
77 public void setAccountPolicy2(final long accountId, final Policy policy, in setAccountPolicy2() argument
82 mService.setAccountPolicy2(accountId, policy, securityKey, notify); in setAccountPolicy2()
151 public static void setAccountPolicy(Context context, long accountId, Policy policy, in setAccountPolicy() argument
153 setAccountPolicy2(context, accountId, policy, securityKey, true /* notify */); in setAccountPolicy()
156 public static void setAccountPolicy2(Context context, long accountId, Policy policy, in setAccountPolicy2() argument
159 new PolicyServiceProxy(context).setAccountPolicy2(accountId, policy, securityKey, in setAccountPolicy2()
DIPolicyService.aidl24 void setAccountPolicy(long accountId, in Policy policy, String securityKey); in setAccountPolicy() argument
26 void setAccountPolicy2(long accountId, in Policy policy, String securityKey, boolean notify); in setAccountPolicy2() argument
/packages/apps/Email/tests/src/com/android/email/
DSecurityPolicyTests.java112 Policy policy = new Policy(); in setupPolicy() local
113 policy.mPasswordMinLength = minPasswordLength; in setupPolicy()
114 policy.mPasswordMode = passwordMode; in setupPolicy()
115 policy.mPasswordMaxFails = maxPasswordFails; in setupPolicy()
116 policy.mMaxScreenLockTime = maxScreenLockTime; in setupPolicy()
117 policy.mRequireRemoteWipe = requireRemoteWipe; in setupPolicy()
118 policy.mPasswordExpirationDays = passwordExpirationDays; in setupPolicy()
119 policy.mPasswordHistory = passwordHistory; in setupPolicy()
120 policy.mPasswordComplexChars = passwordComplexChars; in setupPolicy()
121 policy.mRequireEncryption = requireEncryption; in setupPolicy()
[all …]
DMockVendorPolicy.java29 public static Bundle getPolicy(String policy, Bundle args) { in getPolicy() argument
30 passedPolicy = policy; in getPolicy()
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/utils/
Dedit_distance.h30 AK_FORCE_INLINE static float getEditDistance(const EditDistancePolicy *const policy) { in getEditDistance() argument
31 const int beforeLength = policy->getString0Length(); in getEditDistance()
32 const int afterLength = policy->getString1Length(); in getEditDistance()
35 dp[(afterLength + 1) * i] = i * policy->getInsertionCost(i - 1, -1); in getEditDistance()
38 dp[i] = i * policy->getDeletionCost(-1, i - 1); in getEditDistance()
44 dp[(afterLength + 1) * i + (j + 1)] + policy->getInsertionCost(i, j), in getEditDistance()
46 dp[(afterLength + 1) * (i + 1) + j] + policy->getDeletionCost(i, j), in getEditDistance()
47 dp[(afterLength + 1) * i + j] + policy->getSubstitutionCost(i, j))); in getEditDistance()
48 if (policy->allowTransposition(i, j)) { in getEditDistance()
52 + policy->getTranspositionCost(i, j)); in getEditDistance()
/packages/services/Car/service/src/com/android/car/pm/
DCarPackageManagerService.java91 public void setAppBlockingPolicy(String packageName, CarAppBlockingPolicy policy, int flags) { in setAppBlockingPolicy() argument
95 doSetAppBlockingPolicy(packageName, policy, flags, true /*setNow*/); in setAppBlockingPolicy()
98 private void doSetAppBlockingPolicy(String packageName, CarAppBlockingPolicy policy, int flags, in doSetAppBlockingPolicy() argument
106 if (policy == null) { in doSetAppBlockingPolicy()
114 mHandler.requestUpdatingPolicy(packageName, policy, flags); in doSetAppBlockingPolicy()
118 synchronized (policy) { in doSetAppBlockingPolicy()
120 policy.wait(); in doSetAppBlockingPolicy()
180 for (ClientPolicy policy : mClientPolicies.values()) { in searchFromBlacklistsLocked()
181 AppBlockingPackageInfoWrapper wrapper = policy.blacklistsMap.get(packageName); in searchFromBlacklistsLocked()
190 for (ClientPolicy policy : mClientPolicies.values()) { in searchFromWhitelistsLocked()
[all …]
DAppBlockingPolicyProxy.java108 ICarAppBlockingPolicy policy = null; in onServiceConnected() local
112 policy = mPolicyService; in onServiceConnected()
113 if (policy == null) { in onServiceConnected()
154 public void setAppBlockingPolicy(CarAppBlockingPolicy policy) { in setAppBlockingPolicy() argument
156 if (policy == null) { in setAppBlockingPolicy()
160 mService.onPolicyConnectionAndSet(AppBlockingPolicyProxy.this, policy); in setAppBlockingPolicy()
/packages/apps/Settings/src/com/android/settings/datausage/
DChartDataUsagePreference.java128 private void bindNetworkPolicy(UsageView chart, NetworkPolicy policy, int top) { in bindNetworkPolicy() argument
132 if (policy == null) { in bindNetworkPolicy()
136 if (policy.limitBytes != NetworkPolicy.LIMIT_DISABLED) { in bindNetworkPolicy()
138 labels[2] = getLabel(policy.limitBytes, R.string.data_usage_sweep_limit, mLimitColor); in bindNetworkPolicy()
141 if (policy.warningBytes != NetworkPolicy.WARNING_DISABLED) { in bindNetworkPolicy()
142 chart.setDividerLoc((int) (policy.warningBytes / RESOLUTION)); in bindNetworkPolicy()
143 float weight = policy.warningBytes / RESOLUTION / (float) top; in bindNetworkPolicy()
147 labels[1] = getLabel(policy.warningBytes, R.string.data_usage_sweep_warning, in bindNetworkPolicy()
163 public void setNetworkPolicy(NetworkPolicy policy) { in setNetworkPolicy() argument
164 mPolicy = policy; in setNetworkPolicy()
DBillingCycleSettings.java92 NetworkPolicy policy = services.mPolicyEditor.getPolicy(mNetworkTemplate); in updatePrefs() local
93 mBillingCycle.setSummary(getString(R.string.billing_cycle_summary, policy != null ? in updatePrefs()
94 policy.cycleDay : 1)); in updatePrefs()
95 mDataWarning.setSummary(Formatter.formatFileSize(getContext(), policy != null in updatePrefs()
96 ? policy.warningBytes : DataUsageController.DEFAULT_WARNING_LEVEL)); in updatePrefs()
97 if (policy != null && policy.limitBytes != LIMIT_DISABLED) { in updatePrefs()
98 mDataLimit.setSummary(Formatter.formatFileSize(getContext(), policy.limitBytes)); in updatePrefs()
315 final NetworkPolicy policy = parent.services.mPolicyEditor in show()
317 if (policy == null) return; in show()
321 final long minLimitBytes = (long) (policy.warningBytes * FLOAT); in show()
DCycleAdapter.java68 public boolean updateCycleList(NetworkPolicy policy, ChartData chartData) { in updateCycleList() argument
89 if (policy != null) { in updateCycleList()
91 long cycleEnd = computeNextCycleBoundary(historyEnd, policy); in updateCycleList()
95 final long cycleStart = computeLastCycleBoundary(cycleEnd, policy); in updateCycleList()
DDataUsageMeteredSettings.java135 final NetworkPolicy policy = mPolicyEditor.getPolicyMaybeUnquoted(template); in MeteredPreference() local
136 if (policy != null) { in MeteredPreference()
137 if (policy.limitBytes != LIMIT_DISABLED) { in MeteredPreference()
141 setChecked(policy.metered); in MeteredPreference()
/packages/services/Car/tests/carservice_test/src/com/android/support/car/test/
DCarPackageManagerTest.java90 CarAppBlockingPolicy policy = new CarAppBlockingPolicy(new AppBlockingPackageInfo[] { info } in testSettingWhitelist() local
93 mCarPm.setAppBlockingPolicy(thisPackage, policy, in testSettingWhitelist()
103 policy = new CarAppBlockingPolicy(new AppBlockingPackageInfo[] { info } in testSettingWhitelist()
105 mCarPm.setAppBlockingPolicy(thisPackage, policy, in testSettingWhitelist()
115 policy = new CarAppBlockingPolicy(new AppBlockingPackageInfo[] { info } in testSettingWhitelist()
117 mCarPm.setAppBlockingPolicy(thisPackage, policy, in testSettingWhitelist()
128 policy = new CarAppBlockingPolicy(new AppBlockingPackageInfo[] { info } in testSettingWhitelist()
130 mCarPm.setAppBlockingPolicy(thisPackage, policy, in testSettingWhitelist()
/packages/apps/Email/provider_src/com/android/email/service/
DPolicyService.java41 public boolean isActive(Policy policy) {
43 return mSecurityPolicy.isActive(policy);
70 public void setAccountPolicy(long accountId, Policy policy, String securityKey) {
71 setAccountPolicy2(accountId, policy, securityKey, true /* notify */);
75 public void setAccountPolicy2(long accountId, Policy policy, String securityKey,
78 mSecurityPolicy.setAccountPolicy(accountId, policy, securityKey, notify);
/packages/inputmethods/LatinIME/native/jni/tests/suggest/policyimpl/utils/
Ddamerau_levenshtein_edit_distance_policy_test.cpp32 DamerauLevenshteinEditDistancePolicy policy(codePoints0.data(), codePoints0.size(), in TEST() local
35 EXPECT_EQ(static_cast<int>(codePoints0.size()), policy.getString0Length()); in TEST()
36 EXPECT_EQ(static_cast<int>(codePoints1.size()), policy.getString1Length()); in TEST()
40 DamerauLevenshteinEditDistancePolicy policy(codePoints0.data(), codePoints0.size(), in getEditDistance() local
42 return EditDistance::getEditDistance(&policy); in getEditDistance()
/packages/experimental/StrictModeTest/src/com/android/strictmodetest/
DServiceBase.java59 int policy = BlockGuard.getThreadPolicy().getPolicyMask();
60 Log.d(TAG, "Doing a one-way disk write; policy is: " + policy);
69 int policy = BlockGuard.getThreadPolicy().getPolicyMask();
70 Log.d(TAG, "Doing a diskWrite; policy is: " + policy, new IAmHereException());
DStrictModeActivity.java140 BlockGuard.Policy policy = BlockGuard.getThreadPolicy(); in onCreate()
142 policy.onWriteToDisk(); in onCreate()
267 int policy; in onCreate()
269 policy = mLocalServiceConn.stub.getThreadPolicy(); in onCreate()
270 Log.d(TAG, "local service policy: " + policy); in onCreate()
271 policy = mRemoteServiceConn.stub.getThreadPolicy(); in onCreate()
272 Log.d(TAG, "remote service policy: " + policy); in onCreate()
387 StrictMode.ThreadPolicy policy = newPolicy.build(); in onCreate()
388 Log.v(TAG, "Changing policy to: " + policy); in onCreate()
389 StrictMode.setThreadPolicy(policy); in onCreate()
/packages/services/Car/vehicle_network_service/
DVehiclePropertyAccessControl.cpp260 bool VehiclePropertyAccessControl::process(const char* policy) { in process() argument
264 doc = xmlReadFile(policy, NULL, 0); in process()
266 ALOGE("Could not find %s\n", policy); in process()
272 ALOGE("Not a valid config file %s\n", policy); in process()
278 ALOGE("Not a valid config file %s\n", policy); in process()
/packages/services/Car/tests/carservice_test/src/com/android/car/test/
DTestAppBlockingPolicyService.java62 CarAppBlockingPolicy policy = new CarAppBlockingPolicy(whitelists, null); in getAppBlockingPolicy() local
63 Log.i(TAG, "getAppBlockingPolicy, passing policy:" + policy); in getAppBlockingPolicy()
64 return policy; in getAppBlockingPolicy()
/packages/apps/Settings/src/com/android/settings/widget/
DChartDataUsageView.java168 public void bindNetworkPolicy(NetworkPolicy policy) { in bindNetworkPolicy() argument
169 if (policy == null) { in bindNetworkPolicy()
177 if (policy.limitBytes != NetworkPolicy.LIMIT_DISABLED) { in bindNetworkPolicy()
180 mSweepLimit.setValue(policy.limitBytes); in bindNetworkPolicy()
187 if (policy.warningBytes != NetworkPolicy.WARNING_DISABLED) { in bindNetworkPolicy()
189 mSweepWarning.setValue(policy.warningBytes); in bindNetworkPolicy()
/packages/services/Car/tests/vehiclenetworkservice_unit_tests/
DVehiclePropertyAccessControlForTesting.cpp37 bool VehiclePropertyAccessControlForTesting::process(const char* policy) { in process() argument
38 return VehiclePropertyAccessControl::process(policy); in process()
/packages/services/Car/car-lib/src/android/car/content/pm/
DCarAppBlockingPolicyService.java76 CarAppBlockingPolicy policy = CarAppBlockingPolicyService.this.getAppBlockingPolicy(); in setAppBlockingPolicySetter() local
78 setter.setAppBlockingPolicy(policy); in setAppBlockingPolicySetter()
/packages/apps/Settings/src/com/android/settings/notification/
DAppNotificationSettings.java86 NotificationManager.Policy policy = in onCreate() local
88 … mDndVisualEffectsSuppressed = policy == null ? false : policy.suppressedVisualEffects != 0; in onCreate()

12