Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca1b7b30 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Make change and version bump to r_aml_300800500 for mainline module file:...

Make change and version bump to r_aml_300800500 for mainline module file: packages/Tethering/apex/manifest.json

Change-Id: I3fa94cc97b8b3403942d23433da6583e355fba34
parents 16e6e822 1b4e9ad6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.extservices",
  "version": 300800400
  "version": 300800500
}
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.permission",
  "version": 300800400
  "version": 300800500
}
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.os.statsd",
  "version": 300800400
  "version": 300800500
}
+20 −11
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import static com.android.internal.accessibility.common.ShortcutConstants.Shortc
import static com.android.internal.accessibility.dialog.AccessibilityTargetHelper.createEnableDialogContentView;
import static com.android.internal.accessibility.dialog.AccessibilityTargetHelper.getInstalledTargets;
import static com.android.internal.accessibility.dialog.AccessibilityTargetHelper.getTargets;
import static com.android.internal.accessibility.util.AccessibilityUtils.isUserSetupCompleted;

import android.annotation.Nullable;
import android.app.Activity;
@@ -61,18 +62,8 @@ public class AccessibilityShortcutChooserActivity extends Activity {
        }

        mTargets.addAll(getTargets(this, mShortcutType));

        final String selectDialogTitle =
                getString(R.string.accessibility_select_shortcut_menu_title);
        mTargetAdapter = new ShortcutTargetAdapter(mTargets);
        mMenuDialog = new AlertDialog.Builder(this)
                .setTitle(selectDialogTitle)
                .setAdapter(mTargetAdapter, /* listener= */ null)
                .setPositiveButton(
                        getString(R.string.edit_accessibility_shortcut_menu_button),
                        /* listener= */ null)
                .setOnDismissListener(dialog -> finish())
                .create();
        mMenuDialog = createMenuDialog();
        mMenuDialog.setOnShowListener(dialog -> updateDialogListeners());
        mMenuDialog.show();
    }
@@ -154,4 +145,22 @@ public class AccessibilityShortcutChooserActivity extends Activity {
        mMenuDialog.getListView().setOnItemClickListener(
                isEditMenuMode ? this::onTargetChecked : this::onTargetSelected);
    }

    private AlertDialog createMenuDialog() {
        final String dialogTitle =
                getString(R.string.accessibility_select_shortcut_menu_title);

        final AlertDialog.Builder builder = new AlertDialog.Builder(this)
                .setTitle(dialogTitle)
                .setAdapter(mTargetAdapter, /* listener= */ null)
                .setOnDismissListener(dialog -> finish());

        if (isUserSetupCompleted(this)) {
            final String positiveButtonText =
                    getString(R.string.edit_accessibility_shortcut_menu_button);
            builder.setPositiveButton(positiveButtonText, /* listener= */ null);
        }

        return builder.create();
    }
}
+12 −0
Original line number Diff line number Diff line
@@ -156,4 +156,16 @@ public final class AccessibilityUtils {

        return false;
    }

    /**
     * Indicates whether the current user has completed setup via the setup wizard.
     * {@link android.provider.Settings.Secure#USER_SETUP_COMPLETE}
     *
     * @return {@code true} if the setup is completed.
     */
    public static boolean isUserSetupCompleted(Context context) {
        return Settings.Secure.getIntForUser(context.getContentResolver(),
                Settings.Secure.USER_SETUP_COMPLETE, /* def= */ 0, UserHandle.USER_CURRENT)
                != /* false */ 0;
    }
}
Loading