OSDN Git Service

am 1f5a32ce: am 58cff53a: Merge "SkScalarDiv and its variants are deprecated" into...
authorJérôme Poichet <jpoichet@google.com>
Sat, 16 May 2015 02:29:11 +0000 (02:29 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Sat, 16 May 2015 02:29:11 +0000 (02:29 +0000)
* commit '1f5a32cee3768236c3e969e19c2b55869f740a02':
  SkScalarDiv and its variants are deprecated

core/java/android/app/AlarmManager.java
core/java/android/security/IKeystoreService.aidl
core/java/com/android/internal/app/ProcessStats.java
data/keyboards/Android.mk
keystore/java/android/security/KeyStore.java
packages/InputDevices/Android.mk
packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
services/core/java/com/android/server/job/JobServiceContext.java

index 5e7bd0d..b80fc86 100644 (file)
@@ -796,7 +796,7 @@ public class AlarmManager {
         }
 
         /**
-         * Returns an intent intent that can be used to show or edit details of the alarm clock in
+         * Returns an intent that can be used to show or edit details of the alarm clock in
          * the application that scheduled it.
          *
          * <p class="note">Beware that any application can retrieve and send this intent, 
index b0779c0..30ea8e7 100644 (file)
@@ -30,33 +30,29 @@ import android.security.KeystoreArguments;
  * @hide
  */
 interface IKeystoreService {
-    int test();
+    int getState(int userId);
     byte[] get(String name);
     int insert(String name, in byte[] item, int uid, int flags);
     int del(String name, int uid);
     int exist(String name, int uid);
-    String[] saw(String namePrefix, int uid);
+    String[] list(String namePrefix, int uid);
     int reset();
     int onUserPasswordChanged(int userId, String newPassword);
-    int lock();
+    int lock(int userId);
     int unlock(int userId, String userPassword);
-    int zero();
+    int isEmpty(int userId);
     int generate(String name, int uid, int keyType, int keySize, int flags,
         in KeystoreArguments args);
     int import_key(String name, in byte[] data, int uid, int flags);
     byte[] sign(String name, in byte[] data);
     int verify(String name, in byte[] data, in byte[] signature);
     byte[] get_pubkey(String name);
-    int del_key(String name, int uid);
     int grant(String name, int granteeUid);
     int ungrant(String name, int granteeUid);
     long getmtime(String name);
     int duplicate(String srcKey, int srcUid, String destKey, int destUid);
     int is_hardware_backed(String string);
     int clear_uid(long uid);
-    int reset_uid(int uid);
-    int sync_uid(int sourceUid, int targetUid);
-    int password_uid(String password, int uid);
 
     // Keymaster 0.4 methods
     int addRngEntropy(in byte[] data);
index fe79eff..4cd12c6 100644 (file)
@@ -3365,10 +3365,11 @@ public final class ProcessStats implements Parcelable {
                             + pkgList.keyAt(index) + "/" + proc.mUid
                             + " for multi-proc " + proc.mName + " version " + proc.mVersion);
                 }
+                String savedName = proc.mName;
                 proc = pkg.mProcesses.get(proc.mName);
                 if (proc == null) {
                     throw new IllegalStateException("Didn't create per-package process "
-                            + proc.mName + " in pkg " + pkg.mPackageName + "/" + pkg.mUid);
+                            + savedName + " in pkg " + pkg.mPackageName + "/" + pkg.mUid);
                 }
                 holder.state = proc;
             }
index 898efe8..4616838 100644 (file)
@@ -32,7 +32,7 @@ $(LOCAL_BUILT_MODULE) : $(framework_keylayouts) $(framework_keycharmaps) $(frame
        $(hide) mkdir -p $(dir $@) && touch $@
 
 # Run validatekeymaps uncondionally for platform build.
-droidcore all_modules : $(LOCAL_BUILT_MODULE)
+droidcore : $(LOCAL_BUILT_MODULE)
 
 # Reset temp vars.
 validatekeymaps :=
index 06f5b06..72eda23 100644 (file)
@@ -146,10 +146,10 @@ public class KeyStore {
         }
     }
 
