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

Commit 346623e1 authored by Zoey Chen's avatar Zoey Chen
Browse files

[ToA] Add more details in javadoc

Bug: 327982408
Test: manual
Test: atest GrammaticalInflectionManagerTest
Change-Id: Ic164c0010d2af3c199b20380387e540369e30292
parent ef70fac4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -125,7 +125,10 @@ public class GrammaticalInflectionManager {
    /**
     * Get the current grammatical gender of privileged application from the encrypted file.
     *
     * @return the value of grammatical gender
     * @return the value of system grammatical gender only if the calling app has the permission,
     * otherwise throwing an exception.
     *
     * @throws SecurityException if the caller does not have the required permission.
     *
     * @see Configuration#getGrammaticalGender
     */
+5 −2
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

/**
@@ -133,7 +132,11 @@ public class GrammaticalInflectionService extends SystemService {

        @Override
        public int getSystemGrammaticalGender(AttributionSource attributionSource, int userId) {
            return canGetSystemGrammaticalGender(attributionSource)
            if (!checkSystemGrammaticalGenderPermission(mPermissionManager, attributionSource)) {
                throw new SecurityException("AttributionSource: " + attributionSource
                        + " does not have READ_SYSTEM_GRAMMATICAL_GENDER permission.");
            }
            return checkSystemTermsOfAddressIsEnabled()
                    ? GrammaticalInflectionService.this.getSystemGrammaticalGender(
                    attributionSource, userId)
                    : GRAMMATICAL_GENDER_NOT_SPECIFIED;