import android.app.Activity;
import android.os.Bundle;
import android.view.View;
-import android.widget.TextView;
import com.android.internal.R;
*/
public class CantAddAccountActivity extends Activity {
public static final String EXTRA_ERROR_CODE = "android.accounts.extra.ERROR_CODE";
- public static final int MISSING = -1;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.app_not_authorized);
-
- int errorCode = getIntent().getIntExtra(EXTRA_ERROR_CODE, MISSING);
- if (errorCode != MISSING) {
- TextView errorText = (TextView) findViewById(R.id.description);
- switch (errorCode) {
- case AccountManager.ERROR_CODE_USER_RESTRICTED:
- errorText.setText(R.string.app_no_restricted_accounts);
- break;
- default:
- // TODO: Get better message. See: http://b/14642886
- errorText.setText(R.string.error_message_title);
- }
- }
}
public void onCancelButtonClicked(View view) {
android:paddingBottom="16dip"
android:paddingStart="16dip"
android:paddingEnd="16dip"
- android:text="@string/app_no_restricted_accounts"
+ android:text="@string/error_message_change_not_allowed"
/>
<!-- Horizontal divider line -->
<string name="owner_name" msgid="3879126011135546571">Owner</string>
<!-- Error message title [CHAR LIMIT=35] -->
<string name="error_message_title">Error</string>
- <!-- Message informing user that app is not permitted to access accounts. [CHAR LIMIT=none] -->
- <string name="app_no_restricted_accounts">This app doesn\'t support accounts for restricted profiles</string>
+ <!-- Message informing user that the change was disallowed by an administrator. [CHAR LIMIT=none] -->
+ <string name="error_message_change_not_allowed">This change isn\'t allowed by your administrator</string>
<!-- Message informing user that the requested activity could not be found [CHAR LIMIT=none] -->
<string name="app_not_found">No application found to handle this action</string>
<string name="revoke">Revoke</string>
<java-symbol type="string" name="config_customResolverActivity" />
<java-symbol type="string" name="config_appsAuthorizedForSharedAccounts" />
<java-symbol type="string" name="error_message_title" />
- <java-symbol type="string" name="app_no_restricted_accounts" />
+ <java-symbol type="string" name="error_message_change_not_allowed" />
<java-symbol type="string" name="action_bar_home_description_format" />
<java-symbol type="string" name="action_bar_home_subtitle_description_format" />
<java-symbol type="string" name="wireless_display_route_description" />