-    public State state() {
+    public State state(int userId) {
         final int ret;
         try {
-            ret = mBinder.test();
+            ret = mBinder.getState(userId);
         } catch (RemoteException e) {
             Log.w(TAG, "Cannot connect to keystore", e);
             throw new AssertionError(e);
@@ -163,6 +163,10 @@ public class KeyStore {
         }
     }
 
+    public State state() {
+        return state(UserHandle.myUserId());
+    }
+
     public boolean isUnlocked() {
         return state() == State.UNLOCKED;
     }
@@ -211,15 +215,26 @@ public class KeyStore {
         return contains(key, UID_SELF);
     }
 
-    public String[] saw(String prefix, int uid) {
+    /**
+     * List all entries in the keystore for {@code uid} starting with {@code prefix}.
+     */
+    public String[] list(String prefix, int uid) {
         try {
-            return mBinder.saw(prefix, uid);
+            return mBinder.list(prefix, uid);
         } catch (RemoteException e) {
             Log.w(TAG, "Cannot connect to keystore", e);
             return null;
         }
     }
 
+    public String[] list(String prefix) {
+        return list(prefix, UID_SELF);
+    }
+
+    public String[] saw(String prefix, int uid) {
+        return list(prefix, uid);
+    }
+
     public String[] saw(String prefix) {
         return saw(prefix, UID_SELF);
     }
@@ -233,15 +248,25 @@ public class KeyStore {
         }
     }
 
-    public boolean lock() {
+    /**
+     * Attempt to lock the keystore for {@code user}.
+     *
+     * @param user Android user to lock.
+     * @return whether {@code user}'s keystore was locked.
+     */
+    public boolean lock(int userId) {
         try {
-            return mBinder.lock() == NO_ERROR;
+            return mBinder.lock(userId) == NO_ERROR;
         } catch (RemoteException e) {
             Log.w(TAG, "Cannot connect to keystore", e);
             return false;
         }
     }
 
+    public boolean lock() {
+        return lock(UserHandle.myUserId());
+    }
+
     /**
      * Attempt to unlock the keystore for {@code user} with the password {@code password}.
      * This is required before keystore entries created with FLAG_ENCRYPTED can be accessed or
@@ -267,15 +292,22 @@ public class KeyStore {
         return unlock(UserHandle.getUserId(Process.myUid()), password);
     }
 
-    public boolean isEmpty() {
+    /**
+     * Check if the keystore for {@code userId} is empty.
+     */
+    public boolean isEmpty(int userId) {
         try {
-            return mBinder.zero() == KEY_NOT_FOUND;
+            return mBinder.isEmpty(userId) != 0;
         } catch (RemoteException e) {
             Log.w(TAG, "Cannot connect to keystore", e);
             return false;
         }
     }
 
+    public boolean isEmpty() {
+        return isEmpty(UserHandle.myUserId());
+    }
+
     public boolean generate(String key, int uid, int keyType, int keySize, int flags,
             byte[][] args) {
         try {
@@ -306,12 +338,7 @@ public class KeyStore {
     }
 
     public boolean delKey(String key, int uid) {
-        try {
-            return mBinder.del_key(key, uid) == NO_ERROR;
-        } catch (RemoteException e) {
-            Log.w(TAG, "Cannot connect to keystore", e);
-            return false;
-        }
+        return delete(key, uid);
     }
 
     public boolean delKey(String key) {
@@ -404,36 +431,6 @@ public class KeyStore {
         }
     }
 
-    public boolean resetUid(int uid) {
-        try {
-            mError = mBinder.reset_uid(uid);
-            return mError == NO_ERROR;
-        } catch (RemoteException e) {
-            Log.w(TAG, "Cannot connect to keystore", e);
-            return false;
-        }
-    }
-
-    public boolean syncUid(int sourceUid, int targetUid) {
-        try {
-            mError = mBinder.sync_uid(sourceUid, targetUid);
-            return mError == NO_ERROR;
-        } catch (RemoteException e) {
-            Log.w(TAG, "Cannot connect to keystore", e);
-            return false;
-        }
-    }
-
-    public boolean passwordUid(String password, int uid) {
-        try {
-            mError = mBinder.password_uid(password, uid);
-            return mError == NO_ERROR;
-        } catch (RemoteException e) {
-            Log.w(TAG, "Cannot connect to keystore", e);
-            return false;
-        }
-    }
-
     public int getLastError() {
         return mError;
     }
index f537022..e7190dc 100644 (file)
@@ -42,7 +42,7 @@ $(LOCAL_BUILT_MODULE) : $(input_devices_keymaps) | $(validatekeymaps)
        $(hide) mkdir -p $(dir $@) && touch $@
 
 # Run validatekeymaps unconditionally for platform build.
-droidcore all_modules : $(LOCAL_BUILT_MODULE)
+droidcore : $(LOCAL_BUILT_MODULE)
 
 # Reset temp vars.
 validatekeymaps :=
index 6888d0e..428df8d 100644 (file)
@@ -234,7 +234,9 @@ public class ImageWallpaper extends WallpaperService {
                     Log.d(TAG, "Visibility changed to visible=" + visible);
                 }
                 mVisible = visible;
-                drawFrame();
+                if (visible) {
+                    drawFrame();
+                }
             }
         }
 
index bb4e388..d26319b 100644 (file)
@@ -73,7 +73,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
     private static final long OP_TIMEOUT_MILLIS = 8 * 1000;
 
     private static final String[] VERB_STRINGS = {
-            "VERB_BINDING", "VERB_STARTING", "VERB_EXECUTING", "VERB_STOPPING"
+            "VERB_BINDING", "VERB_STARTING", "VERB_EXECUTING", "VERB_STOPPING", "VERB_FINISHED"
     };
 
     // States that a job occupies while interacting with the client.
@@ -81,6 +81,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
     static final int VERB_STARTING = 1;
     static final int VERB_EXECUTING = 2;
     static final int VERB_STOPPING = 3;
+    static final int VERB_FINISHED = 4;
 
     // Messages that result from interactions with the client service.
     /** System timed out waiting for a response. */
@@ -172,6 +173,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
                 mRunningJob = null;
                 mParams = null;
                 mExecutionStartTimeElapsed = 0L;
+                mVerb = VERB_FINISHED;
                 removeOpTimeOut();
                 return false;
             }
@@ -307,8 +309,8 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
                     break;
                 case MSG_CALLBACK:
                     if (DEBUG) {
-                        Slog.d(TAG, "MSG_CALLBACK of : " + mRunningJob + " v:" +
-                                (mVerb >= 0 ? VERB_STRINGS[mVerb] : "[invalid]"));
+                        Slog.d(TAG, "MSG_CALLBACK of : " + mRunningJob
+                                + " v:" + VERB_STRINGS[mVerb]);
                     }
                     removeOpTimeOut();
 
@@ -524,8 +526,12 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
          * we want to clean up internally.
          */
         private void closeAndCleanupJobH(boolean reschedule) {
-            final JobStatus completedJob = mRunningJob;
+            final JobStatus completedJob;
             synchronized (mLock) {
+                if (mVerb == VERB_FINISHED) {
+                    return;
+                }
+                completedJob = mRunningJob;
                 try {
                     mBatteryStats.noteJobFinish(mRunningJob.getName(), mRunningJob.getUid());
                 } catch (RemoteException e) {
@@ -538,7 +544,7 @@ public class JobServiceContext extends IJobCallback.Stub implements ServiceConne
                 mWakeLock = null;
                 mRunningJob = null;
                 mParams = null;
-                mVerb = -1;
+                mVerb = VERB_FINISHED;
                 mCancelled.set(false);
                 service = null;
                 mAvailable = true;